Imported from ericshark/full-stack-starter (
AGENTS.md). Install upstream withnpx skills add ericshark/full-stack-starter. Copyright stays with the author.
Agent Guidelines
This file defines the shared instructions for coding agents working in this repository.
Project
Full-stack application using:
- Next.js 16 and React 19
- TypeScript and Tailwind CSS v4
- FastAPI and Python 3.12+
- SQLModel, Pydantic, and Alembic
- PostgreSQL
- Vitest, Testing Library, Pytest, Ruff, and Mypy
Important locations:
backend/app/api/— versioned API routesbackend/app/models/— SQLModel database tablesbackend/app/schemas/— API request and response schemasbackend/app/core/— settings, security, and database configurationbackend/alembic/— database migrationsbackend/tests/— backend testsfrontend/src/app/— App Router routes and layoutsfrontend/src/components/— application componentsfrontend/src/lib/— shared utilities and typed API clientfrontend/tests/— frontend testsdocs/— architecture and subsystem documentation
Commands
Use the Makefile from the repository root as the primary command interface.
make setup— install dependencies, create.env, and generate API typesmake dev— start the development stackmake docker-init— initialize Docker services, migrations, and seed datamake codegen— regenerate TypeScript types from the backend OpenAPI schemamake lint— run Ruff and ESLintmake typecheck— run Mypy and TypeScript checksmake test— run Pytest and Vitestmake check— run linting, type checking, and testsmake db-migrate— apply pending database migrationsmake db-seed— seed demo data
For focused work, use uv run <tool> from backend/ and npm run <script> from frontend/.
API and database changes
When changing a FastAPI route, model, or schema, run make codegen and use the typed client in frontend/src/lib/api.ts rather than handwritten API interfaces or untyped fetch calls.
When changing a database model, create and inspect an Alembic migration before running make db-migrate. Keep database models, API schemas, and route responsibilities in their respective directories.
Frontend components
Reuse existing components and UI primitives before creating new ones. Use the existing cn(...) utility for conditional Tailwind class composition.
Testing
Add or update tests when introducing or changing meaningful behavior. Test observable behavior rather than implementation details. Do not weaken, remove, or bypass tests merely to make verification pass.
Documentation
Use docs/ for persistent architectural and subsystem knowledge. Before modifying a subsystem, check for relevant documentation there. When a change materially alters architecture, data flow, public APIs, important invariants, setup, or behavior that future developers or agents need to understand, update the relevant existing documentation. Create a new document only for a substantial new subsystem or concept that does not fit existing documentation. Do not document trivial implementation changes, routine bug fixes, or information already obvious from the code.
Change tracking
After a non-trivial change (new feature, bug fix, schema change, or a real design decision — not renames, formatting, or refactors with no behavior change), append one line to docs/CHANGES.md:
date — summary — files — status — follow-up (if any)
Trivial changes: skip silently, no log, no comment.