Skip to content

Repository files navigation

Smart Traffic Violation Management System

A professional C++ Win32 desktop application integrated with an Oracle Database using ODBC. This project manages drivers, vehicles, traffic cameras, violation types, violations, fines, payments, and reports through a clean Windows desktop interface.

Project Overview

The Smart Traffic Violation Management System is a database-driven desktop application designed for managing traffic violation records in an organized way. It provides an admin login, dashboard analytics, complete CRUD operations, search features, report generation, and Oracle database connectivity.

This project is suitable for a DBMS / C++ / Desktop Application academic project and demonstrates how a Windows frontend can be connected with a real Oracle database.

Features

  • Admin login screen
  • Professional Windows GUI using C++ Win32 API
  • Oracle Database connectivity through ODBC
  • Dashboard with database summary cards
  • Driver management
  • Vehicle management
  • Camera management
  • Violation type management
  • Violation management
  • Fine management
  • Payment management
  • Search functionality in modules
  • Add, view, update, delete, and clear operations
  • Delete confirmation dialog
  • Input validation for required and numeric fields
  • Reports module with calendar date picker
  • Violation, fine, and payment report generation
  • Export reports as .txt files

Technologies Used

  • C++
  • Win32 API
  • Oracle Database
  • ODBC
  • SQL
  • Visual Studio
  • Windows Desktop Application Development

Project Structure

SMARTTRAFFIC_REALPROJECT_UPDATED/
│
├── database/
│   └── SmartTraffic_Project_Tables_Only.sql
│
├── screenshots/
│   ├── login.png
│   ├── dashboard.png
│   ├── drivers.png
│   ├── vehicles.png
│   ├── violations.png
│   └── reports.png
│
├── main.cpp
├── SmartTraffic_ReferenceStyle_GUI.sln
├── SmartTraffic_ReferenceStyle_GUI.vcxproj
├── README.md
└── .gitignore

Database Tables

The database script contains the following project tables:

  • DRIVER
  • VEHICLE
  • CAMERA
  • VIOLATION_TYPE
  • VIOLATION
  • FINE
  • PAYMENT

Database file:

database/SmartTraffic_Project_Tables_Only.sql

Screenshots

Login Screen

Login Screen

Dashboard

Dashboard

Driver Management

Driver Management

Vehicle Management

Vehicle Management

Violation Management

Violation Management

Reports Module

Reports Module

ODBC Configuration

Before running the project, create an ODBC DSN with the following details:

DSN Name: TrafficDB_DSN
Username: TRAFFIC_DB
Database: Oracle XE / Oracle Database

The application uses the following database configuration in main.cpp:

const char* DSN_NAME = "TrafficDB_DSN";
const char* DB_USER  = "TRAFFIC_DB";

The database password is entered from the login screen at runtime.

How to Run the Project

  1. Open Oracle SQL Developer.
  2. Create or connect to the TRAFFIC_DB user.
  3. Run the SQL file:
database/SmartTraffic_Project_Tables_Only.sql
  1. Open ODBC Data Source Administrator (64-bit).
  2. Create a DSN named:
TrafficDB_DSN
  1. Open the Visual Studio solution:
SmartTraffic_ReferenceStyle_GUI.sln
  1. Select the build configuration:
Debug | x64
  1. Build and run the project:
Build → Rebuild Solution
Ctrl + F5
  1. Enter the Oracle database password on the login screen.

Main Modules

Driver Management

Manage driver records including name, CNIC, license number, and phone number.

Vehicle Management

Manage vehicle records including plate number, vehicle type, owner name, and owner CNIC.

Camera Management

Manage traffic camera records including camera location, type, and status.

Violation Type Management

Manage violation categories and fine amounts.

Violation Management

Record traffic violations by linking vehicles, drivers, cameras, and violation types.

Fine Management

Manage fine records related to traffic violations.

Payment Management

Manage payment records for issued fines.

Reports

Generate violation, fine, and payment reports using a calendar-based date range.

Files Not Included in Repository

The following Visual Studio build and cache files should not be uploaded:

.vs/
x64/
Debug/
Release/
*.user
*.obj
*.pdb
*.ilk
*.exe
*.log
*.tlog
*.recipe
*.lastbuildstate

Use .gitignore to exclude these files.

Recommended .gitignore

# Visual Studio
.vs/
x64/
Debug/
Release/
*.user
*.suo
*.obj
*.pdb
*.ilk
*.exe
*.log
*.tlog
*.lastbuildstate
*.recipe
*.ipch
*.idb
*.lib

# Build folders
bin/
obj/

# OS files
Thumbs.db
.DS_Store

Future Improvements

  • Add role-based authentication
  • Add dropdown lists for driver, vehicle, camera, and violation type selection
  • Add automatic fine generation after adding a violation
  • Add PDF report export
  • Add advanced search filters
  • Add password hashing and secure authentication
  • Improve UI with icons and responsive resizing

Author

Muhammad Rayyan

C++ Desktop Application Developer | Oracle Database | Win32 API | Database Systems

License

This project is created for academic and learning purposes.

About

A C++ Win32 desktop application with Oracle Database integration for managing traffic violations, drivers, vehicles, fines, payments, and reports.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages