Skip to content

Mokey2002/live_tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 

Repository files navigation

FleetOps - Real-Time Fleet Management Backend

🎯 Project Overview

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.

πŸ›  Tech Stack

  • 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

πŸ§ͺ How to Run Locally

  1. Ensure Docker and Docker Compose are installed
  2. Copy .env.example to .env and update environment variables
  3. From the infra/ directory, run:
    docker compose up --build
  4. Visit the FastAPI docs at: http://localhost:8000/docs
  5. Run tests from the root directory:
    pytest

πŸ“ Project Structure

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

πŸ”‹ Future Enhancements

  • WebSocket support for live UI updates
  • React dashboard with Leaflet for tracking
  • S3 integration for file uploads
  • Kubernetes deployment

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages