Skip to content

feat: add python react starter - #2

Merged
anish-sahoo merged 6 commits into
mainfrom
feat/starter
Oct 20, 2026
Merged

anish-sahoo merged 6 commits into
mainfrom
feat/starter

Conversation

@anish-sahoo

Copy link
Copy Markdown
Contributor

Starter template for teams: React + Vite frontend, FastAPI backend, Postgres, all run through Docker Compose and mise.

  • mise.toml pins Node, pnpm, Python, uv and ruff, and holds every task (dev, check, db:*, client:generate, deploy:check)
  • Backend: async FastAPI and SQLAlchemy with psycopg 3, Alembic, pydantic settings, mypy --strict. Routes live under /api/v1, with /health (no DB, never blocked) and /notes
  • Code is split into routes/, models/, schemas/ and core/, so new resources follow the notes example
  • Logging adds a request id to every line: text locally, JSON when deployed, uvicorn logs included. A shared httpx.AsyncClient is available as HttpClientDep
  • One notes table. The first migration seeds example rows, and db:revision autogenerates migrations from models (it skips empty ones)
  • backend/openapi.json is the contract. The frontend client is generated from it with hey-api and committed
  • compose.yaml is the deployed stack, with nginx serving the build and proxying /api. compose.override.yaml adds local hot reload
  • CI runs 4 jobs via jdx/mise-action: lint+typecheck and format for each side. The lint jobs also fail if the contract or generated client is stale
  • AGENTS.md (CLAUDE.md symlinks to it) and .agents/rules/ hold short code-cleanliness rules

- messages example with the same API, operationIds and schemas
- plain SQL migrations generated from SQLAlchemy models and applied by dbmate
- flatter layout: config, middleware, models, routes, schemas
- stdlib logging with rich, no lifespan, no served docs pages
- frontend matches the typescript starter, client is gitignored
- same mise tasks and CI jobs as the other starters
- add a short docs/ARCHITECTURE.md with the request flow
- health no longer queries the database
- rename stack:dev:* to docker:dev:*
- fold db:dev:down into db:dev:stop, which keeps the data
- make func-style a lint warning
- force colors for tasks, since mise pipes their output
- print one colored line per log record instead of RichHandler columns
- drop the logger name from log lines
- rename db:dev:start and db:dev:stop to db:dev:up and db:dev:down
@anish-sahoo
anish-sahoo merged commit f534358 into main Oct 20, 2026
5 checks passed
@anish-sahoo
anish-sahoo deleted the feat/starter branch October 20, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant