@@ -63,7 +63,7 @@ npm run dev
6363Copy the example env file and fill in values:
6464
6565``` bash
66- cp .env.example .env.local
66+ cp .env.example apps/web/ .env.local
6767```
6868
6969Required variables:
@@ -108,45 +108,21 @@ psql "postgresql://postgres:postgres@127.0.0.1:XXXXX/postgres" -c "YOUR SQL HERE
108108- Always use ` psql ` with the local DB URL from ` npm run supabase:status `
109109- The MCP Supabase tools are for remote database operations only
110110
111- ### Supabase Project References
112-
113- | Environment | Project Ref | Dashboard URL | Branch |
114- | -------------| -------------| ---------------| --------|
115- | Local | N/A | ` npm run supabase:start ` → http://127.0.0.1:54423 | - |
116- | Development | ` ljxvzqjkwwwsgdnvgpgm ` | https://supabase.com/dashboard/project/ljxvzqjkwwwsgdnvgpgm | ` develop ` |
117- | Production | ` idjewtwnfrufbxoxulmq ` | https://supabase.com/dashboard/project/idjewtwnfrufbxoxulmq | ` main ` |
118-
119- ** Default remote:** Development (` ljxvzqjkwwwsgdnvgpgm ` )
120-
121111### Switching Between Environments
122112
123- By default, the Supabase CLI points to the ** development** remote. You only need to explicitly link when switching to production.
113+ The project may have multiple remote environments ( development, staging, production). Use the Supabase CLI to switch:
124114
125115``` bash
126116# Check which environment is currently linked
127- npm run supabase:which
128-
129- # Link to production (CAUTION: only for production deployments)
130- npm run supabase:link:prod
117+ npx supabase projects list
131118
132- # Link back to development (restore default)
133- npm run supabase:link:dev
134- ```
135-
136- Add these scripts to ` package.json ` :
137- ``` json
138- {
139- "scripts" : {
140- "supabase:which" : " npx supabase projects list" ,
141- "supabase:link:dev" : " npx supabase link --project-ref <DEV_PROJECT_REF>" ,
142- "supabase:link:prod" : " npx supabase link --project-ref <PROD_PROJECT_REF>"
143- }
144- }
119+ # Link to a specific project
120+ npx supabase link --project-ref < PROJECT_REF>
145121```
146122
147123** When to use each:**
148124- ** Local:** Default for all development work
149- - ** Development remote (default) :** Testing against shared dev data, deploying previews, pushing migrations
125+ - ** Development remote:** Testing against shared dev data, deploying previews, pushing migrations
150126- ** Production remote:** Only for production deployments or critical debugging
151127
152128---
@@ -232,26 +208,21 @@ npx supabase migration list --linked
232208
233209### Local Dev Test User
234210
235- For testing authenticated flows locally, create this test user:
211+ For testing authenticated flows locally, you can create a test user in the local Supabase instance.
236212
237- | Field | Value |
238- | -------| -------|
239- | Email | ` testuser@vibed.coding ` |
240- | Password | ` TestPass123! ` |
241-
242- ** To create the test user:**
213+ ** To create a test user:**
243214
2442151 . Start local Supabase: ` npm run supabase:start `
2452162 . Go to local Supabase Studio: ` http://127.0.0.1:54323 `
2462173 . Navigate to Authentication → Users
247- 4 . Click "Add User" and enter the credentials above
218+ 4 . Click "Add User" and enter test credentials
248219
249220** Alternative via SQL:**
250221``` bash
251222# Get DB URL first
252223npm run supabase:status
253224
254- # Create user (replace XXXXX with actual port)
225+ # Create user (replace XXXXX with actual port, EMAIL and PASSWORD with your values )
255226psql " postgresql://postgres:postgres@127.0.0.1:XXXXX/postgres" -c "
256227INSERT INTO auth.users (
257228 id,
@@ -262,8 +233,8 @@ INSERT INTO auth.users (
262233 updated_at
263234) VALUES (
264235 gen_random_uuid(),
265- 'testuser@vibed.coding ',
266- crypt('TestPass123! ', gen_salt('bf')),
236+ 'YOUR_TEST_EMAIL ',
237+ crypt('YOUR_TEST_PASSWORD ', gen_salt('bf')),
267238 now(),
268239 now(),
269240 now()
@@ -275,8 +246,8 @@ INSERT INTO auth.users (
275246
276247For GitHub OAuth testing locally:
2772481 . Create a GitHub OAuth App at https://github.com/settings/developers
278- 2 . Set callback URL to ` http://localhost:54421 /auth/v1/callback `
279- 3 . Add credentials to ` .env.local `
249+ 2 . Set callback URL to ` http://localhost:54321 /auth/v1/callback `
250+ 3 . Add credentials to ` apps/web/ .env.local`
280251
281252---
282253
@@ -498,9 +469,9 @@ npx supabase migration repair --status applied <version>
498469
4994701 . ** Most common cause:** Supabase was started without env vars. Restart with ` npm run supabase:stop && npm run supabase:start `
5004712 . ** Stale browser state:** Clear cookies and site data for ` localhost ` in your browser, then try again
501- 3 . Check callback URL in GitHub OAuth App matches: ` http://localhost:54421 /auth/v1/callback `
472+ 3 . Check callback URL in GitHub OAuth App matches: ` http://localhost:54321 /auth/v1/callback `
5024734 . Verify ` GITHUB_CLIENT_ID ` and ` GITHUB_CLIENT_SECRET ` are set in ` apps/web/.env.local `
503- 5 . Check Supabase Auth settings in local Studio: ` http://127.0.0.1:54423 `
474+ 5 . Check Supabase Auth settings in local Studio: ` http://127.0.0.1:54323 `
5044756 . Use ` localhost:8108 ` consistently (not ` 127.0.0.1:8108 ` ) to avoid OAuth state mismatches
505476
506477### MCP Tools Not Connecting
@@ -537,69 +508,4 @@ MCP Supabase tools connect to remote projects, not local. For local development:
537508
538509---
539510
540- ## Workflow Capture
541-
542- ** IMPORTANT:** This project is also a learning tool for improving the development process.
543-
544- ### When to Log
545-
546- Add entries to ` docs/WorkflowJournal.md ` when you observe:
547-
548- | Tag | When to Use |
549- | -----| -------------|
550- | ` [MANUAL] ` | User or agent did something by hand that could be scripted |
551- | ` [REPETITIVE] ` | Did something that's been done in other projects |
552- | ` [FRICTION] ` | Hit a snag, needed a workaround, or found unexpected complexity |
553- | ` [INSIGHT] ` | Learned something worth remembering for future projects |
554- | ` [DECISION] ` | Made a choice between alternatives (capture the reasoning) |
555-
556- ### Entry Format
557-
558- ``` markdown
559- ### YYYY-MM-DD HH: MM - [ TAG] Short title
560- ** Context:** What were you trying to do?
561- ** Action:** What did you actually do?
562- ** Time spent:** Estimate
563- ** Automation opportunity:** None | Low | Medium | High
564- ** Notes:** Any additional context
565- ```
566-
567- ### Examples of What to Capture
568-
569- ** Do log:**
570- - Creating a new file that follows a pattern from other projects
571- - Running a manual command that could be in a script
572- - Discovering a gotcha or workaround
573- - Choosing between libraries, approaches, or patterns
574- - Anything that took longer than expected
575-
576- ** Don't log:**
577- - Routine code edits
578- - Standard git operations
579- - Things already documented elsewhere
580-
581- ### Proactive Capture
582-
583- When completing a task, briefly consider:
584- 1 . Was any part of this manual when it could be automated?
585- 2 . Have I done this exact thing in another project?
586- 3 . Did I learn something that would help next time?
587-
588- If yes to any, add a journal entry before moving on.
589-
590- ---
591-
592- ## Related Workflow Documents
593-
594- | Document | Purpose |
595- | ----------| ---------|
596- | ` docs/Workflow.md ` | The playbook—how projects are started (template for future) |
597- | ` docs/WorkflowJournal.md ` | Real-time capture during this project |
598- | ` docs/PRD.md ` | Product requirements |
599- | ` docs/Agents.md ` | This file—agent instructions |
600-
601- The journal feeds insights back into the playbook. Over time, high-automation-opportunity items become scripts or templates.
602-
603- ---
604-
605- * Last updated: Phase 0 initialization*
511+ * Last updated: 2026-01-22*
0 commit comments