Skip to content

Hamza-Rafique/drone-delivery

Repository files navigation

Drone Delivery Management System

A FastAPI-based backend system for managing drone deliveries with JWT authentication.

Features

  • Three User Types: Admin, Enduser, and Drone
  • JWT Authentication: Secure token-based authentication
  • Real-time Updates: Drone location and status updates
  • Order Management: Full lifecycle from creation to delivery
  • Rescue System: Automatic reassignment when drones break down
  • Admin Dashboard: Comprehensive management tools

Tech Stack

  • Python 3.11+
  • FastAPI - Modern async web framework
  • SQLAlchemy 2.0 - Async ORM
  • PostgreSQL - Database
  • Alembic - Database migrations
  • Pydantic - Data validation
  • JWT - Authentication
  • Docker - Containerization
  • Pytest - Testing

Project Structre

drone-delivery-fastapi/
├── alembic/                          # Database migrations
│   ├── versions/
│   └── env.py
├── app/
│   ├── __init__.py
│   ├── main.py                       # FastAPI app instance
│   ├── config.py                     # Configuration settings
│   ├── database.py                   # Database connection
│   ├── models/                       # SQLAlchemy models
│   │   ├── __init__.py
│   │   ├── user.py
│   │   ├── drone.py
│   │   └── order.py
│   ├── schemas/                      # Pydantic schemas
│   │   ├── __init__.py
│   │   ├── auth.py
│   │   ├── drone.py
│   │   ├── order.py
│   │   └── user.py
│   ├── api/                          # API endpoints
│   │   ├── __init__.py
│   │   ├── deps.py                   # Dependencies
│   │   ├── auth.py                   # Authentication endpoints
│   │   ├── drone.py                  # Drone endpoints
│   │   ├── enduser.py                # Enduser endpoints
│   │   └── admin.py                  # Admin endpoints
│   ├── core/                         # Core business logic
│   │   ├── __init__.py
│   │   ├── security.py               # JWT, password hashing
│   │   ├── config.py                 # Core config
│   │   └── exceptions.py             # Custom exceptions
│   ├── services/                     # Business services
│   │   ├── __init__.py
│   │   ├── drone_service.py
│   │   ├── order_service.py
│   │   ├── assignment_service.py
│   │   └── location_service.py
│   ├── crud/                         # Database operations
│   │   ├── __init__.py
│   │   ├── user.py
│   │   ├── drone.py
│   │   └── order.py
│   └── utils/                        # Utilities
│       ├── __init__.py
│       ├── geospatial.py
│       └── validators.py
├── tests/                            # Test files
│   ├── __init__.py
│   ├── conftest.py                   # Test fixtures
│   ├── test_auth.py
│   ├── test_drone.py
│   ├── test_enduser.py
│   └── test_admin.py
├── docker/
│   ├── Dockerfile
│   └── docker-compose.yml
├── requirements.txt
├── requirements-dev.txt
├── .env.example
├── alembic.ini
├── pyproject.toml                    # Modern Python project config
└── README.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages