FleetOps is a real-time fleet tracking backend system designed to ingest, store, and analyze GPS data from moving vehicles. It simulates a real-world logistics platform with microservices, event streaming, caching, background tasks, and cloud infrastructure.
-
FastAPI for API development
-
Kafka for real-time message streaming
-
Redis for caching
-
Docker and Docker Compose for local development
-
Design RESTful APIs with FastAPI
-
Stream and process data in real time with Kafka
-
Cache dynamic data for low-latency access with Redis
-
Set up local dev environments with Docker Compose
-
Write and maintain unit/integration tests with pytest
- Ensure Docker and Docker Compose are installed
- Copy
.env.exampleto.envand update environment variables - From the
infra/directory, run:docker compose up --build
- Visit the FastAPI docs at: http://localhost:8000/docs
- Run tests from the root directory:
pytest
project/
βββ backend/
β βββ app/
β β βββ api/
β β β βββ routes/
β β β β βββ fleet.py
β β β β βββ analytics.py
β β β βββ deps.py
β β βββ core/
β β β βββ config.py
β β β βββ security.py
β β βββ models/
β β β βββ truck.py
β β β βββ location.py
β β βββ services/
β β β βββ kafka_consumer.py
β β β βββ location_cache.py
β β βββ tasks/
β β β βββ analytics.py
β β βββ main.py
β β βββ database.py
β βββ Dockerfile
β βββ requirements.txt
β βββ .env
βββ infra/
β βββ docker-compose.yml
β βββ terraform/
β βββ main.tf
β βββ variables.tf
β βββ outputs.tf
βββ tests/
β βββ test_fleet.py
β βββ test_analytics.py
β βββ conftest.py
βββ .github/
β βββ workflows/
β βββ ci.yml
βββ README.md
βββ Makefile
- WebSocket support for live UI updates
- React dashboard with Leaflet for tracking
- S3 integration for file uploads
- Kubernetes deployment