Supabase initial set up following documentation#39
Open
kimannle wants to merge 3 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Collaborator
Author
|
In the next PR, I will be deleting the instruments table and queries related to it and setting up authentication and our mood entries table. At this time, I've kept it to ensure that we are able to communicate with Supabase within our app :) |
3166999 to
e7bdc46
Compare
kimannle
commented
Jul 7, 2025
| "dependencies": { | ||
| "@apollo/client": "^3.13.8", | ||
| "@supabase/ssr": "^0.6.1", | ||
| "@supabase/supabase-js": "^2.50.3", |
Collaborator
Author
There was a problem hiding this comment.
These are packages we need to install so that we can access supabase from the browser and server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #34.
Problem
We need a database that supports user authentication/management, GraphQL integration, and structured data storage based on the needs of our mood tracker app.
Users aren't expected to make frequent real time changes so a service like Redis would not be required for our needs because we don't need to support caching frequently accessed data to significantly reduce the load to our database.
Developer design decisions
🧠 Why two clients and what's up with the cookies?
supabase.auth.signInWithPassword()orsupabase.auth.getSession()from the frontend, Supabase pulls the session token fromlocalStorage/cookiesin the browser.Here's a useful read about server side rendering and Supabase auth.
Supabase Client Usage Guide
supabase-browser.tsclientsupabase-server.tsclientsupabase-server.tsclientSolution
Supabase features:
I followed the setup for server side authentication . This PR concerns steps 1-4.
Tophatting
.env.localfile at the root and paste your secrets (public supabase url and supabase key which I will separately provide to ensure our secrets don't get leaked).npm installto download new dependencies.npm run devlocally.http://localhost:3000/instrumentsand you should see the list ofinstrumentsentries.Configure Vercel's project settings
NEXT_PUBLIC_SUPABASE_URL.NEXT_PUBLIC_SUPABASE_ANON_KEY.instrumentsentries.