Skip to content

dvvvjula/pomodoro-fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pomodoro & Task Management API

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.


Features

  • 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).

Technologies

  • FastAPI – web framework for building APIs
  • Uvicorn – ASGI server
  • Python 3.10+

Installation & Setup

  1. Clone the repository:

    git clone https://github.com/dvvvjula/pomodoro-fastapi.git
    cd pomodoro-task-api
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Run the server:

    uvicorn main:app --reload
  4. Open in browser:

📌 API Endpoints

image image

Pomodoro

  • 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)

Tasks

  • 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

Project Structure

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
image

About

Pomodoro timer and task management backend built with FastAPI, for managing tasks, tracking Pomodoro sessions, and monitoring productivity.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages