Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 728 Bytes

File metadata and controls

56 lines (37 loc) · 728 Bytes

fastapi-react-todo

FastAPI React Todo

Setup

Backend

cd backend
uv sync
uv run uvicorn app.main:app --reload

Backend runs on http://localhost:8000

Frontend

cd frontend
npm install
npm run dev

Frontend runs on http://localhost:5173

The Vite dev server proxies /api requests to the backend.

Type-Safe API

API calls are fully type-safe through the following flow:

Pydantic models → OpenAPI schema → TypeScript types

To regenerate TypeScript types from the OpenAPI schema (backend must be running):

cd frontend
npm run generate:api

The generated types are used by the openapi-fetch client.