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:
"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
Problem Statement & Motivation
Fragmented Information: Traffic rules and fines are scattered across paper brochures.
Lack of Testing Tools: Drivers lack interactive digital self-evaluation tools.
Cumbersome Reporting: Infraction reporting requires physical police station visits.
Manual Administration: Paper records delay administrative review and lack audit tracking.
Presenter Script:
"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 on a single digital portal."
Slide 03
Project Objectives & Scope
Digital Rulebook: Searchable regulations and visual sign cards.
Driver Quiz: Self-assessment engine with instant percentage calculation.
Citizen Portal: Authenticated infraction reporting with location landmarks.
Officer Panel: Dashboard for officers (`admin@traffic.gov.np`) to review and resolve reports.
Presenter Script:
"Our system has four main objectives: First, establish a searchable digital rulebook. Second, provide an interactive quiz engine. Third, enable authenticated citizen reporting. And fourth, equip traffic officers with a control panel to review and resolve reports."
Slide 04
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 memory store.
Presenter Script:
"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."
Slide 05
Entity-Relationship (ER) Schema
Users: Profile management 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:
"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
Citizen Education & Driver Testing Module
Instant Rule Search: Keyword filtering across regulations and fine structures.
Visual Sign Cards: Mandatory, cautionary, and informational sign guides.
Interactive Quiz: Instant grading, percentage score, and answer explanations.
Presenter Script:
"For driver education, citizens can search rules by keywords like 'Helmet' or 'DUI'. The quiz engine grades submissions instantly and provides safety explanations."
Slide 07
Violation Reporting & Officer Panel
Citizen Submission: Capture infraction details and landmark locations.
Officer Dashboard: Displays system metrics (Total Reports, Pending, Resolved).
Status Lifecycle: 1-click status transitions (Pending Reviewed Resolved / Rejected).
Presenter Script:
"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'."
Slide 08
Technical Stack & Innovations
React 18 & Vite: Fast HMR rendering and clean component structure.
Bcrypt & JWT: Salted password hashing and stateless token security.
Dual-Mode Engine: Zero downtime database resilience.
Presenter Script:
"We selected React 18 for component reusability and fast rendering. Node.js handles async API traffic, while Bcrypt and JWT secure authentication headers."
Slide 09
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 status to 'Resolved'
PASSED
TC-06
DB Resilience
Auto-fallback to memory DB if MySQL offline
PASSED
Presenter Script:
"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
Future Scope & Recommendations
AI ANPR OCR: Automatic License Plate Recognition from photos.
Online Fine Payment: Digital wallet integration (eSewa, Khalti) for ticket settlement.
Presenter Script:
"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 requirements.
Outcome: A robust web platform bridging citizens and traffic police.
Presenter Script:
"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.
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.