- docs/README.md: navigation hub - docs/architecture.md: system overview, tech stack, data flows, ports - docs/backend/: supabase-core, schema, rpcs, rls, seed, docker - docs/frontend/: app-structure, screens, api-client - docs/next-steps.md: Phase 2/3/4 plan + open decisions - Fix README demo-account emails to match the actual seed Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
3.9 KiB
3.9 KiB
Supabase Core — Local Stack
The Supabase core is a set of Docker containers managed by the Supabase CLI
(installed as a root devDependency — npx supabase works out of the box). It is
the "main docker" of the project.
Containers
supabase start brings up the full local stack (project id Convivo):
| Container | Image | Role |
|---|---|---|
supabase_db_Convivo |
supabase/postgres:17 |
Postgres 17 — schema, RLS, RPCs, data |
supabase_auth_Convivo |
supabase/gotrue |
Auth (QR + email login) |
supabase_rest_Convivo |
supabase/postgrest |
REST API over Postgres (tables + RPCs) |
supabase_realtime_Convivo |
supabase/realtime |
WebSocket realtime (leaderboard) |
supabase_storage_Convivo |
supabase/storage-api |
Storage (unused in v1) |
supabase_kong_Convivo |
supabase/kong |
API gateway — fronts everything on one port |
supabase_studio_Convivo |
supabase/studio |
Web UI (Studio) |
supabase_inbucket_Convivo |
supabase/mailpit |
Captures emails (none sent in this flow) |
supabase_pg_meta_Convivo |
supabase/postgres-meta |
Metadata API (used by Studio) |
supabase_edge_runtime_Convivo |
supabase/edge-runtime |
Edge functions (unused in v1) |
supabase_vector_Convivo |
supabase/vector |
Log shipping |
supabase_analytics_Convivo |
supabase/logflare |
Analytics |
All containers share the external Docker network supabase_network_Convivo
(named supabase_network_<project_id>). The app sidecar joins this network — see
docker.md.
Ports
| Service | Host port | Container port | Notes |
|---|---|---|---|
| API (Kong) | 54321 | 8000 | The single gateway the app proxies to. Inside the network, Kong is on 8000 — the 54321→8000 mapping is host-only. |
| Studio | 54323 | 3000 | UI — login postgres / postgres |
| Postgres | 54322 | 5432 | Direct DB — postgres / postgres |
| SMTP (Mailpit) | 54324 | 8025 | Captures emails |
| Analytics | 54327 | 4000 | Logflare |
Gotcha: from inside the shared network (e.g. the app container), reach Kong at
supabase_kong_Convivo:8000, not:54321. The54321port only exists on the host. This is why the app's nginx proxies tosupabase_kong_Convivo:8000by default.
How to run
# Start the core (creates containers + the supabase_network_Convivo network)
npm run db:start # = supabase start
# (Re)apply migrations + seed, then restart the stack
npm run db:reset # = supabase db reset (NOT `supabase reset`)
# Stop the core
npm run db:stop # = supabase stop
# Show status / URLs / keys
npx supabase status
db:resetdrops and recreates the database, appliesmigrations/20260822000000_init.sql, then runsseed.sql. Use it any time you want a clean demo state.- Migrations and seed are idempotent (
on conflict ... do nothing), so a reset is safe to repeat.
Config highlights (supabase/config.toml)
| Setting | Value | Why |
|---|---|---|
project_id |
Convivo |
Names the Docker network + containers |
[api] port |
54321 |
Kong gateway port |
[db] port |
54322 |
Postgres port |
[studio] port |
54323 |
Studio port |
[auth.email] enable_confirmations |
false |
No email is sent — the QR+email login never emails the user |
[auth] site_url |
http://127.0.0.1:3000 |
The app origin |
[db.seed] sql_paths |
["./seed.sql"] |
Seed runs on reset |
Keys
| Key | Value | Where it's used |
|---|---|---|
| Anon key | standard local anon JWT (see apps/convivo/.env.example) |
Ships in the app (public by design) |
| Service-role key | standard local service-role JWT | Never in the app — server-side only (used for admin ops / verification) |
The app's security model (anon key + session JWT + RLS) is documented in rls.md.