Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
a739c17
downloaded modules
syshin402 Feb 28, 2025
e188bdd
Install Tailwind
LarryLing Mar 1, 2025
6d7c52c
Refactor pages folder to use Tailwind
LarryLing Mar 1, 2025
67aaff9
Add custom color and font size variables
LarryLing Mar 1, 2025
802020f
Add custom color and font size variables
LarryLing Mar 1, 2025
d3dbb96
Update with Prettier and Linting
LarryLing Mar 1, 2025
94beb4e
Install Lucide and Bootstrap icon packages
LarryLing Mar 2, 2025
2fb2196
Refactor remaining component files
LarryLing Mar 2, 2025
1f1f4db
Merge pull request #1 from recyclerydisc/feature/tailwind
LarryLing Mar 2, 2025
6f60b3c
Add demo navbar
LarryLing Mar 2, 2025
78f9001
Add flyout menus to desktop navbar
LarryLing Mar 2, 2025
0d41228
Add flyout menu open/close state
LarryLing Mar 2, 2025
7a864dc
Add side menu accordion
LarryLing Mar 2, 2025
9ae4895
Add click outside event listeners flyout and side menus
LarryLing Mar 3, 2025
43b386d
Add footer
LarryLing Mar 3, 2025
e4319dc
Add anchor tags
LarryLing Mar 3, 2025
efe3a2c
Replace anchor with link + Replace span with bold
LarryLing Mar 3, 2025
decee51
Update: Close flyout on second button click
LarryLing Mar 3, 2025
98f33f9
Cleanup: Format + Lint run
LarryLing Mar 3, 2025
d63f829
initialized files, whattsx
syshin402 Mar 3, 2025
98c6fa4
whotsx start updated.
syshin402 Mar 4, 2025
0094e92
ourprogram backbone
syshin402 Mar 4, 2025
d3e4848
Fix: Single quotes to double quote
LarryLing Mar 4, 2025
d57d06f
Merge pull request #2 from recyclerydisc/content/navbar-footer
LarryLing Mar 4, 2025
42f9ec7
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
syshin402 Mar 4, 2025
7ff4872
Merge pull request #3 from recyclerydisc/about_pages
syshin402 Mar 4, 2025
4e1587a
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
syshin402 Mar 4, 2025
1d19e89
add support pages
FuturrCoder Mar 4, 2025
4013ec9
Merge pull request #4 from recyclerydisc/content/home-and-support
FuturrCoder Mar 4, 2025
bbfb6ae
changed filename to dash
syshin402 Mar 4, 2025
ffb37b1
Merge pull request #5 from recyclerydisc/about_pages
syshin402 Mar 4, 2025
87606dd
file organized
syshin402 Mar 4, 2025
1e1cb34
finished mapping nav-bar and routing
syshin402 Mar 4, 2025
0e85378
Merge pull request #6 from recyclerydisc/routing
syshin402 Mar 7, 2025
9583ca4
Update font sizes
LarryLing Mar 10, 2025
e93fd38
Delete default line height and weight properties
LarryLing Mar 10, 2025
45a01c1
Delete display and button font size variables
LarryLing Mar 10, 2025
8d0eca9
Fixed display of login window, changed homescreen to display logged i…
arttomzak Mar 10, 2025
29b91c6
Update with prettier and lint run
LarryLing Mar 10, 2025
d3c4eb0
Merge pull request #8 from recyclerydisc/login
arttomzak Mar 10, 2025
4b089f4
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
LarryLing Mar 10, 2025
99fc6c0
Run prettier/lint after pull
LarryLing Mar 10, 2025
3ff190e
Merge pull request #7 from recyclerydisc/content/Custom-Fonts
LarryLing Mar 10, 2025
d098749
Add content for what we do page
LarryLing Mar 10, 2025
1d8f261
Add responsive layout to what we do page
LarryLing Mar 10, 2025
ded3214
create home page
FuturrCoder Mar 10, 2025
525ade8
create home page
FuturrCoder Mar 10, 2025
42e407b
Add content for who we are page
LarryLing Mar 10, 2025
b26a7eb
split home page into sections in separate files, make it responsive
FuturrCoder Mar 11, 2025
623995f
reorder imports
FuturrCoder Mar 11, 2025
cd51f76
Fix side menu index bug
LarryLing Apr 8, 2025
0acc353
move home page components to components/home folder
FuturrCoder Apr 8, 2025
cddf0bc
Merge pull request #9 from recyclerydisc/content/home-page
FuturrCoder Apr 8, 2025
3168b9f
create generic components for text, buttons, and a tinted background …
FuturrCoder Apr 8, 2025
ff74855
use generic button components in navbar and footer
FuturrCoder Apr 8, 2025
4308dfc
Merge pull request #10 from recyclerydisc/generic-components
FuturrCoder Apr 14, 2025
fc7cfc1
setup for classes
syshin402 Apr 14, 2025
2359a13
Background and text setup
arttomzak Apr 14, 2025
ba5a572
halfway thru classes
syshin402 Apr 14, 2025
f5d7300
everything except for images
arttomzak Apr 14, 2025
9404b2b
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
LarryLing Apr 15, 2025
017d3ef
almost done with classes
syshin402 Apr 15, 2025
ff2c1a0
Add openshop page
LarryLing Apr 15, 2025
29690f0
Refactor to use style tags
LarryLing Apr 15, 2025
297c5ad
done with classes page
syshin402 Apr 15, 2025
f879977
image1 imported
arttomzak Apr 15, 2025
998d84e
Merge pull request #11 from recyclerydisc/classes
syshin402 Apr 15, 2025
d58c680
Edit styled tags to shrink as page shrinks
LarryLing Apr 18, 2025
1bb8ae7
Add images to what we do page
LarryLing Apr 18, 2025
6aed2f0
FTWNB page done (standardize x margins later)
arttomzak Apr 18, 2025
bd8e9b8
Add images for who and openshop pages
LarryLing Apr 18, 2025
c02962a
Merge remote-tracking branch 'origin' into content/FTWN
arttomzak Apr 18, 2025
d64b0b0
Edit side menu to use button components
LarryLing Apr 18, 2025
c287740
standardized a tags, and implemented br tag in header
arttomzak Apr 18, 2025
2d9af40
Refactor who we are grid layout
LarryLing Apr 20, 2025
0159c40
Run lint and prettier
LarryLing Apr 20, 2025
20f92a2
create freecyclery page
FuturrCoder Apr 21, 2025
c6ddffe
Add default background color + Move header poster to home folder in a…
LarryLing Apr 22, 2025
5941d17
make the margins responsive
FuturrCoder Apr 22, 2025
2047ebc
update home hero section
FuturrCoder Apr 22, 2025
096ee19
Merge pull request #14 from recyclerydisc/freecylcery
recyclerydisc Apr 22, 2025
83621c7
Merge pull request #13 from recyclerydisc/content/About-Pages
recyclerydisc Apr 22, 2025
e6ea58f
reformatting page
arttomzak Apr 22, 2025
5141420
made responsive
arttomzak Apr 25, 2025
780bf4c
fixed typo lol
arttomzak Apr 25, 2025
0c716b5
Merge pull request #12 from recyclerydisc/content/FTWN
arttomzak Apr 25, 2025
5e60098
fixed link destinations
arttomzak May 2, 2025
8e6ce14
Merge pull request #15 from recyclerydisc/content/FTWN
arttomzak May 2, 2025
32af790
hobbled together get request, filling image on FTWNB page
arttomzak May 2, 2025
71742e4
Create section component and use it in all existing pages; add a defa…
FuturrCoder May 2, 2025
c7a15c9
upload page made, need to fix backend
syshin402 May 2, 2025
1e716cd
fixed backendurl
syshin402 May 2, 2025
8546b9d
removed test functions
syshin402 May 2, 2025
8fdc01c
GET works and displays properly on site!
arttomzak May 2, 2025
00e6478
Finished upload
syshin402 May 5, 2025
39e0519
Took console prints out
syshin402 May 5, 2025
8cc9614
Merge pull request #16 from recyclerydisc/standardization
FuturrCoder May 6, 2025
e681252
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
syshin402 May 6, 2025
44cbce3
Half of donate time page
FuturrCoder May 6, 2025
219a7be
Upload picture fixed
syshin402 May 6, 2025
aecba5f
Add content for contribute financially page
LarryLing May 9, 2025
bd038c3
starting useEffects atop every page
arttomzak May 9, 2025
e786435
fetching images for about us-what done
arttomzak May 9, 2025
49b58e9
through half of recyclery fetching images
arttomzak May 9, 2025
6e3bfc9
edit link function updated
syshin402 May 9, 2025
64e94e4
Implemented PUT function
syshin402 May 9, 2025
58b53e6
Add content to donate a bike page
LarryLing May 11, 2025
4a445fa
Footer fixes
LarryLing May 11, 2025
e418930
Side menu fixes
LarryLing May 12, 2025
db8ba57
Refactored to make accordion component general + add content files fo…
LarryLing May 12, 2025
fd1dd48
Refactor buttons and styled tags
LarryLing May 12, 2025
f827f3d
Refactor donate a bike page
LarryLing May 12, 2025
e8263b0
Run format and lint
LarryLing May 12, 2025
a3897b4
Custom header color fix
LarryLing May 12, 2025
79ceabf
placeholder image logic and image fetches on all pages (mirai compone…
arttomzak May 12, 2025
338b456
Content/support us pages
syshin402 May 12, 2025
e8f51de
pages on editing done
syshin402 May 13, 2025
a0a65b1
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
syshin402 May 13, 2025
8c85736
conflicts resolved
arttomzak May 13, 2025
3401ba4
eslint errors resolved
arttomzak May 13, 2025
e6dd3f4
Merge pull request #20 from recyclerydisc/backend/GET-image
arttomzak May 13, 2025
5a70136
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
syshin402 May 16, 2025
5bfafe1
hours now working
syshin402 May 16, 2025
51a050f
create our supporters and donate time pages
FuturrCoder May 16, 2025
dc05f49
import error fix
arttomzak May 16, 2025
3bf7347
Merge pull request #21 from recyclerydisc/backend/GET-image
arttomzak May 16, 2025
0954d1e
Hero image scaling issue fixed
arttomzak May 16, 2025
2c70f0c
in progress of working out who upload
syshin402 May 16, 2025
2ea8f78
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
syshin402 May 16, 2025
999a292
Merge branch 'main' into donate-time-our-supporters
FuturrCoder May 16, 2025
f001029
PUT functions done for upload hours, uplaod people
syshin402 May 16, 2025
a6c00c9
add a title to every page; fix links and typo; add image prop
FuturrCoder May 19, 2025
bb4c904
shorten import
FuturrCoder May 19, 2025
89abeec
Merge pull request #23 from recyclerydisc/donate-time-our-supporters
LarryLing May 19, 2025
4a5a823
Merge pull request #22 from recyclerydisc/upload
LarryLing May 19, 2025
60545b7
Deployment fixes
LarryLing May 19, 2025
1320627
Merge pull request #24 from recyclerydisc/deployment
LarryLing May 19, 2025
12b49c4
Changed module resolution to NodeNext
LarryLing May 19, 2025
2e724f6
Import filename fixes
LarryLing May 19, 2025
50997d1
Refactor role-card.tsx to use explicit ReactNode elements
LarryLing May 19, 2025
e197698
Merge pull request #25 from recyclerydisc/second-deployment
LarryLing May 19, 2025
452609d
Set jsx flag in frontend tsconfig.json
LarryLing May 19, 2025
29a259a
Set jsx flag to presever in frontend tsconfig.json
LarryLing May 20, 2025
1a639cf
Set jsx flag to react in frontend tsconfig.json
LarryLing May 20, 2025
9ab5c81
Set jsx flag to preserve in frontend tsconfig.json
LarryLing May 20, 2025
16aa532
contribute financially
arttomzak May 20, 2025
64fb085
fix extends path
FuturrCoder May 20, 2025
58a9c68
vercel.json test
FuturrCoder May 20, 2025
038df96
undo adding vercel.json
FuturrCoder May 20, 2025
e71deda
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
arttomzak May 23, 2025
e66097b
all pages fetching pictures
arttomzak May 23, 2025
4420892
done with adding get function, trying deploying to vercel
syshin402 May 23, 2025
ab002d8
all pages fetching properly properly
arttomzak May 23, 2025
2a3890e
Merge branch 'main' of https://github.com/recyclerydisc/recyclery_web…
syshin402 May 23, 2025
c15434a
deleted vercel.json
syshin402 May 23, 2025
f33614a
Update vercel.json
May 23, 2025
c92362f
Done with adding get function, trying deploying to vercel
syshin402 May 23, 2025
ac49511
Integrated image fetching logic to every page
syshin402 May 23, 2025
f41c506
Update FTWN-B page to make it more consistent with other pages
FuturrCoder May 23, 2025
3bdd13c
changed name for edit link button file
syshin402 May 23, 2025
7d8e89f
done with adding buttons for hours and people
syshin402 May 23, 2025
2038038
Make FTWN-B page more consistent
syshin402 May 23, 2025
fa7e58b
Sidemenu closes on item select
May 26, 2025
ee08162
Navigation dropdown menu closes on item select + Donate a bike layout…
May 26, 2025
61d30a0
Add .idea to gitignore file
May 26, 2025
ff8e59e
Deleted .idea folder
May 26, 2025
0f7e4d0
Merge pull request #30 from recyclerydisc/frontend/editbutton-upload
LarryLing May 27, 2025
d2bffd3
Merge pull request #31 from recyclerydisc/sidemenu-fix
LarryLing May 27, 2025
204096a
Vercel.json change
May 27, 2025
612ceb5
Second vercel.json changes
May 27, 2025
8f611d7
Third vercel.json changes
May 27, 2025
ff76300
Fourth vercel.json changes
May 27, 2025
964e6d7
Fifth vercel.json changes
May 27, 2025
d223103
Gave frontend and backend folders individual vercel.json files
May 27, 2025
6ebe5ef
Placed vercel.json back to root directory with project config updates
May 27, 2025
100d40c
Placed vercel.json into frontend folder
May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
node_modules
dist
.turbo
.idea
Empty file removed .turbo/cookies/1.cookie
Empty file.
Empty file removed .turbo/cookies/10.cookie
Empty file.
Empty file removed .turbo/cookies/11.cookie
Empty file.
Empty file removed .turbo/cookies/12.cookie
Empty file.
Empty file removed .turbo/cookies/13.cookie
Empty file.
Empty file removed .turbo/cookies/14.cookie
Empty file.
Empty file removed .turbo/cookies/15.cookie
Empty file.
Empty file removed .turbo/cookies/2.cookie
Empty file.
Empty file removed .turbo/cookies/3.cookie
Empty file.
Empty file removed .turbo/cookies/4.cookie
Empty file.
Empty file removed .turbo/cookies/5.cookie
Empty file.
Empty file removed .turbo/cookies/6.cookie
Empty file.
Empty file removed .turbo/cookies/7.cookie
Empty file.
Empty file removed .turbo/cookies/8.cookie
Empty file.
Empty file removed .turbo/cookies/9.cookie
Empty file.
9 changes: 4 additions & 5 deletions apps/backend/.turbo/turbo-lint.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


> @full-stack-template-typescript-turbo-repo/backend@1.0.0 lint
> eslint .


> @full-stack-template-typescript-turbo-repo/backend@1.0.0 lint
> eslint .

6 changes: 3 additions & 3 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
"@types/cookie-parser": "^1.4.8",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
"@types/node": "^22.13.5",
"@types/node": "^22.15.3",
"eslint": "^9.21.0",
"globals": "^15.15.0",
"ts-node": "^10.9.2",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.1"
},
"dependencies": {
"@supabase/supabase-js": "^2.49.1",
"@supabase/supabase-js": "^2.49.4",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"dotenv": "^16.4.7",
"dotenv": "^16.5.0",
"express": "^4.21.2",
"nodemon": "^3.1.9"
}
Expand Down
272 changes: 267 additions & 5 deletions apps/backend/server.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import cookieParser from 'cookie-parser';
import cors from 'cors';
import dotenv from 'dotenv';
import express, { Express, NextFunction, Request, Response } from 'express';
import express, { Express, NextFunction, Request, RequestHandler, Response } from 'express';
import supabase from './config/supabase.js';
import authRoutes from './routes/authRoutes.js';

import multer from 'multer';


interface MulterRequest extends Request {
file?: Express.Multer.File;
}
const upload = multer({ limits: { fileSize: 50 * 1024 * 1024 } }); // 50MB limit

dotenv.config();

const app: Express = express();
Expand All @@ -21,7 +30,7 @@ interface CorsOptions {

const corsOptions: CorsOptions = {
origin: (origin, callback) => {
const allowedOrigins = [process.env.FRONTEND_URL || '', process.env.FRONTEND_URL_DEV || ''];
const allowedOrigins = [process.env.FRONTEND_URL || '', process.env.FRONTEND_URL_DEV || '', "https://the-recyclery.vercel.app/"];

if (allowedOrigins.includes(origin || '') || !origin) {
callback(null, true);
Expand All @@ -34,7 +43,16 @@ const corsOptions: CorsOptions = {
credentials: true,
maxAge: 86400,
};

app.use(cookieParser());
app.use(
express.json({ limit: '50mb' }) // ↑ allow big JSON bodies
);
app.use(
express.urlencoded({ // ↑ if you ever post urlencoded too
limit: '50mb',
extended: true,
})
);
app.use(cors(corsOptions));

// if (process.env.NODE_ENV !== 'production') {
Expand All @@ -44,8 +62,6 @@ app.use(cors(corsOptions));
// });
// }

app.use(cookieParser());
app.use(express.json());

app.use((req, res, next) => {
req.url = req.url.replace(/\/+/g, '/');
Expand Down Expand Up @@ -74,6 +90,252 @@ app.use((err: AppError, _req: Request, res: Response, _next: NextFunction) => {
});
});


app.get('/images/:id', async (req: Request, res: Response) => {
try {
const img_ID = parseInt(req.params.id);
const { data } = await supabase
.from('IMAGES')
.select('bucket_link')
.eq('img_id', img_ID)
.single();

res.setHeader('Content-Type', 'application/json');
res.json({ bucket_link: data?.bucket_link || null });
} catch (error) {
res.status(500).json({ err: 'Failed to fetch image', error});
}
});


// GET for getting person in WHO
app.get('/people/:id', (async (req: Request, res: Response) => {
try {
const person_ID = parseInt(req.params.id);
const { data: person, error: dbErr} = await supabase
.from('WHO')
.select('*')
.eq('person_id', person_ID)
.single();

if (dbErr) {
return res
.status(500)
.json({ error: 'Failed to update person record' })
}
if (!person) {
return res
.status(404)
.json({ error: 'Person not found' })
}

res.setHeader('Content-Type', 'application/json');
res.json({ person_name: person?.name || null, person_description: person?.description || null , person_image: person?.person_image || null });
} catch (error) {
res.status(500).json({ err: 'Failed to fetch person', error });
}
}) as RequestHandler
);

// GET for getting hours in HOURS
app.get('/hours/:id', (async (req: Request, res: Response) => {
try {
const hours_ID = parseInt(req.params.id);
const {data: hours, error: dbErr} = await supabase
.from('HOURS')
.select('hours')
.eq('id', hours_ID)
.single();

if (dbErr) {
return res
.status(500)
.json({ error: 'Failed to get hours record' })
}
if (!hours) {
return res
.status(404)
.json({ error: 'Hours not found' })
}
res.setHeader('Content-Type', 'application/json');
res.json({ hours_text: hours?.hours || null });
} catch (error) {
res.status(500).json({ err: 'Failed to fetch hours', error });
}
}) as RequestHandler
);

// PUT to upload photos
app.put('/upload/:id', upload.single('file'), (async (req, res) => {
try {
const { id } = req.params;
const file = req.file;

if (!file) {
return res.status(400).json({ error: 'No file uploaded or missing file name' });
}

const fileBuffer = file.buffer;
const fileName = file.originalname;

const allowedExtensions = ['jpeg', 'png', 'jpg', 'heic', 'gif', 'webp'];
const fileExtension = fileName.split('.').pop()?.toLowerCase();

if (!fileExtension || !allowedExtensions.includes(fileExtension)) {
return res.status(400).json({ error: 'Unsupported file type' });
}

const uniqueFileName = `images/${id}-${Date.now()}.${fileExtension}`;

const { error: uploadError } = await supabase.storage
.from('IMAGES') // Replace with your bucket name
.upload(uniqueFileName, fileBuffer, {
contentType: `image/${fileExtension}`,
upsert: true,
});

if (uploadError) {
return res.status(500).json({ error: 'Failed to upload image to Supabase' });
}

const { data: publicUrlData } = supabase.storage
.from('IMAGES')
.getPublicUrl(uniqueFileName);

if (!publicUrlData?.publicUrl) {
return res.status(500).json({ error: 'Failed to generate public URL' });
}

// Update the database with the new bucket link
const { data: dbdata, error: dbError } = await supabase
.from('IMAGES')
.update({ bucket_link: publicUrlData.publicUrl })
.eq('img_id', id)
.select('*')
.single();

if (dbError) {
return res.status(500).json({ error: 'Failed to update database' });
}

if (!dbdata) {
return res.status(404).json({ error: 'Image not found' });
}

return res.status(200).json({
message: 'Image uploaded and database updated successfully',
dbdata,
});

} catch (error) {
res.status(500).json({ error });
}
}) as RequestHandler
);

// for UploadHours
app.put(
'/uploadhours/:id',
express.json({ limit: '1mb' }), (async (req, res) => {
try {
const { id } = req.params;
const { hours } = req.body as { hours?: string };
if (!hours) {
return res.status(400).json({ error: 'Missing hours text' });
}
const { error: dbErr, data: dbData } = await supabase
.from('HOURS')
.update({ hours })
.eq('id', id)
.select('*')
.single();
if (dbErr) throw dbErr;
res.json({ message: 'Hours updated', hours: dbData });
} catch (error) {
res.status(500).json({ error });
}
}) as RequestHandler
);

// PUT for upload WHO
app.put('/uploadpeople/:id', upload.single('file'), (async (req: MulterRequest, res: Response) => {
try {
const { id } = req.params;
const { name, description } = req.body as {
name?: string;
description?: string;
};

if (!name) {
return res.status(400).json({ error: 'Missing name or description' })
}

const updates: Record<string, unknown> = { name, description };

if (req.file) {
const file = req.file
const ext = file.originalname.split('.').pop()?.toLowerCase()
const allowed = ['jpeg','png','jpg','heic','gif','webp']
if (!ext || !allowed.includes(ext)) {
return res
.status(400)
.json({ error: 'Unsupported file type' })
}

const key = `people/${id}-${Date.now()}.${ext}`
const { error: upErr } = await supabase.storage
.from('who') // your WHO bucket slug
.upload(key, file.buffer, {
contentType: `image/${ext}`,
upsert: true,
})
if (upErr) {
return res
.status(500)
.json({ error: 'Failed to upload image to WHO bucket' })
}
// 4) getPublicUrl is sync
const { data: urlData } = supabase.storage
.from('who')
.getPublicUrl(key)

if (!urlData?.publicUrl) {
return res
.status(500)
.json({ error: 'Failed to generate public URL' })
}

updates.person_image = urlData.publicUrl
}

const { data: person, error: dbErr } = await supabase
.from('WHO')
.update(updates)
.eq('person_id', Number(id))
.select('*')
.single()
if (dbErr) {
return res
.status(500)
.json({ error: 'Failed to update person record' })
}
if (!person) {
return res
.status(404)
.json({ error: 'Person not found' })
}

return res.status(200).json({
message: 'Image uploaded and database updated successfully',
person,
});

} catch (error) {
res.status(500).json({ error });
}
}) as RequestHandler
);

const PORT: number = parseInt(process.env.PORT || '3000', 10);
app.listen(PORT, () => {
// console.log(`Server running on port ${PORT}`);
Expand Down
19 changes: 9 additions & 10 deletions apps/frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/bike.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
6 changes: 5 additions & 1 deletion apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
"test": "echo \"No tests yet\" && exit 0"
},
"dependencies": {
"@tailwindcss/vite": "^4.0.9",
"bootstrap-icons": "^1.11.3",
"lucide-react": "^0.505.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router-dom": "^7.2.0",
"styled-components": "^6.1.15"
"styled-components": "^6.1.15",
"tailwindcss": "^4.0.9"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/public/bike.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion apps/frontend/public/vite.svg

This file was deleted.

Loading