Prerequisites
Before you begin, install the following tools:pnpm
The project uses pnpm as its package manager. Install with
npm install -g pnpm.Docker Desktop
The local Supabase stack runs inside Docker containers. Docker Desktop must be running before you start Supabase.
Supabase CLI
Manages local migrations and the local Supabase stack. Install with
brew install supabase/tap/supabase or npx supabase.The Supabase CLI is also available as a dev dependency (
supabase@^2.76.8) in this project. All pnpm supabase:* scripts invoke it directly through the local binary, so a global install is optional.Step-by-step setup
Copy environment variables
- macOS / Linux
- Windows PowerShell
env.example file already contains the correct NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY values for the local stack. You do not need to change them for basic development.See Environment variables for a full description of every variable.Start the local Supabase stack
Make sure Docker Desktop is running, then:This starts Postgres, the Auth server, Storage, Realtime, and the Supabase Studio UI. On first run it also applies all migrations from
supabase/migrations/ in sequence and seeds the database with supabase/seed.sql.Start the Next.js development server
Default local ports
| Service | Port | URL |
|---|---|---|
| Next.js app | 3000 | http://localhost:3000 |
| Supabase API (REST) | 54321 | http://localhost:54321 |
| Postgres database | 54322 | postgresql://postgres:postgres@localhost:54322/postgres |
| Supabase Studio | 54323 | http://localhost:54323 |
| Inbucket (email testing) | 54324 | http://localhost:54324 |
Managing the local stack
Creating a local admin user
After the stack is running you need a user account to sign in to the app.Create a user in Supabase Studio
Open http://localhost:54323 and go to Authentication → Users → Add user. Enter an email and password.Alternatively, sign up through the app at
http://localhost:3000/auth/sign-up.Assign the user to the default tenant
Open the Supabase Studio SQL editor and run:Replace
[email protected] with the email you registered.Running tests
Unit and integration tests
Sintesis uses Vitest for unit and integration tests.End-to-end tests
End-to-end tests use Playwright.Playwright tests expect the Next.js dev server and local Supabase stack to already be running on their default ports before you execute
pnpm test:e2e.Troubleshooting
Docker is not running
Docker is not running
pnpm supabase:start will fail with an error like Cannot connect to the Docker daemon. Open Docker Desktop and wait for it to finish starting before retrying.Port already in use
Port already in use
If port
54321, 54322, or 3000 is already occupied, stop whatever is using it or customise the ports in supabase/config.toml (for Supabase) or set PORT in your environment (for Next.js).To find what is using a port:Migrations fail during supabase:start
Migrations fail during supabase:start
If a migration throws an error, the stack will stop. Check the output for the failing migration file name. You can inspect the migration SQL in
supabase/migrations/ and apply a fix, then run pnpm db:reset to replay from scratch.Can't sign in — email not confirmed
Can't sign in — email not confirmed
By default the local Supabase Auth instance does not require email confirmation. If you see a confirmation prompt, go to Supabase Studio → Authentication → Users, find the user, and click Send magic link or manually set the
email_confirmed_at column:RLS errors — data not visible after sign-in
RLS errors — data not visible after sign-in
If you sign in but see no data, your user likely has no membership row for any tenant. Run the SQL from Creating a local admin user to add them to the default tenant.
supabase:start is very slow on first run
supabase:start is very slow on first run
The first run pulls several Docker images (Postgres, Kong, GoTrue, etc.). This can take several minutes on a slow connection. Subsequent starts are much faster because images are cached locally.
Next.js build errors mentioning Sentry
Next.js build errors mentioning Sentry
Sentry source map upload is only active on Vercel production builds (
VERCEL=1 and VERCEL_ENV=production). Local builds skip the Sentry webpack plugin entirely. If you see Sentry-related errors locally, ensure SENTRY_DSN is either empty or unset in .env.local.