IKHWANUDDIN
Back to portfolio
Workshop I · Database Project Completed

Car Workshop Appointment System

A role-based C++ console application that stores service appointments in MySQL and supports customers, administrators, and mechanics from booking through completion and receipt generation.

C++ MySQL phpMyAdmin XAMPP Console application
3User roles
5Database tables
CRUDCore data operations
Main login interface Main login screen for the Car Workshop Appointment System with staff and customer login options
01

Overview

The system addresses a common problem in workshops that still rely on first-come, first-served service. Unstructured scheduling can create crowded time slots, missed appointments, unclear service information, and extra work when bookings need to be changed or cancelled.

I developed a standalone C++ application that connects to a MySQL database. Customers can browse services and manage appointments, mechanics can view assigned work and update completion status, and administrators can manage the workshop's records and generate an annual summary.

Project scope

This is a console-based database application, not a website. XAMPP and phpMyAdmin were used as local development tools for the MySQL data.

02

Objectives

Build modular CRUD functions

Implement at least three modules that let users create, read, update, and delete the data relevant to their role.

Calculate customer payments

Total the prices of completed services and present tax and final payment values in a generated receipt.

Make service information accessible

Keep service names, prices, availability, and appointment details organized in one system.

03

Users and modules

Administrator

  • Add, view, update, and delete mechanic records
  • Add, view, update, and delete workshop services
  • View registered customers
  • View or delete appointments
  • Generate an annual performance summary

Mechanic

  • View assigned appointment information
  • Review customer plate, service, and date details
  • Mark completed service appointments
  • View and update profile information

Customer

  • Register and log in
  • Browse services and prices
  • Book or cancel an appointment
  • View appointment details and receipts
  • View and update profile information
04

System design

Structure chart showing customer and administrator modules
Structure chartRole-based modules and the operations available to each user.
Flowchart for login, administrator, mechanic, and customer actions
System flowchartThe application flow from login through each role's tasks and logout.
Entity relationship diagram linking admin, service, appointment, customer, and mechanic tables
Entity relationship diagramFive MySQL tables connected through the central appointment record.
05

Database structure

AppointmentAppointment ID, service ID, mechanic ID, customer ID, service name, date, time, and status.
CustomerCustomer ID, vehicle plate number, name, password, address, phone number, and email.
ServiceService ID, service name, and price.
AdministratorAdmin ID, password, name, phone number, and email.
MechanicMechanic ID, name, specialization, and phone number.
06

Administrator workflow

Administrator menu with mechanic, service, customer, appointment, and reporting options
Administrator menuCentral access to mechanics, services, customers, appointments, and reports.
Customer records displayed without passwords
Customer recordsRegistered customer data is displayed while passwords remain hidden.
Annual summary showing appointments, sales, customers, popular services, completion rate, and monthly revenue
Annual summaryAppointments, sales, customer count, popular services, completion rate, and monthly revenue.
07

Staff and mechanic workflow

Staff login screen offering administrator and mechanic roles
Staff role selectionStaff continue as either an administrator or mechanic.
Mechanic menu with appointment information and profile options
Mechanic menuAccess to assigned appointment information and mechanic profile details.
Mechanic appointment list with status update controls
Appointment status updateMechanics review assigned jobs and mark completed appointments by ID.
08

Customer booking workflow

Customer login screen with registration and back options
Customer accessExisting customers log in; new customers can begin registration.
Customer menu with booking, appointment details, cancellation, and profile options
Customer menuBooking, appointment details, cancellation, and profile management.
Service selection menu listing engine, tire, brake, electrical, and cooling system services
Service selectionCustomers choose from engine, tire, brake, electrical, and cooling system services.
Engine service booking flow showing services, mechanics, date, time, and confirmation
Booking flowSelect a service and mechanic, enter a date and time, then confirm the appointment.
09

Appointments, receipts, and profiles

List of dates with booked appointments
Appointment datesCustomers choose a booked date to inspect its appointment details.
Completed appointment details and generated receipt with price, tax, and total
Details and receiptA completed appointment produces a receipt with price, tax, and total payment.
Customer profile with editable personal and vehicle details
Customer profileCustomers can review and update their personal and vehicle information.
Exit screen thanking the user for using the system
Session closeA clear confirmation marks the end of the application session.
10

C++ implementation

The implementation uses modular functions, global login state, MySQL result rows, control structures, and C-style query pointers. Input validation checks values such as vehicle registration numbers before records are accepted.

C++ global variables for MySQL results and logged-in user IDs
Application stateMySQL handles and logged-in role identifiers.
C++ function declarations for administrator, service, customer, and login operations
Modular functionsOperations are separated by entity and user role.
C++ MySQL query result processed as rows to build a monthly sales chart
Result processingDatabase rows feed the annual summary calculation.
C++ do-while selection logic for adding another mechanic
Selection logicValidated choices control repeated administrator actions.
C++ do-while loop continuation condition
Loop controlA do-while condition keeps repeated tasks active until the user chooses to stop.
C++ switch statement routing administrator menu choices
Menu routingA switch statement maps administrator choices to functions.
C++ pointer and mysql_query code used to verify administrator credentials
Database query pointerA C-style string is passed to mysql_query for authentication.
C++ vehicle registration validation code
Registration validationVehicle plate input is checked for empty, overlong, or incorrectly formatted values.
Console output showing invalid vehicle registration input and retry messages
Error feedbackInvalid values produce specific messages and a chance to retry.
11

Constraints and next steps

01

Local development environment

XAMPP and phpMyAdmin are suitable for development and demonstration, but the current setup is not intended as a secured production deployment.

02

Data reliability

A production version would need stronger protection against data loss or corruption, plus backup and recovery processes.

03

Future improvements

The report proposes cloud-hosted infrastructure, customer rewards, and post-service feedback to improve scalability, reliability, and customer retention.

12

Project timeline

Fifteen-week Workshop I project timeline
Fifteen-week delivery planProposal, analysis and design, three progress phases, presentation, and final report submission.
13

Links