backend/: FastAPI app (backend/app), Alembic migrations, andbackend/tests(pytest). Config lives inbackend/.envanddraft.yamlat repo root.frontend/: React + Vite + TypeScript app infrontend/srcwith Tailwind/shadcn UI.scripts/: helper scripts;run.pyboots all services..draft/: worktrees, logs, and evidence (generated).
make setup: createbackend/venvand install backend + frontend deps.make runor./run.py: start Redis, FastAPI, Celery worker, and Vite dev server.make dev-backend/make dev-worker/make dev-frontend/make redis: run services manually.make db-migrate: apply Alembic migrations.make lint/make format: run ruff + ESLint/Prettier.- Frontend build/preview:
cd frontend && npm run build/npm run preview.
- Python: ruff for lint + format, 88-char lines, double quotes, sorted imports. Prefer type hints and clear docstrings.
- TypeScript/React: ESLint + Prettier. Components in
PascalCase, hooks inuseX, files inPascalCase.tsxorcamelCase.tsas appropriate. - Paths: keep backend modules under
backend/app, tests underbackend/tests.
- Backend uses pytest. Run all tests:
cd backend && pytest tests -v. - Integration tests require Redis and are marked
-m integration. - Tests live in
backend/testsand followtest_*.pynaming.
- Git history shows no strict convention. Use short, imperative summaries (e.g., “Fix planner transition guard”), optionally prefixed with area (
backend:,frontend:). - PRs should include: a clear description, linked issues/tickets, and screenshots for UI changes. Note any migrations or config updates.
- Set backend environment variables in
backend/.env(seebackend/ENV_SETUP.md). - Verification commands run from
draft.yaml; keep them repo-root safe (e.g.,cd backend && pytest tests -v).