R4M-0/SmartDrive

Top 5 in Junior Entreprise INSAT's Forum Hackathon.

JavaScript

3

1 commits

updated Feb 23, 2026

See the code

README

LLOYD M3ak

🚗 Real-time Drowsiness Detection • Eco-Driving Intelligence • Weather-Aware Route Insights

A full-stack AI-driven mobile application for safer, smarter, and more efficient driving.


Overview:

This project is a complete AI-powered driving assistant consisting of:

  • Real-time computer vision (drowsiness, phone use, unsafe behaviors)

  • AI-driven eco-driving analytics (fuel consumption, CO₂ emissions, savings)

  • Weather intelligence (alerts + path scoring + forecast insights)

  • Mobile app built in React Native

  • Backend API built in FastAPI

  • ML models + LLM recommendation agent

It is designed for modern telematics systems, fleet management, driving education, and personal safety.


Features

AI Safety System (Computer Vision)

Drowsiness detection (eyes closed, yawning)

  • Phone usage / distracted driving
  • No seatbelt
  • Hands off the wheel
  • Passenger rule
  • Object distraction rule
  • Real-time WebSocket video stream analysis
  • Alerts spoken via Coqui TTS

Eco-Driving Intelligence

ML model predicting:

-Fuel consumption

-CO₂ emissions

-Fuel cost

-Behavior multiplier

LLM Agent generating:

Driving recommendations

Behavior analysis (braking, acceleration, idle time)

Savings predictions

Integrated scoring system (Eco Score)

Weather Module

  • Real-time weather + forecast using an external API

  • Weather alerts (rain, fog, wind…)

  • Route scoring / path ranking (top_k_paths)

  • "Drive safe"

Backend API

  • JWT authentication

  • User, car, trip management

  • Trip analytics

  • Harsh event detection from sensor data

  • Eco-driver recommendation endpoint

Frontend (React Native)

  • Live safety detection screen

  • Trip analytics dashboard

  • Trip details view

  • Car management screen

  • AI recommendations

  • Clean, modern UI

Setting up the project

Environment variables In ai/eco_driver/.env

OPENAI_API_KEY=your_key_here
# OR
GEMINI_API_KEY=your_key_here

Both supported. If OPENAI not found, GEMINI is used automatically.

In backend (backend/.env)

DATABASE_URL=sqlite:///./mydb.db       
JWT_SECRET=your_secret_here
JWT_ALGORITHM=HS256

Setup Instructions Ai_setup

cd ai/eco_driver
touch .env

Fill in with your api keys

Backend Setup 1- Create environment

cd backend
uv venv venv

2- Install Dependencies

uv pip install -r requirements.txt

3- Create a .env

DATABASE_URL=sqlite:///./mydb.db
JWT_SECRET=supersecret
JWT_ALGORITHM=HS256

4- Run server

cd app
uvicorn main:app --reload

Frontend Setup 1- Install Dependencies

cd frontend
npm install

2- Run Metro bundler

npm start

3- Run Android app

npx react-native run-android

R4M-0/SmartDrive

Top 5 in Junior Entreprise INSAT's Forum Hackathon.

JavaScript

3

1 commits

updated Feb 23, 2026

See the code

README

LLOYD M3ak

🚗 Real-time Drowsiness Detection • Eco-Driving Intelligence • Weather-Aware Route Insights

A full-stack AI-driven mobile application for safer, smarter, and more efficient driving.


Overview:

This project is a complete AI-powered driving assistant consisting of:

  • Real-time computer vision (drowsiness, phone use, unsafe behaviors)

  • AI-driven eco-driving analytics (fuel consumption, CO₂ emissions, savings)

  • Weather intelligence (alerts + path scoring + forecast insights)

  • Mobile app built in React Native

  • Backend API built in FastAPI

  • ML models + LLM recommendation agent

It is designed for modern telematics systems, fleet management, driving education, and personal safety.


Features

AI Safety System (Computer Vision)

Drowsiness detection (eyes closed, yawning)

  • Phone usage / distracted driving
  • No seatbelt
  • Hands off the wheel
  • Passenger rule
  • Object distraction rule
  • Real-time WebSocket video stream analysis
  • Alerts spoken via Coqui TTS

Eco-Driving Intelligence

ML model predicting:

-Fuel consumption

-CO₂ emissions

-Fuel cost

-Behavior multiplier

LLM Agent generating:

Driving recommendations

Behavior analysis (braking, acceleration, idle time)

Savings predictions

Integrated scoring system (Eco Score)

Weather Module

  • Real-time weather + forecast using an external API

  • Weather alerts (rain, fog, wind…)

  • Route scoring / path ranking (top_k_paths)

  • "Drive safe"

Backend API

  • JWT authentication

  • User, car, trip management

  • Trip analytics

  • Harsh event detection from sensor data

  • Eco-driver recommendation endpoint

Frontend (React Native)

  • Live safety detection screen

  • Trip analytics dashboard

  • Trip details view

  • Car management screen

  • AI recommendations

  • Clean, modern UI

Setting up the project

Environment variables In ai/eco_driver/.env

OPENAI_API_KEY=your_key_here
# OR
GEMINI_API_KEY=your_key_here

Both supported. If OPENAI not found, GEMINI is used automatically.

In backend (backend/.env)

DATABASE_URL=sqlite:///./mydb.db       
JWT_SECRET=your_secret_here
JWT_ALGORITHM=HS256

Setup Instructions Ai_setup

cd ai/eco_driver
touch .env

Fill in with your api keys

Backend Setup 1- Create environment

cd backend
uv venv venv

2- Install Dependencies

uv pip install -r requirements.txt

3- Create a .env

DATABASE_URL=sqlite:///./mydb.db
JWT_SECRET=supersecret
JWT_ALGORITHM=HS256

4- Run server

cd app
uvicorn main:app --reload

Frontend Setup 1- Install Dependencies

cd frontend
npm install

2- Run Metro bundler

npm start

3- Run Android app

npx react-native run-android