Fullstack template at Komorebi AI: a React frontend (frontend/) paired with a
FastAPI backend (backend/). Use it as the starting point for technical tests,
experiments and apps.
Need only one half? Delete frontend/ or backend/ — or start from
python-template for a backend-only
project.
frontend/ React + TypeScript + Vite + MUI + TanStack Query → frontend/README.md
backend/ FastAPI + uv, ruff, ty, pytest → backend/README.md
compose.yaml, Makefile, .github/ full-stack glue
Requirements: Node 24 (see frontend/.nvmrc) and
uv.
make installLocal development, in two terminals:
make dev-backend # FastAPI with reload at http://localhost:7000
make dev-frontend # Vite with HMR at http://localhost:5173The Vite dev server proxies /api/* to the backend (stripping the prefix), so no CORS
configuration is needed. The example page shows the backend version and a mock
prediction round-trip.
Full stack in containers:
make up # docker compose up --build → http://localhost:8080nginx serves the built frontend and proxies /api to the backend container.
make test # frontend Vitest + backend pytest
make lint # ESLint/Prettier + ruff/tyCI runs path-filtered workflows: Frontend (lint, format, test, build), Backend (ruff, ty, pytest), Contract — boots the real backend and exercises the endpoints the frontend calls, so frontend/backend drift fails visibly — and Docker (builds both images and checks the same contract through nginx).
The frontend's typed endpoint wrappers (frontend/src/api/backend.ts) match
backend/app/api.py:
| Endpoint | Response | Used for |
|---|---|---|
GET /api/ |
{"app-api": "version ..."} |
status/version chip |
POST /api/predict |
{"input": n} → {"output": n} |
mock prediction demo |
GET /api/health |
{"status": "ok"} |
container healthchecks, CI |
Both proxies (Vite in dev, nginx in prod) strip the /api prefix before forwarding to
the backend. /health is the stable endpoint — keep it when replacing the example
endpoints, since the compose healthcheck and CI smoke tests rely on it.
- Use GitHub's "Use this template" (or clone and re-init git).
- Rename things:
frontend/package.jsonname,backend/Makefileimage name,backend/pyproject.tomlname and description. - Replace the example page and endpoints with your app. Keep the patterns:
typed API wrappers, useQuery/useMutation, the
/apiprefix convention, and the/healthendpoint the compose healthcheck and CI rely on.
Maintaining this template itself: backend/ is regenerated automatically, so changes
under it are overwritten — make them in our Python template instead.