@@ -296,6 +296,24 @@ AgentOps requires several external services. Here's how to set them up:
296296
297297### Supabase (Required)
298298
299+ ** Option A: Local Development (Recommended)**
300+
301+ 1 . Install Supabase CLI: ` brew install supabase/tap/supabase ` (or see [ docs] ( https://supabase.com/docs/guides/cli ) )
302+ 2 . Initialize and start Supabase locally:
303+ ``` bash
304+ cd app # Make sure you're in the app directory
305+ supabase init
306+ supabase start
307+ ```
308+ 3 . The local Supabase will provide connection details. Update your ` .env ` files with:
309+ ```
310+ SUPABASE_URL=http://127.0.0.1:54321
311+ SUPABASE_KEY=<anon-key-from-supabase-start-output>
312+ ```
313+ 4 . Run migrations: ` supabase db push `
314+
315+ ** Option B: Cloud Supabase**
316+
2993171 . Create a new project at [ supabase.com] ( https://supabase.com )
3003182 . Go to Settings → API to get your keys
3013193 . Update your ` .env ` files with:
@@ -319,7 +337,25 @@ AgentOps requires several external services. Here's how to set them up:
319337### PostgreSQL (Required)
320338
321339Configure direct PostgreSQL connection:
322- 1 . Use your Supabase PostgreSQL connection details
340+
341+ ** For Local Supabase:**
342+ ```
343+ POSTGRES_HOST=127.0.0.1
344+ POSTGRES_PORT=54322 # Note: Different port than Supabase API
345+ POSTGRES_USER=postgres
346+ POSTGRES_PASSWORD=postgres
347+ POSTGRES_DATABASE=postgres
348+
349+ # Also add these for SQLAlchemy connections:
350+ SUPABASE_HOST=127.0.0.1
351+ SUPABASE_PORT=54322
352+ SUPABASE_USER=postgres
353+ SUPABASE_PASSWORD=postgres
354+ SUPABASE_DATABASE=postgres
355+ ```
356+
357+ ** For Cloud Supabase:**
358+ 1 . Use your Supabase PostgreSQL connection details from Settings → Database
3233592 . Update your ` .env ` files with:
324360 ```
325361 POSTGRES_HOST=your-supabase-host
@@ -391,6 +427,51 @@ bun run lint
391427bun run format
392428```
393429
430+ ## 🔍 Troubleshooting
431+
432+ ### Authentication Issues
433+
434+ ** Problem: Login succeeds but immediately redirects back to login page**
435+
436+ This is usually caused by cookie configuration issues between the frontend and backend.
437+
438+ ** Solutions:**
439+
440+ 1 . ** Check your environment URLs** : Ensure ` NEXT_PUBLIC_API_URL ` in dashboard points to your API server:
441+ ``` bash
442+ # dashboard/.env.local
443+ NEXT_PUBLIC_API_URL=http://localhost:8000 # For local development
444+ ```
445+
446+ 2 . ** Verify JWT secret** : Make sure ` JWT_SECRET_KEY ` is set in your API ` .env ` :
447+ ``` bash
448+ # api/.env
449+ JWT_SECRET_KEY=your-secret-key-at-least-32-chars
450+ ```
451+
452+ 3 . ** For local development with different ports** : The API automatically adjusts cookie settings for localhost. No manual configuration needed.
453+
454+ 4 . ** For production or custom domains** : Ensure your API and dashboard share the same root domain for cookies to work.
455+
456+ ### Database Connection Issues
457+
458+ ** Problem: SQLAlchemy connection errors**
459+
460+ Ensure all Supabase database variables are set in ` api/.env ` :
461+ ``` bash
462+ SUPABASE_HOST=127.0.0.1 # For local Supabase
463+ SUPABASE_PORT=54322 # Note: Different from API port
464+ SUPABASE_USER=postgres
465+ SUPABASE_PASSWORD=postgres
466+ SUPABASE_DATABASE=postgres
467+ ```
468+
469+ ### Supabase Seed Data Issues
470+
471+ ** Problem: Duplicate key or missing table errors during ` supabase start ` **
472+
473+ The seed.sql file may have issues. You can temporarily comment out problematic inserts or check if migrations are missing.
474+
394475## 📦 Production Deployment
395476
396477### Using Docker Compose
0 commit comments