A Scalable To-Do & Notification Backend built with FastAPI, Async SQLAlchemy, Celery, and Redis, featuring JWT authentication, task CRUD operations, and automated email reminders. Includes a complete CI pipeline with GitHub Actions.
- Backend Framework: FastAPI (async)
- Database: SQLite (via SQLAlchemy Async)
- Background Queue: Celery with Redis broker & result backend (Docker)
- Authentication: JWT (python-jose) + OAuth2 password flow
- Email Reminders: Celery tasks scheduling reminder emails (placeholder print)
- Environment Management: python-dotenv
- Testing: pytest, pytest-asyncio, httpx
- Lint & Formatting: flake8, Black, isort
- CI: GitHub Actions
-
User Management
- Register (
POST /auth/register) with JSON body (username,email,password) - Login (
POST /auth/token) with form data, returns JWT bearer token - Protected
GET /users/me
- Register (
-
Task Management
- Create Task (
POST /tasks):title,description,deadline,reminders(seconds before) - List Tasks (
GET /tasks) - Retrieve Task (
GET /tasks/{task_id}) - Update Task (
PATCH /tasks/{task_id}) - Delete Task (
DELETE /tasks/{task_id})
- Create Task (
-
Email Reminders
- Tasks accept multiple reminder offsets
- On creation/update, Celery schedules
send_reminder_emailfor each offset - Worker (with
--pool=soloon Windows) processes reminders and prints to console
-
Persistence & Migrations
- SQLAlchemy models:
User(withemail),Task(storesremindersas comma-separated string) app/init_db.pyto create tables
- SQLAlchemy models:
-
CI Pipeline
- Runs on push & pull_request to
main - Steps:
- Checkout code
- Setup Python 3.12
- Install dependencies (
requirements.txt) - Initialize DB
- Lint with flake8
- Format check with Black & isort
- Run tests (
pytest)
- Status badge in README
- Runs on push & pull_request to
-
Clone the repo
git clone https://github.com/SaulMor/quicktask-api.git cd quicktask-api -
Create & activate a virtual environment
python -m venv venv .\venv\Scripts\Activate.ps1 # Windows PowerShell # or source venv/bin/activate # Linux/macOS
-
Install dependencies
pip install --upgrade pip pip install -r requirements.txt
-
Initialize the database
python -m app.init_db
-
Start Redis (Docker)
docker run -d --name quicktask-redis -p 6379:6379 redis:latest
-
Run Celery worker
python -m celery -A app.celery_app worker --pool=solo --loglevel=info
-
Run the API server
uvicorn app.main:app --reload
-
Explore
- Open Swagger UI: http://127.0.0.1:8000/docs
- Register, obtain token, authorize, and exercise task endpoints
pytest- GitHub Actions workflow located at
.github/workflows/ci.yml - Status badge:

- Integrate real email sending (SMTP, AWS SES)
- Add Docker Compose for full stack (API + Redis + worker)
- Deploy to cloud (AWS ECS/Fargate, DigitalOcean)
- Add code coverage reporting (Codecov)
- Implement database migrations (Alembic)
- Improve error handling & logging