This project is a Pomodoro timer and task management system built with FastAPI.
It provides a backend for managing tasks, starting and closing Pomodoro sessions, and tracking overall productivity statistics.
The project was developed as part of the university course Specialized Software Tools.
- Task management: create, retrieve, update, and delete tasks.
- Pomodoro sessions: start and close Pomodoro timers linked to tasks.
- Validation rules:
- Only one active Pomodoro timer per task.
- Maximum Pomodoro length: 25 minutes.
- Statistics:
- Total time spent on tasks.
- Number of finished Pomodoro sessions per task.
- Interactive API documentation with Swagger (
/docs) and ReDoc (/redoc).
-
Clone the repository:
git clone https://github.com/dvvvjula/pomodoro-fastapi.git cd pomodoro-task-api -
Install dependencies:
pip install -r requirements.txt
-
Run the server:
uvicorn main:app --reload
-
Open in browser:
- Swagger UI: http://127.0.0.1:8000/docs
- ReDoc: http://127.0.0.1:8000/redoc
- POST /pomodoro → Create a new Pomodoro timer for a given task
- POST /pomodoro/{task_id}/stop → Stop and close the Pomodoro timer for the task
- GET /pomodoro/stats → Show statistics (total time spent, finished sessions per task)
- GET /tasks → Get tasks filtered by status
- POST /tasks → Create a new task
- GET /tasks/{task_id} → Retrieve task by ID
- PUT /tasks/{task_id} → Update task details
- DELETE /tasks/{task_id} → Delete task
TO-DO/
│
├── src/
│ ├── common/ # Models and exceptions
│ │ ├── exceptions.py # Custom exceptions
│ │ ├── models.py # Data models (Pomodoro, Task)
│ │ ├── status.py # Task status definitions
│ │ └── __init__.py
│ │
│ ├── modules/ # Core business logic
│ │ ├── pomodoro_operations.py # PomodoroManager logic
│ │ ├── task_operations.py # TaskManager logic
│ │ └── __init__.py
│ │
│ ├── routers/ # API routers (endpoints)
│ │ ├── routers_pomodoro.py # Endpoints for Pomodoro
│ │ ├── routers_tasks.py # Endpoints for Tasks
│ │ └── __init__.py
│ │
│ └── main.py # FastAPI entry point
│
├── requirements.txt # Project dependencies
└── README.md # Project description