Skip to content

bikash-20/2nd-year-java-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚗 RENTIFY — Car Rental Management System

A full-stack web application built with Java & Spring Boot

Java Spring Boot H2 Database Maven License

🌐 Live Demo · 📁 Source Code · 📸 Screenshots image image

image image image image

Overview

Rentify is a fully functional Car Rental Management System developed as a 2nd-year Java project. It evolved from a basic console application into a production-ready full-stack web application, demonstrating real-world software development skills including layered architecture, database persistence, PDF generation, and data visualization.

The project was first built as a JavaFX desktop application, then converted into a Spring Boot web application accessible from any device including mobile.


Features

Feature Description
Dashboard Live stats — total cars, available, rented, revenue
Rent a Car Date picker with live price preview and double-booking prevention
Return a Car Return any active rental with one click
Rental History Full record of active and completed rentals
PDF Receipts Download professional PDF receipt for any booking
Revenue Charts Monthly revenue bar chart + category doughnut chart
Manage Fleet Add new cars or delete existing ones from the UI
Database H2 persistent database — data survives server restarts
Mobile Friendly Fully responsive — works on phone, tablet, and desktop
AI Assistant can answer anything about Rentify. things like checking available cars, rental prices, current revenues, billing details, and any other information about fleet

Tech Stack

Backend

  • Java 17 — Core programming language
  • Spring Boot 3.2.5 — Web framework + dependency injection
  • Spring Data JPA — Database ORM layer
  • H2 Database — Embedded persistent SQL database
  • iText PDF 5 — PDF receipt generation

Frontend

  • Thymeleaf — Server-side HTML templating
  • HTML5 + CSS3 — Mobile-first responsive design
  • Vanilla JavaScript — Live price preview, date validation
  • Chart.js — Interactive revenue and category charts

Tools & Deployment

  • Maven — Dependency management and build tool
  • Git + GitHub — Version control
  • Railway.app — Cloud deployment (CI/CD from GitHub)

Project Architecture

AutoRentWeb/
├── src/main/java/carrental/
│   ├── App.java                         ← Spring Boot entry point
│   ├── model/
│   │   ├── Car.java                     ← JPA entity
│   │   ├── Customer.java                ← JPA entity
│   │   └── Rental.java                  ← JPA entity with date fields
│   ├── repository/
│   │   ├── CarRepository.java           ← Spring Data JPA
│   │   ├── CustomerRepository.java      ← Spring Data JPA
│   │   └── RentalRepository.java        ← Custom overlap query
│   ├── service/
│   │   ├── CarRentalSystem.java         ← Business logic layer
│   │   └── PdfService.java              ← PDF generation with iText
│   └──controller/
        |-chat controller.java         <- AI Assistant controll
│       └──RentalController.java       ← HTTP routes + request handling
└── src/main/resources/
    ├── templates/                        ← Thymeleaf HTML pages
    │   ├── layout.html                  ← Shared navbar + footer
    │   ├── dashboard.html
    │   ├── rent.html
    │   ├── rent-success.html
    │   ├── return.html
    │   ├── return-success.html
    │   ├── history.html
    │   ├── charts.html
    │   └── cars.html
    ├── static/
    │   ├── css/style.css                ← Mobile-first dark theme
    │   └── js/app.js                    ← Date logic + price preview
    └── application.properties           ← DB + server config

Design Pattern

This project follows a clean 3-layer architecture:

Controller (HTTP) → Service (Business Logic) → Repository (Database)

Getting Started

Prerequisites

Tool Version Download
Java JDK 17+ https://adoptium.net
Maven 3.8+ https://maven.apache.org

Run Locally

# Clone the repository
git clone https://github.com/bikash-20/rental-car-java-project.git
cd rental-car-java-project

# Run the application
mvn spring-boot:run

Open your browser → http://localhost:8080

Build JAR

mvn package
java -jar target/AutoRentWeb-1.0.jar

Screenshots

Dashboard

Live fleet overview with stat cards showing total cars, availability, and revenue

Rent a Car

Date-based booking with real-time price calculation and double-booking prevention

PDF Receipt

Professionally designed PDF receipt downloadable after every booking

Revenue Charts

Monthly revenue bar chart and category-wise doughnut chart powered by Chart.js

AI ASSISTANT


Project Evolution

This project was built in stages to demonstrate progressive learning:

Stage 1 — Console App          Basic Java OOP, Scanner input
      ↓
Stage 2 — JavaFX Desktop App   GUI with dark theme, CSS styling
      ↓
Stage 3 — Spring Boot Web App  Full-stack, REST routes, Thymeleaf
      ↓
Stage 4 — Database + Features  JPA persistence, PDF, Charts, Date booking

Future Enhancements

  • User authentication (Admin + Customer login)
  • Email confirmation on booking
  • PostgreSQL for production database
  • Android mobile application
  • Car photo uploads
  • Discount and coupon system

Author

Bikash Talukder

2nd Year Computer Science Student

GitHub


** If you found this project useful, please give it a star on GitHub!**

Built with using Java + Spring Boot

About

A full-stack Car Rental Management System built with Spring Boot 3 and Java 17. Evolved from a JavaFX desktop app into a responsive web platform featuring a 3-layer architecture, H2 persistence, iText PDF generation, Chart.js analytics, and an integrated AI assistant.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors