Project Name: Traffic Rule Awareness & Violation Management System
Domain: Web-Based Public Safety & E-Governance Information System
Core Technology: Full-Stack React 18, Node.js REST API, Express, MySQL
Presenter Script (What to say to the teacher):
"Respected Supervisor and Honorable Evaluators, Good day. Today, I present our final year project titled 'Traffic Rule Awareness and Violation Management System'. This project bridges citizen road safety education with digital administrative oversight."
Slide 02 of 12
Problem Statement & Real-World Motivation
Fragmented Information: Traffic rules and fine rates are scattered across physical brochures or agency notices.
Lack of Testing Tools: Drivers lack interactive digital tools to evaluate their safety knowledge.
Cumbersome Reporting: Public infraction reporting requires physical police station visits.
Manual Administration: Paper records delay administrative review and lack audit trails.
Presenter Script (What to say to the teacher):
"In expanding urban centers, traffic safety information is difficult to access. Citizens do not know updated fine rates, and reporting infractions requires visiting a police station. Our system solves both problems by bringing awareness and reporting onto a single digital platform."
Slide 03 of 12
Project Objectives & Scope
Digital Rulebook & Sign Directory: Searchable statutory regulations and visual sign cards.
Interactive Driver Quiz: Self-assessment engine with instant percentage score calculation.
Citizen Watch Portal: Authenticated infraction reporting with location landmarks.
Traffic Officer Control Panel: Dashboard for officers (`admin@traffic.gov.np`) to review reports and update status.
Presenter Script (What to say to the teacher):
"Our system has four main objectives: First, establish a searchable digital rulebook. Second, provide an interactive quiz engine. Third, enable authenticated citizen infraction reporting. And fourth, equip traffic officers with a control panel to review and resolve reports in real time."
Slide 04 of 12
System Architecture & Data Flow
Frontend: React 18 Single Page Application (SPA), Vite, Axios.
Dual-Mode Engine: MySQL 8.0 connection pool with automatic failover to seeded memory store.
Presenter Script (What to say to the teacher):
"The application uses a decoupled client-server architecture. The React SPA communicates with our Express backend via REST APIs protected by JWT tokens. We engineered a Dual-Mode database engine that connects to MySQL, but automatically falls back to an in-memory store if MySQL is offline, ensuring zero downtime."
Slide 05 of 12
Entity-Relationship (ER) Schema
Users: Stores user profiles and roles (`citizen`, `admin`).
Violation_Reports: Stores reported infractions linked to `Users` via foreign key `user_id`.
Rules, Signs, Penalties, Quizzes: Dynamic tables pre-populated via DDL seeding.
Presenter Script (What to say to the teacher):
"Our database schema is normalized to 3rd Normal Form. The `Users` table supports role-based permissions, while `Violation_Reports` maintains foreign key integrity with user profiles."
Slide 06 of 12
Citizen Education & Driver Testing Module
Instant Rule Search: Keyword filtering across regulations and statutory fine structures.
Visual Road Sign Cards: High-visibility mandatory, cautionary, and informational signs.
Presenter Script (What to say to the teacher):
"For driver education, citizens can search rules by keywords like 'Helmet' or 'DUI'. The quiz engine grades submissions instantly, calculates percentage scores, and provides helpful safety explanations."
Slide 07 of 12
Violation Reporting & Officer Control Panel
Citizen Submission: Capture infraction details, date, and specific landmark locations.
Officer Dashboard: Displays system metrics (Total Reports, Pending, Reviewed, Resolved).
Status Lifecycle: 1-click status transitions (Pending Reviewed Resolved / Rejected).
Presenter Script (What to say to the teacher):
"When a citizen submits a report, it is saved with a 'Pending' status. Officers log into the Admin Dashboard (`admin@traffic.gov.np`) to review reports and update status to 'Resolved', updating both portals in real time."
Slide 08 of 12
Technical Stack & Innovations
React 18 & Vite: Sub-second HMR and crisp UI rendering.
Glassmorphism CSS: Custom HSL design tokens without heavy CSS bloat.
Presenter Script (What to say to the teacher):
"We selected React 18 for component reusability and fast DOM rendering. Node.js handles async request traffic, while Bcrypt and JWT secure authentication headers."
Slide 09 of 12
Testing & Verification Matrix
Test ID
Module
Expected Result
Status
TC-01
Auth
JWT token returned; role badge shown
PASSED
TC-02
Search
Filters rules matching keyword "Helmet"
PASSED
TC-03
Quiz
Instant score percentage calculation
PASSED
TC-04
Report
Report stored with 'Pending' status
PASSED
TC-05
Admin
Officer transitions report status to 'Resolved'
PASSED
TC-06
DB Resilience
Auto-fallback to memory DB if MySQL offline
PASSED
Presenter Script (What to say to the teacher):
"All six core test cases passed successfully. Notably, Test Case 06 verified database failover resilience: if MySQL is offline, the backend seamlessly switches to our memory store."
Slide 10 of 12
Future Scope & Recommendations
AI ANPR OCR: Automatic License Plate Recognition from uploaded photos.
Online Fine e-Payment: Digital wallet integration (eSewa, Khalti) for ticket settlement.
Presenter Script (What to say to the teacher):
"We recommend three future enhancements: AI license plate recognition, GPS infraction heatmaps, and digital wallet integration for online fine payments."
Slides 11 & 12
Conclusion & Q&A
Summary: Fulfills all functional and non-functional academic project requirements.
Outcome: A robust, production-ready web platform bridging citizens and traffic police.
Presenter Script (What to say to the teacher):
"In conclusion, our Traffic Rule System successfully bridges road safety education with administrative oversight. Thank you for your time. We welcome any questions from the panel."
Evaluator Defense Viva Q&A Guide
Q1:Why choose React SPA over traditional HTML/PHP?
React provides a Single Page Application (SPA) architecture, enabling instant client-side rendering without full page reloads. Reusable components maintain clean modular code, while the Virtual DOM ensures fast UI responsiveness.
Q2:How does authentication and authorization work?
Authentication uses JSON Web Tokens (JWT) and Bcrypt password hashing. Passwords are verified against salted hashes. Upon successful login, the server issues a signed JWT containing user ID and role (`citizen` or `admin`), which is passed in HTTP Authorization headers for protected endpoints.
Q3:What is the Dual-Mode Database Engine?
The Dual-Mode engine ensures zero downtime. It connects to MySQL by default, but if MySQL is offline or unavailable during server initialization, it automatically switches to an in-memory transactional store seeded from `seedData.js`.
Q4:How is data integrity maintained in violation reports?
Foreign key constraints in MySQL (`Violation_Reports.user_id REFERENCES Users.id`) maintain relational integrity. The backend extracts `user_id` directly from the verified JWT token, preventing identity tampering.
Q5:How do you protect the Admin Dashboard from unauthorized access?
Access control operates at both frontend and backend levels. On the frontend, route guards check user roles. On the backend, administrative endpoints check that decoded JWT tokens have `role === 'admin'`, rejecting unauthorized requests with HTTP `403 Forbidden`.
Q6:How would you scale this system nationwide?
Because the Node/Express backend is stateless, API instances can be horizontally scaled behind an NGINX load balancer. Database performance can be scaled using MySQL read-replicas, database indexing, and Redis caching for rules and signs.