This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A Copier template that generates full-stack Django + React projects. The root contains copier.yml (template config) and template/ (the actual project scaffold). Files ending in .jinja are Copier templates rendered with variables from copier.yml.
To generate a project: copier copy . /path/to/new-project
copier.yml— template variables (project_name,project_slug,project_description,author_name,author_email,default_from_email) and post-copy taskstemplate/— all project files;.jinjasuffix files are rendered by Copier, plain files are copied as-is- Post-copy tasks: symlinks
CLAUDE.mdto.cursorrules, runsuv lock, installs frontend deps
Backend: Django 5.1 + Django Ninja (/api/v1/) + DBOS durable workflows
Frontend: React 19 + TypeScript + Vite + Tailwind CSS + shadcn/ui
Auth: django-allauth (headless) + @knowsuchagency/django-allauth React hooks
State: Zustand (client) + TanStack Query (server)
DB: SQLite (dev) / PostgreSQL (prod), configured via DATABASE_URL
Task runner: mise (mise.toml), Python via uv run, JS via bun
- Custom
Usermodel with UUID PK incore.models— all generated projects use this from the start - Django Ninja routers (not DRF) for API — auto-generates OpenAPI docs
- DBOS replaces Django-Q2/Celery for background tasks — runs in-process, no separate worker
- WhiteNoise serves static files; django-vite bridges Vite's dev server and production builds
WildcardCSRFMiddlewareincore/middleware.pyenables wildcard patterns inCSRF_TRUSTED_ORIGINS- React SPA served at
/app/, withspa_fallbackview catching sub-routes for client-side routing - Session-based auth (not JWT) — allauth headless mode with CSRF cookies
mise run runserver # Django (8000) + Vite (5173) concurrently
mise run test # Django unit tests (in-memory SQLite) + Playwright e2e
mise run format # ruff check --fix && ruff format
mise run migrate # ensure_pg_schema + migrate + createcachetable
mise run makemigrations
mise run createsuperuser <email> <password> [--username <name>]
mise run shell # Django shell
cd frontend && bun run dev # Vite dev server only- Backend:
uv run python manage.py test src.core.tests(SQLite in-memory) - Frontend e2e:
cd frontend && bun run test:e2e(Playwright — Chromium, Firefox, WebKit) mise run testruns both sequentially
Generated projects load env from .env.development or .env.production based on MISE_ENV. Key vars: DATABASE_URL, SECRET_KEY, DEBUG, ALLOWED_HOSTS, CSRF_TRUSTED_ORIGINS, REDIS_URL, DBOS_CONDUCTOR_KEY, X_API_KEY.
docker-compose.yml provides: backend (Granian), postgres, redis, migrations runner, cache table creator. Multi-stage Dockerfile builds frontend with bun then collects static files.
When modifying .jinja files, remember that {{ }} and {% %} are Copier/Jinja2 syntax — don't confuse with Django template tags (which only appear in .html files inside templates/). Copier variables are defined in copier.yml.