# renzuthebocchi/vehiclerentalsystem-copy architecture

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

- Interactive diagram: https://gitdiagram.com/renzuthebocchi/vehiclerentalsystem-copy
- Repository: https://github.com/renzuthebocchi/vehiclerentalsystem-copy

## Overview

This Java console application manages vehicle rentals across branches, from account and inventory administration through reservation, rental, invoicing, payment, and vehicle maintenance. Main.java is the sampled command-line entry point and visibly creates payments during reservation processing; the domain classes model the resulting records and status changes. The excerpts do not show all menu dispatch or the complete reservation-to-rental flow, so those links are omitted rather than inferred. The README also mentions customer and staff operations, including sales reporting, implemented in UserAccount.java.

Main entry points: [`Vehicle.java`](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Vehicle.java) (Cars and motorcycles), [`Main.java`](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Main.java) (Console workflows), [`RentalTransaction.java`](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/RentalTransaction.java) (Rental transactions), [`Reservation.java`](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Reservation.java) (Reservations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Console application"]
  node_main["Console workflows<br/>[Main.java]"]
end

subgraph group_fleet["Fleet and branches"]
  node_branch["Branch inventory<br/>[Branch.java]"]
  node_vehicle["Cars and motorcycles<br/>[Vehicle.java]"]
  node_maintenance["Maintenance records"]
end

subgraph group_rental["Rental lifecycle"]
  node_reservation["Reservations<br/>[Reservation.java]"]
  node_rental_tx["Rental transactions"]
  node_invoice["Invoices and discounts<br/>[Invoice.java]"]
  node_payment["Payment processing<br/>[Payment.java]"]
end

subgraph group_accounts["Accounts and reporting"]
  node_accounts["Customer and staff accounts<br/>[UserAccount.java]"]
end

node_user(("Operator"))

node_user -->|"uses"| node_main
node_main -->|"initializes"| node_branch
node_main -->|"initializes"| node_vehicle
node_main -->|"initializes"| node_accounts
node_main -->|"creates payment"| node_payment
node_branch -->|"assigns inventory"| node_vehicle
node_rental_tx -->|"references"| node_reservation
node_rental_tx -->|"sets rented status"| node_vehicle
node_invoice -->|"uses rental data"| node_rental_tx
node_payment -->|"references"| node_rental_tx
node_payment -->|"looks up invoice"| node_invoice
node_reservation -->|"looks up invoice"| node_invoice
node_reservation -->|"reads payment status"| node_rental_tx
node_maintenance -->|"sets maintenance status"| node_vehicle
node_vehicle -->|"adds records"| node_maintenance
node_accounts -->|"reviews reservations"| node_reservation
node_accounts -->|"reports sales"| node_vehicle

click node_main "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Main.java"
click node_branch "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Branch.java"
click node_vehicle "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Vehicle.java"
click node_reservation "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Reservation.java"
click node_rental_tx "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/RentalTransaction.java"
click node_invoice "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Invoice.java"
click node_payment "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Payment.java"
click node_maintenance "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/MaintenanceRecord.java"
click node_accounts "https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/UserAccount.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_main toneBlue
class node_branch,node_vehicle,node_maintenance toneAmber
class node_reservation,node_rental_tx,node_invoice,node_payment toneMint
class node_accounts toneRose
class node_user toneIndigo
```

## Components

### Console application

- [Console workflows](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Main.java): `Main.java`

### Fleet and branches

- [Branch inventory](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Branch.java): `Branch.java`
- [Cars and motorcycles](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Vehicle.java): `Vehicle.java`
- [Maintenance records](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/MaintenanceRecord.java): `MaintenanceRecord.java`

### Rental lifecycle

- [Reservations](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Reservation.java): `Reservation.java`
- [Rental transactions](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/RentalTransaction.java): `RentalTransaction.java`
- [Invoices and discounts](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Invoice.java): `Invoice.java`
- [Payment processing](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/Payment.java): `Payment.java`

### Accounts and reporting

- [Customer and staff accounts](https://github.com/renzuthebocchi/vehiclerentalsystem-copy/blob/main/UserAccount.java): `UserAccount.java`

### Other components

- **Operator**

## Connections

- Operator → Console workflows: uses (evidence: `Main.java`)
- Console workflows → Branch inventory: initializes (evidence: `Main.java`)
- Console workflows → Cars and motorcycles: initializes (evidence: `Main.java`)
- Console workflows → Customer and staff accounts: initializes (evidence: `Main.java`)
- Console workflows → Payment processing: creates payment (evidence: `Main.java`)
- Branch inventory → Cars and motorcycles: assigns inventory (evidence: `Branch.java`)
- Rental transactions → Reservations: references (evidence: `RentalTransaction.java`)
- Rental transactions → Cars and motorcycles: sets rented status (evidence: `RentalTransaction.java`)
- Invoices and discounts → Rental transactions: uses rental data (evidence: `Invoice.java`)
- Payment processing → Rental transactions: references (evidence: `Payment.java`)
- Payment processing → Invoices and discounts: looks up invoice (evidence: `Payment.java`)
- Reservations → Invoices and discounts: looks up invoice (evidence: `Reservation.java`)
- Reservations → Rental transactions: reads payment status (evidence: `Reservation.java`)
- Maintenance records → Cars and motorcycles: sets maintenance status (evidence: `MaintenanceRecord.java`)
- Cars and motorcycles → Maintenance records: adds records (evidence: `Vehicle.java`)
- Customer and staff accounts → Reservations: reviews reservations (evidence: `UserAccount.java`)
- Customer and staff accounts → Cars and motorcycles: reports sales (evidence: `UserAccount.java`)
