Backend Section¶
This section is for backend developers working on the FastAPI application.
Contents¶
- Modules - Code organization and structure
- Database Schema - Tables, relationships, ERD
- Services - External integrations (AeroDataBox, Aviationstack)
- Deployment - Production deployment guide
- Testing - Testing strategy and setup
- API Versioning - API versioning system
Quick Start¶
# Install dependencies
uv sync
# Run database migrations
uv run alembic upgrade head
# Start development server
uv run uvicorn main:app --reload
# Run tests
uv run pytest tests/ -v
External Services¶
| Service | Purpose | Documentation |
|---|---|---|
| AeroDataBox | Flight alerts webhook | AeroDataBox Client |
| Aviationstack | Flight data polling | Aviationstack Client |
| WhatsApp Cloud | Notification delivery | WhatsApp Adapter |
| PostgreSQL | Primary database | - |
| Google Cloud Storage | File storage | GCP Storage |
Module Structure¶
modules/
├── auth/ # Authentication & authorization
├── shipments/ # Shipments, bags, flights, packages
├── scans/ # QR code scanning & validation
├── warehouses/ # Warehouse management
├── notifications/ # WhatsApp, email notifications
└── storage/ # File upload & storage
See modules.md for detailed module documentation.