Hey guys! A Little question about project structur...
# help
m
Hey guys! A Little question about project structure i think. I am making an invoice app that will generate some pdfs. Im using supabase on the frontend (React app) for authentication and data storage. I want to generate some pdfs using an express app, and from React Take the jwt and sent it to express to validate it there and generate the pdf. Is it ok to do it this way? Or should i move all the supabase logic to the express server, and make the calls to my api for data storage also
s
It's certainly possible to do it using the first way. Since you can decode the JWT in Express to extract some user details, you could use that to pull in the other details you need to generate the PDF, from the database. The second way would perhaps be more secure, but you might find yourself limited if you ever need to add more functionality to the app as you'll have to update both the React app and the Express server.