Run the full Todo application (backend + frontend). Use when: starting the dev environment, launching the API and UI together, setting up for local development, running the FastAPI backend or the React Vite frontend, starting the app from scratch.
Starts the FastAPI backend and React/Vite frontend for local development.
localhost:1433 with database todo_dbapi/Check both .env files exist. If missing, copy from the examples:
# Backend
if (!(Test-Path api/.env)) { Copy-Item api/.env.example api/.env }
# Frontend
if (!(Test-Path web/.env)) { Copy-Item web/.env.example web/.env }
Edit api/.env to confirm DB_HOST and DB_NAME match your SQL Server instance.
Ensure the schema is current before starting the API:
cd api
alembic upgrade head
cd ..
Open a terminal, activate the virtual environment, and launch Uvicorn:
cd api
.\.venv\Scripts\Activate.ps1 # Windows — adjust path if venv is elsewhere
uvicorn app.main:app --reload
Open a second terminal and start Vite:
cd web
npm install # only needed on first run or after dependency changes
npm run dev
/api/* → http://localhost:8000 automaticallyhttp://localhost:8000/health returns {"status": "ok"}http://localhost:5173 loads the Todo UI without errorsPress Ctrl+C in each terminal window.
| Symptom | Fix |
|---|---|
uvicorn: command not found | Activate the virtual environment first |
ODBC Driver not found | Install ODBC Driver 17 for SQL Server |
Connection refused on port 1433 | Start SQL Server service |
alembic: command not found | Activate the virtual environment first |
| Blank frontend with API errors | Check CORS_ORIGINS in api/.env includes http://localhost:5173 |
npm: command not found | Install Node.js 18+ |