Notes API
I built a CRUD Notes API with FastAPI and SQLite to test how well Codex handles structured development tasks. The experiment: treat it like a junior engineer with small, clear tickets and validate every output.
Source: github.com/brianhliou/notes-api
Interactive API documentation showing all CRUD endpoints
Why I Tried This
I wanted to see how far Codex could go if I treated it like a junior engineer. Instead of hand-coding, I broke the work into small tickets, gave them to Codex, and validated the output step by step.
The experiment: build a minimal Notes API with FastAPI, SQLModel, Alembic, and SQLite.
The Setup
- Stack: FastAPI + SQLModel + Alembic + SQLite
- Process: task → Codex output → immediate validation (run server, hit endpoint, check DB)
- Scope: CRUD notes API with seed script, JSONL import/export, Makefile tasks, and OpenAPI docs
FastAPI server running with automatic OpenAPI documentation
The Build Loop
Codex handled most tasks smoothly:
- Scaffold: created project structure and
/healthendpoint. - CRUD: generated models, routes, and JSON responses that worked out of the box.
- Seed + import/export: scripted NDJSON seeding and endpoints with little intervention.
- Tooling: added linting, typing, and Makefile targets cleanly.
The rhythm was consistent: generate, run, fix minor details. Codex excelled when the task matched familiar patterns.
Where It Struggled
One step broke the flow: Alembic migrations. Codex generated migration files, but the system needs exact scaffolding and environment wiring. Without alembic init, proper import paths, and a real database directory, the process failed.
Lesson: Codex can mimic “what the files should look like,” but tooling requires precise hooks and environment setup that don’t live in code alone.
Takeaways
- Codex is strong at boilerplate and patterns.
- Codex needed more guidance on tooling and glue (env paths, configs, scaffolds).
- Best workflow: treat Codex like a junior developer—assign tasks, validate output, debug the edges.
Final Result
After a few corrections, the Notes API runs end-to-end with CRUD, seeding, migrations, and docs. Most of the code came from Codex; the key interventions were mine.