mayak
A FastAPI backend template for services that are built and maintained by coding agents.
Written for the hundredth change.
Most templates optimise for the first hour: they hand you a running app. mayak optimises for the hundredth change, made by someone — human or model — who was not there when the first hour happened.
That is a different problem. An agent editing a codebase it did not write has no memory of the decisions behind it, and no instinct for which mistakes this particular shape of project invites. So the template ships one worked vertical to copy from, a validation suite that fails on exactly those mistakes, and logs that can be read without grep gymnastics.
Its own gates are held to the same standard. Defects are injected on purpose to check that the checks actually catch them — a test suite that passes proves nothing until you know it can fail for the right reason.
- Use it as a template A GitHub template repository, not a dependency. You start from a copy and own it outright — there is no upstream to track and nothing to upgrade.
- One worked vertical A single feature carried end to end — route, service, storage, tests, logs — as the example every later feature is copied from, so an agent has a shape to match instead of a convention to infer.
- Gates that have been tested The validation suite is checked by injecting defects and confirming it stops them. A gate nobody has watched fail is a gate nobody knows works.
- Two agents, one source Claude Code and Codex are both supported, and their instruction files are generated from a single hand-written rules document rather than kept in step by hand.
What it is built on.
Python 3.13 and FastAPI, with PostgreSQL reached through psycopg at runtime — SQLAlchemy appears only as Alembic's metadata source, and is optional. The LLM client speaks the OpenAI-compatible API, so the model behind it is a configuration choice. Logging is semantic NDJSON.
- Python 3.13+ · FastAPI The runtime, kept deliberately ordinary — the template earns its keep in discipline, not in novelty.
- PostgreSQL via psycopg Direct at runtime; SQLAlchemy is Alembic's metadata source and nothing more.
- OpenAI-compatible client Any provider that speaks the API, chosen in configuration rather than in code.
- Semantic NDJSON logs Readable without grep gymnastics, which matters when the reader is a model with a context budget.
Lamantin AI