🚦

Smart Traffic Management

Full-stack traffic control with real-time monitoring, two T-junction simulation, YOLO vehicle detection, prediction & analytics, and ESP32 hardware integration for physical signal output.

πŸ›‘οΈ

Citizen Safety & Legal Intelligence

Real-time SOS dispatch via Haversine routing, private-cloud evidence vault with SHA-256 integrity, court scheduling with idempotent reminders, and AI legal assistant (AttorneyWise) powered by Flan-T5.

πŸ€–

Multilingual AI Chatbot

Traffic-law support chatbot with English, Sinhala & Singlish interaction, semantic search, voice conversation mode, and a police voice entry system with transcript correction and PDF export.

πŸ“Š

Smart Officer Deployment

K-Means++ clustering with Haversine distance for hotspot identification, Azure AI Vision OCR for license/plate scanning, GPS evidence system, automated 3-strike warnings, and buddy-system pairing.

Identified Research Gaps

βœ—

Fixed-cycle traffic systems fail under variable demand β€” queues build unpredictably while low-demand directions receive unnecessary green time.

βœ—

No integrated citizen-facing platform in Sri Lanka combines emergency dispatch, digital evidence custody, court scheduling, and AI legal assistance in one system.

βœ—

Existing chatbot systems lack regional language support, code-mixed input handling, and integration with police voice record entry.

βœ—

Traditional traffic policing uses subjective officer deployment β€” no data-driven spatial analysis or automated assignment based on violation density.

Research Objectives

O1

Design and implement a complete smart traffic management system with real-time monitoring, two-junction simulation, adaptive signal timing, and ESP32 hardware output synchronization.

O2

Build an integrated citizen safety platform with Haversine-based SOS dispatch, private-cloud evidence vault, court scheduling with idempotent reminders, and Flan-T5 AI legal assistant.

O3

Develop a multilingual AI chatbot supporting English, Sinhala & Singlish for traffic-law queries, with voice interaction and a police voice entry system for field documentation.

O4

Implement spatio-temporal K-Means++ officer deployment with OCR-based fine processing, GPS evidence collection, automated repeat-offender warnings, and buddy-system pairing.

System Architecture

The ATPMS follows a five-layered architecture combining modern web technologies, AI/ML processing, and IoT hardware integration.

πŸ–₯️
Frontend Layer
Next.js + React UI Dashboards
⚑
API Layer
Next.js Route Handlers + REST
πŸ—„οΈ
Data Layer
MongoDB Atlas + Mongoose ODM
🧠
Intelligence Layer
Python Flask + YOLO + Flan-T5
πŸ”§
Hardware Layer
ESP32 + GPIO Signal Control

Technology Stack

βš›οΈ
Next.js 15
Full-stack Framework
πŸ”·
TypeScript
Type Safety
πŸƒ
MongoDB
Database
🐍
Python Flask
AI Microservice
πŸ‘οΈ
YOLO v8
Vehicle Detection
πŸ€–
Flan-T5
Legal AI (LLM)
πŸ“‘
ESP32
IoT Hardware
πŸ—ΊοΈ
Leaflet
Maps & GIS
πŸ”
JWT + bcrypt
Auth & Security
πŸ“Š
K-Means++
Spatial Clustering
πŸ“·
Azure Vision
OCR Engine
πŸ“±
send.lk
SMS Gateway