Skip to content

wasabina67/fastapi-react-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.