Contributing
Get Dictumal running from the repo root and start contributing.
Quick Setup
- Use Node 20 with
nvm use || nvm install. - Run
npm run bootstrap. - Use
npm run bootstrap:depswhen you only need dependencies and tests. - Start the app with
npm run dev.
The app now lives at the repository root. Main code is in src/app, src/components, src/lib, and prisma.
What You Need
- Node 20.x and npm 10+
- PostgreSQL only if you run local Prisma workflows
- Google OAuth credentials if you need local auth
OPENROUTER_API_KEYfor AI featuresDIGITALOCEAN_API_TOKENonly for deployment flows
Key Files
src/lib/db.ts- Prisma client and DB access helperssrc/lib/auth.ts- NextAuth configurationsrc/lib/require-auth.ts- session guard for protected routessrc/app/api/auth/[...nextauth]/route.ts- auth route entry pointprisma/schema.prisma- data model and migrations
Useful Commands
| Command | Description |
|---|---|
npm run bootstrap | Full workstation setup, env pull, and checks |
npm run bootstrap:deps | Test-only setup for fresh worktrees |
npm run workstation:sync | After-pull update routine |
npm run local-db:up | Start the standardized local Postgres container |
npm run db:repair:local | Apply and verify local migrations |
npm run db:doctor:local | Check local schema and migration health |
npm test | Run the Vitest suite |
npm run build | Build the production app |
Environment Variables
| Variable | Purpose |
|---|---|
DATABASE_URL | PostgreSQL connection string |
AUTH_URL | Base URL used by NextAuth v5 |
AUTH_SECRET | Session signing secret used by NextAuth v5 |
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET | Google OAuth client credentials |
OPENROUTER_API_KEY | AI provider key |
DIGITALOCEAN_API_TOKEN | Required only for deployment and droplet workflows |