# eadalaramya31/vehicle-rental-system architecture

> Architecture diagram of the GitHub repository eadalaramya31/vehicle-rental-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eadalaramya31/vehicle-rental-system
- Repository: https://github.com/eadalaramya31/vehicle-rental-system

## Overview

Vehicle Rental System is a Spring Boot REST API for managing vehicles and customers, renting vehicles, and processing returns. The documented user workflow is an API client calling the vehicle, customer, or rental endpoints; rental operations include starting a rental and returning a vehicle. The tree shows separate controller, service, repository, and model layers, but source excerpts were not provided, so their internal calls and persistence relationships cannot be verified. The README documents H2 as the local database, but not its wiring to those layers.

Main entry points: [`src/main/java/com/example/rental/controller/VehicleController.java`](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/VehicleController.java) (Vehicle endpoints), [`src/main/java/com/example/rental/controller/CustomerController.java`](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/CustomerController.java) (Customer endpoints), [`src/main/java/com/example/rental/controller/RentalController.java`](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/RentalController.java) (Rental endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["REST API"]
  node_application["Spring Boot app"]
  node_vehicle_api["Vehicle endpoints"]
  node_customer_api["Customer endpoints"]
  node_rental_api["Rental endpoints"]
end

subgraph group_domain["Rental domain"]
  node_vehicle_service["Vehicle service"]
  node_customer_service["Customer service"]
  node_rental_service["Rental service<br/>[RentalService.java]"]
  node_rental_request["Rental request<br/>[RentalRequest.java]"]
  node_vehicle_model["Vehicle model<br/>[Vehicle.java]"]
  node_customer_model["Customer model<br/>[Customer.java]"]
  node_rental_model["Rental model<br/>[Rental.java]"]
  node_rental_status["Rental status<br/>[RentalStatus.java]"]
  node_vehicle_type["Vehicle type<br/>[VehicleType.java]"]
end

subgraph group_persistence["Persistence"]
  node_vehicle_repo["Vehicle repository"]
  node_customer_repo["Customer repository"]
  node_rental_repo["Rental repository"]
  node_h2[("H2 database")]
end

node_client(("API client"))

node_client -->|"manage vehicles"| node_vehicle_api
node_client -->|"manage customers"| node_customer_api
node_client -->|"rent or return"| node_rental_api

click node_application "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/VehicleRentalApplication.java"
click node_vehicle_api "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/VehicleController.java"
click node_customer_api "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/CustomerController.java"
click node_rental_api "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/RentalController.java"
click node_vehicle_service "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/service/VehicleService.java"
click node_customer_service "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/service/CustomerService.java"
click node_rental_service "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/service/RentalService.java"
click node_rental_request "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/dto/RentalRequest.java"
click node_vehicle_model "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/Vehicle.java"
click node_customer_model "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/Customer.java"
click node_rental_model "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/Rental.java"
click node_rental_status "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/RentalStatus.java"
click node_vehicle_type "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/VehicleType.java"
click node_vehicle_repo "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/repository/VehicleRepository.java"
click node_customer_repo "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/repository/CustomerRepository.java"
click node_rental_repo "https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/repository/RentalRepository.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_application,node_vehicle_api,node_customer_api,node_rental_api,node_client toneBlue
class node_vehicle_service,node_customer_service,node_rental_service,node_rental_request,node_vehicle_model,node_customer_model,node_rental_model,node_rental_status,node_vehicle_type toneAmber
class node_vehicle_repo,node_customer_repo,node_rental_repo,node_h2 toneMint
```

## Components

### REST API

- [Spring Boot app](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/VehicleRentalApplication.java): `src/main/java/com/example/rental/VehicleRentalApplication.java`
- [Vehicle endpoints](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/VehicleController.java): `src/main/java/com/example/rental/controller/VehicleController.java`
- [Customer endpoints](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/CustomerController.java): `src/main/java/com/example/rental/controller/CustomerController.java`
- [Rental endpoints](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/controller/RentalController.java): `src/main/java/com/example/rental/controller/RentalController.java`

### Rental domain

- [Vehicle service](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/service/VehicleService.java): `src/main/java/com/example/rental/service/VehicleService.java`
- [Customer service](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/service/CustomerService.java): `src/main/java/com/example/rental/service/CustomerService.java`
- [Rental service](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/service/RentalService.java): `src/main/java/com/example/rental/service/RentalService.java`
- [Rental request](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/dto/RentalRequest.java): `src/main/java/com/example/rental/dto/RentalRequest.java`
- [Vehicle model](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/Vehicle.java): `src/main/java/com/example/rental/model/Vehicle.java`
- [Customer model](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/Customer.java): `src/main/java/com/example/rental/model/Customer.java`
- [Rental model](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/Rental.java): `src/main/java/com/example/rental/model/Rental.java`
- [Rental status](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/RentalStatus.java): `src/main/java/com/example/rental/model/RentalStatus.java`
- [Vehicle type](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/model/VehicleType.java): `src/main/java/com/example/rental/model/VehicleType.java`

### Persistence

- [Vehicle repository](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/repository/VehicleRepository.java): `src/main/java/com/example/rental/repository/VehicleRepository.java`
- [Customer repository](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/repository/CustomerRepository.java): `src/main/java/com/example/rental/repository/CustomerRepository.java`
- [Rental repository](https://github.com/eadalaramya31/vehicle-rental-system/blob/main/src/main/java/com/example/rental/repository/RentalRepository.java): `src/main/java/com/example/rental/repository/RentalRepository.java`
- **H2 database**

### Other components

- **API client**

## Connections

- API client → Vehicle endpoints: manage vehicles (evidence: `README.md`)
- API client → Customer endpoints: manage customers (evidence: `README.md`)
- API client → Rental endpoints: rent or return (evidence: `README.md`)
