Sign inSign up

arifmahmudrana/fastapi-tasks-api

By arifmahmudrana

•Updated about 1 year ago

FastAPI task management API with OAuth2 auth, MySQL/MongoDB, and production security features.

Image
Security
Languages & frameworks
API management
0

689

arifmahmudrana/fastapi-tasks-api repository overview

⁠FastAPI Tasks API - Production-Ready Task Management System

A comprehensive REST API built with FastAPI for modern task management applications. This containerized solution provides secure user authentication, efficient task operations, and production-grade deployment capabilities.

⁠🚀 Key Features
  • OAuth2 Authentication: Secure JWT-based user authentication and authorization
  • Dual Database Architecture: MySQL for user data, MongoDB for task storage
  • Complete CRUD Operations: Full task lifecycle management with pagination
  • Production Security: Non-root container execution, vulnerability scanning, multi-stage builds
  • API Documentation: Auto-generated OpenAPI/Swagger documentation
  • Multi-Architecture: Supports both AMD64 and ARM64 platforms
⁠🛠️ Technology Stack
  • FastAPI - High-performance Python web framework
  • SQLAlchemy - Database ORM for MySQL operations
  • MongoDB - NoSQL database for task data
  • Alembic - Database migration management
  • OAuth2 + JWT - Modern authentication standards
  • Docker - Containerized deployment
⁠📋 API Endpoints
  • /auth/ - User registration, login, token management
  • /users/ - User profile operations
  • /tasks/ - Task CRUD with pagination and filtering
  • /docs - Interactive API documentation
⁠🔒 Security Features
  • Password hashing with bcrypt
  • JWT token-based authentication
  • Input validation and sanitization
  • Container security best practices
  • Regular vulnerability scanning
⁠🚦 Quick Start
# Pull and run the container
docker pull arifmahmudrana/fastapi-tasks-api:latest

# Run with environment variables
docker run -d \
  -p 8000:8000 \
  -e MYSQL_HOST=your-mysql-host \
  -e MYSQL_DATABASE=fastapi_db \
  -e MYSQL_USER=your-user \
  -e MYSQL_PASSWORD=your-password \
  -e MONGODB_URL=mongodb://your-mongo-host:27017/tasks \
  arifmahmudrana/fastapi-tasks-api:latest
⁠📊 Production Ready
  • Multi-stage Docker builds for optimized image size
  • Non-root user execution for enhanced security
  • Production ASGI server with multiple workers
  • Comprehensive logging and error handling
  • Health check endpoints for monitoring
⁠🏷️ Tags

fastapi python oauth2 jwt mysql mongodb rest-api docker task-management authentication production-ready


Maintained by: Arif Mahmud Rana
License: BSD 3-Clause
Last Updated: July 2025

Tag summary

Content type

Image

Digest

sha256:cb388790a…

Size

104 MB

Last updated

about 1 year ago

docker pull arifmahmudrana/fastapi-tasks-api