Skip to content

Conversation

@AndrewHUNGNguyen
Copy link

@AndrewHUNGNguyen AndrewHUNGNguyen commented Dec 26, 2025

Provided instructions on how to set up supabase environment for local development of DEVxSD.


Note

Adds comprehensive local development instructions for running Supabase alongside the app.

  • New "Local Supabase Development" section covering prerequisites (Docker Desktop, Supabase CLI) and verification (supabase --version)
  • Steps to configure GitHub OAuth for local auth, including creating supabase/.env and referencing supabase/config.toml keys
  • Commands to start/stop/reset the local stack (supabase start, supabase db reset) with expected service URLs
  • Instructions to point the Next.js app to local Supabase via .env.local and use the printed sb_publishable_... key
  • Troubleshooting notes for common local issues (API root 404, provider not enabled, Docker daemon)
  • Removes prior note about exposing keys and replaces it with scoped local setup details

Written by Cursor Bugbot for commit ea031d6. This will update automatically on new commits. Configure here.

Copy link
Contributor

@samholmes samholmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial review. I tried following the instructions to install supabase start and got stuck at this point:


❯ supabase start
WARNING: You are running different service versions locally than your linked project:
supabase/gotrue:v2.182.1 => v2.184.0
Run supabase link to update them.
[+] Pulling 14/17
 ✔ edgeRuntime Skipped - Image is already present locally                                                                                                                                                                                0.0s 
 ✔ pgmeta Skipped - Image is already present locally                                                                                                                                                                                     0.0s 
 ✔ auth Skipped - Image is already present locally                                                                                                                                                                                       0.0s 
 ✔ storage Skipped - Image is already present locally                                                                                                                                                                                    0.0s 
 ✔ imgProxy Skipped - Image is already present locally                                                                                                                                                                                   0.0s 
 ✔ studio Skipped - Image is already present locally                                                                                                                                                                                     0.0s 
 ✔ api Skipped - Image is already present locally                                                                                                                                                                                        0.0s 
 ✔ realtime Skipped - Image is already present locally                                                                                                                                                                                   0.0s 
 ✔ kong Pulled                                                                                                                                                                                                                           6.2s 
   ✔ 9b18e9b68314 Pull complete                                                                                                                                                                                                          0.7s 
   ✔ 7fd91e922960 Pull complete                                                                                                                                                                                                          0.7s 
   ✔ 450997ae687c Pull complete                                                                                                                                                                                                          2.7s 
   ✔ d8380bfcbd9b Pull complete                                                                                                                                                                                                          2.7s 
 ⠙ mailpit Pulling                                                                                                                                                                                                                       6.2s 
 ✔ db Skipped - Image is already present locally                                                                                                                                                                                         0.0s 
 ⠙ logflare Pulling                                                                                                                                                                                                                      6.2s 
 ⠙ vector Pulling                                                                                                                                                                                                                        6.2s 
Starting database...
Initialising schema...
Seeding globals from roles.sql...
Applying migration 20250122000000_add_user_id_to_member.sql...
Stopping containers...
ERROR: relation "member" does not exist (SQLSTATE 42P01)           
At statement: 0                                                    
-- Add user_id foreign key to member table (nullable initially)    
ALTER TABLE member                                                 
ADD COLUMN user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE
Try rerunning the command with --debug to troubleshoot the error.

Did you run into a similar issue?

I'm assuming I'm doing something wrong, so if you know what I did wrong please let me know.

I have Docker installed, and I ran brew install supabase/tap/supabase first then I ran supabase start which resulted in the failure you see above.

Comment on lines +65 to +69
- **Windows (npm)** – requires Node.js:

```sh
npm install -g supabase
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't correct according to the docs: https://github.com/supabase/cli?tab=readme-ov-file#install-the-cli Perhaps just reference the docs to install supabase here. No need for use to copy the instructions in this README.

Comment on lines +99 to +106
`supabase/config.toml` is already configured to read these env vars via:
```toml
[auth.external.github]
enabled = true
client_id = "env(SUPABASE_AUTH_EXTERNAL_GITHUB_CLIENT_ID)"
secret = "env(SUPABASE_AUTH_EXTERNAL_GITHUB_SECRET)"
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this needs mentioning if it's already apart of the config. However, I double checked, and I don't see this in the toml file.

supabase --version
```

#### 2. GitHub OAuth (local-only)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Username/password should be the recommended authentication for testing and should be mentioned here. We should put GitHub OAuth and Google OAuth setup in a separate docs/oauth-setup-guide.md file and link to it here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah separation of responsibilities (once again for me). I am in favor of having a separate docs folder for sub-setups (e.g. setting up GitHub OAuth, Google OAuth locally) in different folders. What we can do is if any contributor manages to find a way to do local setup for stuff like GitHub OAuth, then the contributor should add the exact steps to docs/oauth-setup-guide.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants