Skip to content

Latest commit

ย 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

FastAPI Tasks โ€” Production-Ready Task Management API ๐Ÿš€

FastAPI + PostgreSQL + JWT Authentication + Docker โ€” The complete task management REST API for your next project.

Python FastAPI PostgreSQL Docker Tests


๐Ÿ“‹ Overview

FastAPI Tasks is a production-ready task management REST API built with modern Python technologies. It provides secure user authentication, complete CRUD operations for tasks, advanced filtering with pagination, and is fully containerized with Docker.

Whether you're building a SaaS product, learning FastAPI, or need a backend for your task management app โ€” this is the perfect starting point.


โœจ Key Features

Feature Description
๐Ÿ” JWT Authentication Secure registration, login, and token-based auth
๐Ÿ“ Task CRUD Create, read, update, and delete tasks
๐Ÿ” Advanced Filtering Filter by status, priority, and search keywords
๐Ÿ“„ Pagination Page-based pagination for large datasets
๐Ÿ˜ Async PostgreSQL High-performance async SQLAlchemy ORM
๐Ÿณ Docker Ready Full Docker Compose setup with DB & Redis
๐Ÿงช Test Coverage Comprehensive pytest suite with async support
๐Ÿ“š Auto Docs Swagger UI & ReDoc generated automatically
โšก Rate Limiting Redis-based rate limiting for API protection

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
FastAPI High-performance Python web framework
SQLAlchemy Async ORM for database operations
PostgreSQL Primary database
Redis Caching & rate limiting
Docker Containerization & deployment
Pytest Testing framework
JWT Authentication & authorization

๐Ÿš€ Quick Start

# Clone the repository
git clone https://github.com/mmdverse/fastapi-tasks.git
cd fastapi-tasks

# Run with Docker (recommended)
docker-compose up --build

# Or run locally
pip install -r requirements.txt
uvicorn app.main:app --reload

API will be available at http://localhost:8000
Interactive docs at http://localhost:8000/docs


๐Ÿ“– API Endpoints

๐Ÿ”‘ Authentication

Method Endpoint Description
POST /api/v1/auth/register Register a new user
POST /api/v1/auth/login Login and get JWT token

๐Ÿ“‹ Tasks

Method Endpoint Description
GET /api/v1/tasks List tasks (paginated, filterable)
POST /api/v1/tasks Create a new task
GET /api/v1/tasks/{id} Get task details
PUT /api/v1/tasks/{id} Update a task (partial)
DELETE /api/v1/tasks/{id} Delete a task

๐Ÿณ Docker Deployment

# Build and start all services
docker-compose up --build

# Or run detached
docker-compose up -d

# View logs
docker-compose logs -f api

๐Ÿงช Testing

# Run all tests
pytest

# With coverage report
pytest --cov=app --cov-report=html

# Run specific test file
pytest tests/test_auth.py -v

๐Ÿ“ Project Structure

fastapi-tasks/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ api/           # API routes (auth, tasks)
โ”‚   โ”œโ”€โ”€ core/          # Config, security, database
โ”‚   โ”œโ”€โ”€ models/        # SQLAlchemy models (User, Task)
โ”‚   โ”œโ”€โ”€ schemas/       # Pydantic schemas
โ”‚   โ””โ”€โ”€ services/      # Business logic layer
โ”œโ”€โ”€ tests/             # Pytest test suite
โ”œโ”€โ”€ Dockerfile         # Docker image
โ”œโ”€โ”€ docker-compose.yml # Multi-service setup
โ””โ”€โ”€ requirements.txt   # Python dependencies

๐Ÿ”— Related Projects


๐Ÿ“„ License

MIT โ€” Free to use, modify, and distribute.


Built with โค๏ธ by Mohammad

ุณุงุฎุชู‡ ุดุฏู‡ ุจุง โค๏ธ ุชูˆุณุท Mohammad | ๐Ÿ“ฑ ุชู„ฺฏุฑุงู…

About

๐Ÿš€ Production-ready FastAPI task management API with JWT authentication, async PostgreSQL (SQLAlchemy), Docker, rate limiting, and 100% test coverage. Perfect for learning FastAPI or starting your next SaaS project.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages