backend/— FastAPI API:app/routes/(HTTP),app/services/(rules),app/dao/(Postgres via SQLAlchemy, in-memory fallback, DB session). Settings live inapp/config.py; API body/response models inapp/routes/schemas.py.frontend/— Next.js App Router, Tailwind CSS, TanStack Query.
With PostgreSQL configured, tables are created on API startup (create_all). No migration tool.
- Python 3.11+
- Node 20+
- PostgreSQL only if you set
DATABASE_URL(otherwise in-memory mode)
cd backend
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
cp .env.example .env
# Optional: set DATABASE_URL for Postgres; omit it to use in-memory storage.
uvicorn app.main:app --reloadAPI: http://localhost:8000 — docs at /docs, health at /health.
cd frontend
cp .env.local.example .env.local # optional; defaults to http://localhost:8000
npm install
npm run devIf you see a broken Turbopack or .next error, run npm run clean in frontend/, then npm run dev again.
Copy backend/.env.example to backend/.env. To use Postgres, set DATABASE_URL, for example:
postgresql+psycopg://namanrusia:YOUR_PASSWORD@localhost:5432/todo_app
GET /health includes "storage": "memory" or "storage": "postgres".