Contributing

Get Dictumal running from the repo root and start contributing.

Quick Setup

  1. Use Node 20 with nvm use || nvm install.
  2. Run npm run bootstrap.
  3. Use npm run bootstrap:deps when you only need dependencies and tests.
  4. 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_KEY for AI features
  • DIGITALOCEAN_API_TOKEN only for deployment flows

Key Files

  • src/lib/db.ts - Prisma client and DB access helpers
  • src/lib/auth.ts - NextAuth configuration
  • src/lib/require-auth.ts - session guard for protected routes
  • src/app/api/auth/[...nextauth]/route.ts - auth route entry point
  • prisma/schema.prisma - data model and migrations

Useful Commands

CommandDescription
npm run bootstrapFull workstation setup, env pull, and checks
npm run bootstrap:depsTest-only setup for fresh worktrees
npm run workstation:syncAfter-pull update routine
npm run local-db:upStart the standardized local Postgres container
npm run db:repair:localApply and verify local migrations
npm run db:doctor:localCheck local schema and migration health
npm testRun the Vitest suite
npm run buildBuild the production app

Environment Variables

VariablePurpose
DATABASE_URLPostgreSQL connection string
AUTH_URLBase URL used by NextAuth v5
AUTH_SECRETSession signing secret used by NextAuth v5
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRETGoogle OAuth client credentials
OPENROUTER_API_KEYAI provider key
DIGITALOCEAN_API_TOKENRequired only for deployment and droplet workflows