How amit0119/car-guard-ai works
This repository implements a vehicle-security simulation: a browser-based 3D dashboard presents armed standby and distinct loitering, break-in, camera-tamper, tilt/relay, and owner-authentication scenarios. The browser captures webcam frames for backend liveness and tamper analysis, while alerting and remote-command flows connect the dashboard and backend to WhatsApp. Evidence is limited to the supplied excerpts and source index; several frontend scene-dispatch and subsystem relationships are therefore not shown.
Main entry points: server.py Flask API · core.js Dashboard Runtime · scene5_tamper.js Optical Tamper · telegram_bot.py WhatsApp Gateway
Components 14
3D Dashboard
- Dashboard Runtime
frontend/js/core.js - Vehicle Builder
frontend/js/carBuilder.js
Security Scenarios
- Armed Standby
frontend/js/scenes/scene1_standby.js - Perimeter Loitering
frontend/js/scenes/scene2_loitering.js - Window Break-In
frontend/js/scenes/scene3_breakin.js - Owner Cockpit
frontend/js/scenes/scene4_cockpit.js - Optical Tamper
frontend/js/scenes/scene5_tamper.js - Tilt / Relay
frontend/js/scenes/scene6_tilt_relay.js
Backend Analysis
- Flask API
backend/server.py - Face Liveness
backend/ear_liveness.py - Loitering Detector
backend/yolo_loitering.py
Remote Communications
- WhatsApp Gateway
backend/telegram_bot.py
Other components
- Green-API Service
- Laptop Webcam
Connections 14
- Owner Cockpit → Flask API: posts frames
frontend/js/scenes/scene4_cockpit.js - Optical Tamper → Flask API: posts frames
frontend/js/scenes/scene5_tamper.js - Dashboard Runtime → Flask API: polls commands
frontend/js/core.js - Dashboard Runtime → Flask API: requests SOS
frontend/js/core.js - Laptop Webcam → Owner Cockpit: provides video
frontend/js/scenes/scene4_cockpit.js - Laptop Webcam → Optical Tamper: provides video
frontend/js/scenes/scene5_tamper.js - Flask API → Face Liveness: processes frames
backend/server.py - Flask API → WhatsApp Gateway: dispatches alerts
backend/server.py - WhatsApp Gateway → Green-API Service: sends messages
backend/telegram_bot.py - Green-API Service → WhatsApp Gateway: supplies commands
backend/telegram_bot.py - Window Break-In → Dashboard Runtime: dispatches SOS
frontend/js/scenes/scene3_breakin.js - Optical Tamper → Dashboard Runtime: dispatches SOS
frontend/js/scenes/scene5_tamper.js - Armed Standby → Vehicle Builder: resets features
frontend/js/scenes/scene1_standby.js - Tilt / Relay → Vehicle Builder: animates tilt
frontend/js/scenes/scene6_tilt_relay.js