TaskFlow Intelligence is a project I created to explore what a modern, scalable API should look like. It's not just another “to-do list,” but a fully containerized ecosystem combining a fast API, background workflows, and a bit of machine learning.
I spent some time making sure the architecture was clean (separation of service and model) and that the asynchronous parts really made sense.
- ⚡ Blazing Fast API: Built with FastAPI, handling CRUD for tasks with full Pydantic validation.
- ⚙️ Async Background Workers: Using Celery and Redis to handle heavy stuff (like fetching and parsing external user data) without blocking the main API thread.
- 🧠 Built-in ML Predictor: A scikit-learn model that lives inside the app. It analyzes your task descriptions and automatically guesses if the priority is High or Low.
- 📦 Docker-Ready: One command, and the whole infrastructure (App + Worker + Redis) is alive.
- 🧪 Solid Testing: Covered with unit tests for the core API endpoints.
The easiest way to see this in action is using Docker Compose. Make sure you have Docker running!
-
Spin up the containers:
docker compose up --build
-
Access the docs: Go to http://localhost:8080/docs. This is where you can play with the API.
| Endpoint | Method | What it does? |
|---|---|---|
/tasks |
GET |
Get all your tasks |
/tasks |
POST |
Create a new one |
/tasks/{id} |
PUT/DELETE |
Update or remove a task |
/tasks/parse-users-list |
POST |
Trigger background parsing (Celery magic) |
/predict |
POST |
Let the AI guess your task priority |
If you want to re-train the model or play with the data:
- Data lives in
data/train_data.csv. - Run the training script:
python -m src.ml.train
- The new
model.joblibwill be picked up by the API automatically.
├── src/
│ ├── api/ # Dependencies and API logic
│ ├── models/ # Pydantic schemas (the blueprints)
│ ├── services/ # Business logic (the brain)
│ ├── ml/ # Training scripts and Predictor
│ └── worker/ # Celery configuration and tasks
├── tests/ # Pytest suite
├── data/ # Storage for CSVs and ML models
└── docker-compose.yml
Made with love for clean code ☕️ (Only ReadMe in project was generated by AI)