- MUNYANDAMUTSA Bernard: 220001209
- MUHIRE Francis: 220019857
- MUKESHIMANA Illumine: 223027716
Car rental businesses operate in a highly dynamic environment where real-time data synchronization is essential for smooth operations. A car rental management system involves multiple interconnected processes, such as booking cars, managing fleet availability, and sending notifications to customers. Without effective communication between these processes, the system may face issues such as:
-
Double-booking of cars due to delayed updates.
-
Inconsistent data between booking and fleet management systems.
-
Delayed notifications, reducing customer satisfaction.
To solve these issues, this project proposes an event-driven architecture that uses Apache Kafka to handle real-time communication between services.
To address these challenges, the Car Rental Management System integrates Apache Kafka for real-time communication. Kafka ensures the system remains responsive and scalable, providing near-instant updates across services like fleet management, notification handling, and
monitoring dashboards.
-
Online services
-
To offer a user-friendly web application that empowers our clients to book a car conveniently, anytime and anywhere.
-
Simplifying the car rental process for both administrators and customers
-
-
Real-Time Monitoring:
-
Maintaining a systematic record of available cars, drivers, and bookings
-
Provide a user-friendly dashboard for administrators to monitor bookings and car availability.
-
-
Enhanced Customer Experience:
- Send immediate notifications for bookings and maintain accurate fleet availability to avoid inconvenience.
- Providing a scalable and user-friendly interface for future enhancements
-
Decoupled Services:
- Design modular and independent services (e.g., booking, fleet management, notifications) that communicate through Kafka.
-
Scalability:
Use Kafka to handle increasing volumes of messages/events without performance degradation.
-
Integrate cloud services like AWS MySQL, Hadoop, and Kafka for advanced functionality
The Car Rental Management System is structured around three main entities:
Cars: Contains details about each vehicle like car_id(pk) ,plate_number ,model ,year ,color ,transmission ,cost_per_day ,status(availability) ,driver_id(fk).
Drivers: Contains details about the drivers, including their driver_id(pk), first_name, last_name, driving_license, email, phone.
Bookings: Contains details about customer bookings, linking booking_id(pk), booking_date, return_date, total_cost, status, client_id(fk), car_id(fk).
In addition we django Auth_user table to hold details of system users(admin or clients), details include: id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined
These entities are interconnected to ensure seamless operations.
- Software/Tools: Python (3.x): For Django framework and related development
- Pip: To manage Python packages
- Django installed
- Kafka installed, configured and running. Set up Zookeeper (required for Kafka operation)
- Hadoop installed, configured and running.
- Text Editor/IDE: VS Code, PyCharm, or any other code editor.
- Internet for AWS services, particularly RDS (Relational Database Service) to MySQL
- MySQL Workbench (optional) for database management.
- Browser: Chrome, Firefox, or any modern web browser for testing
- Clone the project from git via this link: https://github.com/BernardMUNYANDAMUTSA/car_rental_mgt_system.git
- Open the project in your IDE
- In your trminal/ cmd : cd car_rental_mgt_system
- Run Zookeeper: .\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
- Run Kafka: .\bin\windows\kafka-server-start.bat .\config\server.properties
- Create Kafka topic called "emailConfirmationTopic": .\bin\windows\kafka-topics.bat --create --topic emailConfirmationTopic --bootstrap-server localhost:9092
- Run Hadoop services: start-all.cmd
- Get ready Kafka Consumer:
- python manage.py shell
- from rental_app.kafka_consumer import kafka_consumer
- kafka_consumer()
- Run server: python manage.py runserver
First of all, the system has two kind of users: System Administrator(Superuser) and Client
The Login Page serves as the secure gateway to the system, designed to accommodate both Admin and Client users. It features intuitive fields for entering a Username and Password, along with a prominent Login button to access the system. For new users, an accessible Registration Link is provided, enabling quick and easy account creation.
This page ensures robust security by handling both authentication (verifying user identity) and authorization (granting appropriate access based on user roles). Whether you're an administrator managing the system or a client utilizing its features, the login page guarantees a seamless and secure entry point.
Let login as "Administrator" (credentials for admin: username= 12345 , password= Bernard ), Admin Dashboard: The following image shows the admin dashboard of the Car Rental Management System. It provides an overview of key metrics, such as the number of subscribers, available cars, booked cars, approved bookings, bookings pending for approval and total income (in Rwandan Francs). The interface appears user-friendly with clear navigation options and quick access to system features like driver registration menu, car registration menu, and view bookings menu.
The following interface is for CRUD (Create, Read, Update, Delete), it help system admin to record new driver,view all drivers, edit existing driver's information and do deletion of existing driver record.
When you click on Edit button, the system gives you interface for editing existing information then click update button
When you click on Delete button, the system prompt comfirmation message before deletion as follow:
The following interface help admistrator to record a new car and immediately assigned to a driver (in drivers selection box) then click Submit button.
The following interface help admistrator, to view all bookings transactions with status. This interface also help admin to approve by click on Approve button or reject a booking by click on Cancel for the pending bookings.
To login the system, new user have to sign-up and get username and password. The following Sign-Up page allows users to create an account by providing personal information, enabling access to services or features.
Once a user entered valid usernam and password on login page. The system displays availables cars ready for booking, pending cars waiting for approvals and booked cars (credentials for client Muhire Francis: username= 12347 , password= Bernard )
NOTE: System can not allow user to book a car which is already booked or pening for approval, system allow booking for availables cars by click on Book Now button.
When a client, click on Book Now button, the system open a window to provide booking start date, return date and input field to upload payment receipt as follow:
After booking submssion, the system change the car booking status to Pending and can not be booked by any other client.
Also after submission, using kafka cunsumer, the syetm send submission confirmation email to the client's email
Also, the system upload the submited payment receipt to HDFS in uploads directory as follow:
We have seen that the booking submitted successfuly and waiting approval. The system admin login, verify payment receipt and approve booking request as follow:
By founding that there are some booking pending for approval, then the admin click on Bookings menu for approval or cancel
When the booking is approved, automatically the system increased number of approved bookings, booked cars, total income (Rwf) and decrease available cars, number of pending bookings.
Also after approval, using kafka cunsumer, the system send approval confirmation email to the client composed by Driver'details and contacts
Back to the client portal, the system shows that the car changed the status to booked(Not available for booking) as follow:
As we have option to login the system, we have option to logout. A logout button on our system protects user data by ending login user session, enhancing security, enabling account switching, freeing resources, and ensuring compliance with privacy regulations.
We have logout button on both sides of users as follow: Logout button on Admin side
Also, there is logout option on client side
-
Framework: Django
-
Frontend: We used Bootstrap, Javascript, HTML, CSS, and AJAX for designing responsive and interactive user interfaces.
For instance, AJAX was used in the project on driver deletion:
-
Tools:
- Kafka for Real-Time Communication
- Hadoop (hdfs) for for managing uploaded payment receipts
-
MySQL Database on AWS : We connected our Django application to the AWS-hosted MySQL database.
Mr.Bernard 's contributions are the followings:
- Frontend design usign Bootstrap, Javascript and AJAX for designing responsive and interactive user interfaces.
- Installation of kafka , created Kafka topic, created kafka producer and kafka consumer into our project
- Installation of hadoop, integrate it into our project and upload attached payment receipt files into HDFS
- Developed booking module on client side and approval or cancel on administrator side (include create, read and update into Bookings and Cars tables)
- Development of admin dashboard(Fronted and backend) to show in summary total number of subscribers (registerd Clients), total number of available cars ready for booking, total number of cars already booked, total number of bookings approved, total number of bookings waiting for approval(Pendings) and total Income amount in Rwf
Mr.Francis 's contributions are the followings:
- Setting-up django framework, created project and application.
- Development of user management module, includes client sign-up and login with authentication and authorization
- Used Amazon RDS to create and configure a MySQL database called "carrentaldb2".
- Connected our Django application(Car Rental Management System) to the AWS-hosted MySQL database
- Development of new car registration module (create)
Mrs. Illumine 's contributions are the followings:
- Frontend design usign HTML and CSS for designing responsive and interactive user interfaces
- Database design and creation of models
- Development of CRUD (Create, Read, Update an Delete) on drivers table
- System documentation (The case study, objectives, user guide, Technologies Used, etc..)