A minimal Python/FastAPI REST API skeleton for the Module 1 Task Tracker
learning project. This first pass exposes only a /health endpoint, organized
into a layered structure (routes / core / models / storage) so features can be
added cleanly later. CRUD, storage implementation, authentication, and a
frontend are intentionally out of scope for now.
- Python 3.10 or newer
- pip
task-tracker-api/
├── app/
│ ├── __init__.py
│ ├── main.py # App instance + router registration
│ ├── api/
│ │ ├── __init__.py
│ │ └── routes/
│ │ ├── __init__.py
│ │ └── health.py # GET /health router
│ ├── core/
│ │ ├── __init__.py
│ │ └── config.py # Settings loaded from environment / .env
│ ├── models/
│ │ ├── __init__.py
│ │ └── health.py # HealthResponse Pydantic model
│ └── storage/
│ └── .gitkeep # Placeholder for the future storage layer
├── tests/
│ └── __init__.py
├── .env # Local config (gitignored)
├── .env.example
├── .gitignore
├── README.md
└── requirements.txt
Create and activate a virtual environment, then install dependencies.
Linux / macOS (bash):
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtWindows (PowerShell):
python -m venv venv
.\venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txtAfter installing, run
pip freezeand confirm versions matchrequirements.txt.
From the project root:
uvicorn app.main:app --reload --port 8000Or use the built-in runner, which reads PORT / APP_ENV from .env:
python -m app.maincurl -i http://127.0.0.1:8000/healthExpected: an HTTP/1.1 200 OK status line and a JSON body like:
{ "status": "ok", "timestamp": "2026-07-10T12:34:56.789012+00:00" }With the server running, open the interactive Swagger UI:
http://127.0.0.1:8000/docs
ReDoc is at http://127.0.0.1:8000/redoc; the raw OpenAPI schema is at
http://127.0.0.1:8000/openapi.json.
| Variable | Default | Purpose |
|---|---|---|
PORT |
8000 |
Port used by python -m app.main |
APP_ENV |
development |
Enables auto-reload when development |
.env is gitignored; commit .env.example instead.