Traffic Rule Awareness & Violation Management System
A full-stack, web-based digital portal uniting citizen road safety education, visual sign learning, interactive quizzes, and administrative violation tracking.
Urban Road Safety & Administrative Bottlenecks
Challenges faced in modern traffic awareness and violation management.
Traffic rules, fine rates, and road signs are scattered across printed notices or informal news, leading to low driver compliance and confusion.
Novice drivers have limited digital self-assessment tools to practice safety knowledge before licensing or on-road driving.
Citizens witnessing dangerous infractions (e.g. red-light jumps, helmetless riding) lack a direct, secure online submission channel.
Traffic authorities process reports manually, causing delayed resolution times and lack of real-time audit visibility.
Core Objectives & System Vision
Four integrated pillars powering the platform.
Role-Based Workflows
Distinct access controls for general citizens vs authorized traffic officers.
- • Browse & search statutory traffic regulations & penalties.
- • Take interactive safety quizzes with real-time score grading.
- • Secure login/registration via JWT bearer authentication.
- • Submit detailed violation reports with landmark locations.
- • Track personal submitted reports in real-time.
- • Dedicated officer login portal (
admin@traffic.gov.np). - • Live system activity summary (Total Reports, Pending, Resolved, Rules).
- • One-click report status transitions (Pending Reviewed Resolved / Rejected).
- • Publish new traffic rules, signs, and fine updates dynamically.
System Architecture & Data Flow
Decoupled full-stack architecture with dual-mode storage resiliency.
React SPA (Frontend)
React 18 • Vite
Lucide React • Axios
Node.js Express API
JWT Auth • Bcrypt
REST Endpoints
Dual-Mode Data Engine
MySQL 8.0 (Pool)
Auto-Failover to Memory Store
Frontend views never query database directly; all interactions go through standardized Express JSON APIs.
If MySQL server is unavailable during demo or deployment, the server seamlessly switches to transactional memory storage.
Passwords are salted and hashed using Bcrypt; API operations enforce JWT token verification.
Entity-Relationship (ER) Schema
Normalized relational database tables designed for scale and integrity.
name VARCHAR(100)
email VARCHAR(100) UNIQUE
password_hash VARCHAR(255)
role ENUM('citizen', 'admin')
created_at DATETIME
user_id (FK -> Users.id)
description TEXT
location VARCHAR(255)
status ENUM('pending','reviewed',...)
created_at DATETIME
Road_Signs (id, name, image_url...)
Penalties (id, violation_type, fine)
Quizzes (id, question, options...)
Citizen Education & Quiz Engine
Engaging, searchable learning tools for road safety awareness.
Instant keyword search across statutory speed limits, lane discipline, helmet/seatbelt laws, and DUI regulations.
High-contrast visual cards categorizing Mandatory, Cautionary, and Informational traffic signs.
Structured listing of exact fine amounts and statutory penalty terms for various infractions.
Randomized multiple-choice quizzes with instant grading, correct answer explanations, and score certificates.
Citizen Reporting & Officer Control Panel
Streamlined violation submission and administrative review workflow.
Citizens submit reports with description, date, and specific landmark locations.
Status: Pending Review
Traffic officers inspect incoming reports and change report lifecycle status with 1-click controls.
[ Pending ] [ Reviewed ] [ Resolved ]
Technology Stack & Technical Innovations
Modern engineering choices ensuring reliability, speed, and security.
- • React 18 & Vite: Sub-second HMR and crisp UI rendering.
- • Glassmorphic CSS: Premium dark mode design system.
- • Lucide React: Vector iconography for intuitiveness.
- • Node.js & Express: Asynchronous API request handling.
- • JWT & Bcrypt: Statetess token auth & password hashing.
- • Modular Routes: Clean API contract design.
- • MySQL Pool: Relational DDL & schema integrity.
- • Automatic Failover: Seamless fallback to in-memory store.
- • Auto-Seeding: Preloaded rules, signs & quizzes.
Testing & Verification Matrix
Empirical test verification across core functional requirements.
| Test ID | Target Module | Input / Action | Expected Result | Verification |
|---|---|---|---|---|
| TC-01 | Authentication | Citizen register & login | JWT token returned; header displays role badge | PASSED |
| TC-02 | Rule Search | Search keyword "Helmet" | Filters directory to display matching rules | PASSED |
| TC-03 | Quiz Evaluation | Submit options for 5 quiz questions | Instant score percentage & explanation breakdown | PASSED |
| TC-04 | Violation Submission | Submit location & infraction description | Report stored with 'Pending' status | PASSED |
| TC-05 | Admin Control | Officer updates report status to 'Resolved' | Status updates across admin & citizen views | PASSED |
| TC-06 | DB Resilience | Start API server without active MySQL | Auto-fallback to seedData memory engine | PASSED |
Future Scope & System Recommendations
Next-generation features for smart city integration.
Integrate computer vision OCR inside the report upload form to parse vehicle license plates automatically from uploaded photos.
Incorporate interactive Leaflet/Google Maps pin selection to generate real-time urban accident and infraction density heatmaps.
Connect statutory ticket IDs to digital wallets (eSewa, Khalti, ConnectIPS) for instant online fine settlement by violators.
Thank You!
The Traffic Rule Awareness & Violation Management System provides a unified, reliable platform bridging public safety education with digital administrative oversight.
We welcome questions and feedback from the evaluation panel.