Skip to content

czhou06/disc-users-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In this assignment I first decided to implement my Supabase database and ORMs, and later added some functionality to my web app that would allow the ORM to shine. I first set up Supabase and copied Supabase credentials into my .env while keeping my render.com database credetials in there in case anything breaks. I changed over all of the endpoints from raw SQL to ORM, and most of my web app, after some front-end tweaks, turned out OK. Then, I implemented the login system with Auth, which was a big time sink and challenge since I previously did not have a login functionality, an endpoint to create users (upon account creation), an endpoint to delete users (upon account deletion), or any way to view profiles that isn't typing them into the URL. I first set up Auth on Supabase, then added a middleware to my backend API which I used as a callback function for all my endpoints (to check if the user was logged in). I then went to my front-end database and used official Supabase Auth documentation to add login pages, signup pages, my profile pages, and create profile pages, all with some Auth calls in the background. Additionally, to make the Auth setup cleaner, I initialized the Supabase client in its own files. My key takeaways were that a lot of configurations clash with each other and that is a big part of good, secure web development. This felt a bit frustrating at times (RLS is literally so confusing) but understanding is really rewarding and I feel like I can do this over again with much less trouble. Additionally, using LLMs to guide me through this definitely sped it up tenfold, and using it to do things like styling and guidance on how to organize my code between back- and front-end was very important.

About

backend repo for disc workshop project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors