CrabStack docs
A NestJS backend (PostgreSQL via Knex), a Next.js 16 frontend, and one REST + OpenAPI contract tying them together.
New here? Start with Getting Started. It takes you from a fresh clone to a running app, your first sign-in, admin rights and a first feature built with your AI coding agent.
What this template is and what it deliberately leaves out are in the README.
The pages
- Getting Started - install, configure, run, sign in, become admin, and build a first module with your agent.
- Architecture - how the two halves connect, the module layout on both sides, the REST surface, guards, worker recovery, and what account deletion erases.
- Auth Flow - OAuth and magic-link sign-in, session validation, and how Server Components and Server Actions get a session.
- Teams and Workspaces - personal and shared workspaces, owner/admin/member roles, email invites, and how to scope a new resource to a workspace.
- Adding a Module - the full walkthrough for a new feature module, migration through typed frontend page.
- Recipes - checklists for the most common changes: a field, a page, a gated feature, a backoffice screen, an email, a rebrand.
- Testing - what
./verify.shruns, unit and integration specs, and the guard specs a change can trip. - Troubleshooting - common errors, each with its cause and fix.
- Admin MCP Server - the AI-agent interface to a deployed app, plus the OAuth flow browser-based clients need.
- Email - the two send paths: synchronous magic links and the backend queue.
- Billing - Stripe checkout, the webhook state machine, entitlement gating, and swapping in another processor.
- Environment Variables - every variable both halves read, and which ones fail boot.
- Deployment - VPS or any host, with a pre-launch checklist.
- Updating from upstream - merging new template releases into your app, conflicts and migrations included.
- Glossary - the terms the docs and code use, with links.
For AI coding agents
These files are written for the agent doing the work, and are worth a human read too:
- AGENTS.md - the task router: which doc and which reference code to read for each common change, and what fails if it goes wrong. The root CLAUDE.md imports it so Claude Code loads it too.
- backend/CLAUDE.md and frontend/CLAUDE.md - the conventions and commands for each half.
- The new-module skill - scaffolds a feature module end to end. Any agent can follow it as a plain file.
Read the changelog before a git merge upstream: it carries the changes that merge cleanly and then behave
differently. Updating from upstream is
the whole procedure.