A full-stack time tracking web app built with FastAPI, React, and SQLite. Organise your work into areas and projects, track time with a live timer, and review your productivity through a summary dashboard.
- Live timer — start and stop sessions with an optional note
- Organised structure — group projects under areas (e.g. Portfolio Building → SQL Workshop)
- Summary dashboard — total hours per project across all sessions
- Recent entries log — full history with timestamps and durations
- Auto-generated API docs — interactive Swagger UI at
/docs
| Layer | Technology |
|---|---|
| Backend | Python 3.11, FastAPI, Pydantic |
| Database | SQLite (via Python sqlite3) |
| Frontend | React 19, Vite 8 |
| API style | REST, JSON |
timetrack/ ├── backend/ │ ├── database.py # DB connection and initialisation │ ├── models.py # Pydantic request/response schemas │ └── routes.py # All API endpoints ├── frontend/ │ └── src/ │ ├── App.jsx # Main React component (timer, dashboard) │ ├── main.jsx # React entry point │ └── index.css # Global styles ├── docs/ # Screenshots for this README ├── main.py # FastAPI app, CORS, startup └── timetrack.db # SQLite database (git-ignored)
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/areas |
List all areas |
| POST | /api/areas |
Create an area |
| GET | /api/projects |
List all projects |
| POST | /api/projects |
Create a project |
| GET | /api/entries |
List all time entries |
| POST | /api/entries/start |
Start a timer |
| POST | /api/entries/{id}/stop |
Stop a running timer |
| GET | /api/summary |
Total hours per project |
Interactive docs available at http://localhost:8000/docs when running locally.
| Tool | Version |
|---|---|
| Python | 3.11+ |
| Node.js | 22.12+ |
| npm | 10+ |
git clone https://github.com/mqcapelle/timetrack.git
cd timetrack# Create and activate a conda environment
conda create -n timetrack python=3.11 -y
conda activate timetrack
# Install dependencies
pip install fastapi uvicorn pydantic
# Start the API server
uvicorn main:app --reload
# Running at http://localhost:8000
# Swagger UI at http://localhost:8000/docsOpen a second terminal:
cd frontend
npm install
npm run dev
# Running at http://localhost:5173Go to http://localhost:5173 in your browser.
- Create an area — e.g. "Portfolio Building" or "Job Applications"
- Create a project under that area — e.g. "SQL Workshop"
- Select the project in the Timer dropdown, add an optional note
- Click Start — the live timer begins
- Click Stop when done
- View totals in the Summary table and full history in Recent Entries
- Designing a REST API with FastAPI and Pydantic models
- Managing a relational SQLite database with foreign keys
- Building a React frontend with
useStateanduseEffecthooks - Connecting frontend and backend with
fetch()and handling CORS - Structuring a full-stack project for a clean GitHub portfolio


