Skip to content

CarSafe real‑time vehicle telemetry and anomaly‑detection system built with FastAPI, Kafka, PostgreSQL, and Streamlit. It processes live sensor data and provides an interactive dashboard for monitoring vehicle behavior and detecting unusual patterns.

Notifications You must be signed in to change notification settings

KazeAsh/CarSafe

Repository files navigation

🚗 CarSafe - Vehicle Telemetry Monitoring System

Python FastAPI Kafka Streamlit License

A real-time vehicle telemetry pipeline featuring anomaly detection, live dashboards, and scalable event streaming — powered by FastAPI, Kafka, PostgreSQL, and Streamlit.

📸 Demo

(Add a screenshot or GIF of your dashboard here)

📋 Features

  • Real-time telemetry ingestion from simulated vehicles
  • Fault detection and reporting with severity levels
  • RESTful API with automatic OpenAPI documentation
  • Interactive dashboard for real-time monitoring
  • Anomaly detection for identifying unusual patterns
  • Kafka integration for scalable data streaming

🏗️ CarSafe Architecture

                          
+---------------------+     +-------------------+     +----------------------+
|   Data Generator    | --> |    FastAPI API    | --> |    PostgreSQL DB     |
|     (Simulation)    |     | (Telemetry Ingest)|     |    (Data Storage)    |
+---------------------+     +-------------------+     +----------------------+
            |                        |                          |
            |                        |                          |
            v                        v                          v
+---------------------+     +-------------------+     +----------------------+
|     Streamlit       |     |       Kafka       |     |   Anomaly Detection  |
|     Dashboard       |     |     (Optional)    |     |   (Pattern Analysis) |
+---------------------+     +-------------------+     +----------------------+

🚀 Quick Start

🧰 Prerequisites

  • Python 3.8+
  • pip or Poetry
  • PostgreSQL (optional for demo mode)
  • Kafka (optional, only required for streaming mode)

Installation

Clone and setup:

cd CarSafe
python -m venv venv
.\venv\Scripts\activate  # Windows
pip install -r requirements.txt

▶️ Running the Services

Start the API

uvicorn api.main:app --reload
python generator/main.py (Start the Data Generator)
streamlit run dashboard/app.py (Start the Dashboard)

🔌 API Documentation

Once the API is running:

🐳 Docker (Optional)

docker-compose up --build

About

CarSafe real‑time vehicle telemetry and anomaly‑detection system built with FastAPI, Kafka, PostgreSQL, and Streamlit. It processes live sensor data and provides an interactive dashboard for monitoring vehicle behavior and detecting unusual patterns.

Resources

Stars

Watchers

Forks

Languages