Open-source legal/document-processing AI assistant.
frontend/— Next.js 16 (React 19) app, deployable to Cloudflare via OpenNext.backend/— Express API (TypeScript). Drizzle ORM over Postgres.backend/drizzle/— Drizzle migration files (authoritative schema).backend/migrations/000_one_shot_schema.sql— deprecated legacy Supabase schema, kept for historical reference only.
docker compose up -d
cd backend && npm install && npm run db:migrate
cd ../frontend && npm install
# copy env templates and generate AUTH_SECRET — see runbook below
cd ../backend && npm run dev # terminal 1
cd ../frontend && npm run dev # terminal 2Then open http://localhost:3000.
docker compose up -d brings up MinIO alongside Postgres. The mike bucket is auto-created on first run by the minio-init sidecar.
- S3 API: http://localhost:9000 — what the backend talks to via the
R2_*env vars. - Web console: http://localhost:9001 — login
minioadmin/minioadmin.
In production these env vars point at Cloudflare R2 (or any other S3-compatible provider). The same backend/src/lib/storage.ts code path is used in both environments.
- Local development — first-run setup and everyday workflow.
- Schema changes — Drizzle migrations.
- Architecture — request flow and where things live.
- Troubleshooting — common errors and fixes.
- Deferred items — known follow-ups and tech debt.
- ADRs — architecture decision records.
npm run build --prefix backend
npm run build --prefix frontend
npm run lint --prefix frontendAGPL-3.0-only. See LICENSE.