claude-code-py-ts-pg
CLAUDE.md1 starsChanged 5 months agoMITView on GitHub
Polyglot full-stack app: Python/FastAPI backend, TypeScript/React frontend, PostgreSQL in Docker. This file loads every session — keep it short. Language- and path-specific detail lives in .claude/rules/ and loads on demand. - Never edit the database schema by hand. Add an Alembic migration (make revision). - Never commit secrets. Config comes from env vars; .env is gitignored, .env.example is the contract. - Keep the API and web app decoupled — the only coupling is the HTTP contract in apps/web/src/api.ts. - Tests…
- Reads credentials
In this repository5 other files it gives its agents.
- db-migrateSkill
- db-resetSkill
- fastapiSkill
- new-migrationSkill
- supabase-postgres-best-practicesSkill
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 9
Start stack: make up · Stop: make down · Logs: make logs
- Very specific: line 10
Test everything: make test · Lint: make lint · Format: make fmt
- Very specific: line 24
Never edit the database schema by hand: Add an Alembic migration (make revision).
- Very specific: line 26
Keep the API and web app decoupled — the only coupling is the HTTP contract in apps/web/src/api.ts.
- Distinctive: line 28
Follow the branch → PR → review → squash-merge flow.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project conventions
Polyglot full-stack app: Python/FastAPI backend, TypeScript/React frontend,
PostgreSQL in Docker. This file loads every session — keep it short. Language- and
path-specific detail lives in .claude/rules/ and loads on demand.
Commands (always prefer the Makefile)
- Start stack:
make up· Stop:make down· Logs:make logs - Test everything:
make test· Lint:make lint· Format:make fmt - DB migrate:
make migrate· New migration:make revision m="msg"· Reset:make db-reset - Backend only:
make api-test,make api-lint - Frontend only:
make web-test,make web-lint
Architecture
apps/api— FastAPI service. Owns the database schema via Alembic migrations.apps/web— React + Vite SPA. Talks to the API over HTTP; never touches the DB directly.db— PostgreSQL 17, run through Docker Compose. Schema changes go through Alembic, never manual SQL.- The API is the single source of truth for data; the web app is a pure client.
Ground rules
- Never edit the database schema by hand. Add an Alembic migration (
make revision). - Never commit secrets. Config comes from env vars;
.envis gitignored,.env.exampleis the contract. - Keep the API and web app decoupled — the only coupling is the HTTP contract in
apps/web/src/api.ts. - Tests live next to the code they cover (
test_*.pyfor Python,*.test.tsxfor TS). - Follow the branch → PR → review → squash-merge flow; never push directly to
main. - Third-party skills are untrusted code: vet with
make skills-scanand seedocs/ecosystem.mdbefore adopting any.
When you touch...
- Python (
apps/api/**) → the Python rule loads automatically. Useuv,ruff, type hints. - TypeScript (
apps/web/**) → the TS rule loads. Named exports, strict mode, noany. - Migrations / SQL → the database rule loads. Reversible migrations only.
- Docker / compose → the docker rule loads.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

