Stack overview
The repo ships with two services indocker-compose.yml:
- web — Next.js 16 dashboard, port
3000 - server — Express API + workers, port
80
- Supabase project — database, auth, storage. You provide URL + keys.
Prerequisites
- Linux host with Docker 24+ and Docker Compose v2
- Open ports
80(API) and3000(web) — or front them with a reverse proxy - A Supabase project (free tier works fine)
- API keys for at least one AI provider (OpenAI, Anthropic, Google Gemini)
Steps
1
Clone the repo
2
Apply database migrations
Either use the Supabase CLI:Or paste each
.sql file in supabase/migrations/ into the Supabase SQL editor in order.3
Configure env files
4
Start the stack
http://localhost:3000, API on http://localhost.5
Create your first user
Open
http://localhost:3000/sign-up and register. The first user becomes org admin automatically.Production hardening
For a real deployment behind a domain (e.g.app.example.com + api.example.com):
- Front both services with Cloudflare (proxied) or Caddy/Nginx for HTTPS
- Use AWS Security Groups / firewall rules to restrict origin ports to known IPs
- Set
NEXT_PUBLIC_API_URL=https://api.example.comandALLOWED_ORIGINS=https://app.example.comaccordingly - Mount logs to a persistent volume or ship to a logging service
Updating to a new release
supabase/migrations/ run forward-only — re-running supabase db push is idempotent.
Splitting web and server across hosts
Common setup: web on Vercel, server + workers on a VM.- Don’t run
docker compose upfor web — deployweb/to Vercel directly via Git integration - On the VM, run only the server:
docker compose up -d server - In Vercel, set
NEXT_PUBLIC_API_URL=https://api.your-domain.com - In server’s env, set
ALLOWED_ORIGINS=https://your-vercel-domain.com
Continue: Supabase setup
Detailed Supabase project preparation (schema, RLS, triggers).