# nikolai789/vehicle-rental-management-system-project architecture

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

- Interactive diagram: https://gitdiagram.com/nikolai789/vehicle-rental-management-system-project
- Repository: https://github.com/nikolai789/vehicle-rental-management-system-project

## Overview

This is a Windows Forms vehicle-rental management application. Its main workflow is staff login, reservation creation for a customer and vehicle, invoice generation, and invoice review/payment; administrators also manage customers, vehicles, rates, reports, and dashboard views. The graph includes the customer, vehicle, invoice, and authentication layers plus the documented UI branches. Connections come from excerpts, source-index references, or explicit code; unsampled screens and repository behavior are not inferred beyond those references.

Main entry points: [`Form(Gab)/Admin/AdminForm.cs`](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/AdminForm.cs) (Admin workspace), [`Form(Gab)/NewLoginForm.cs`](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/NewLoginForm.cs) (Login form), [`Form(Gab)/Agent/ReservationRentWizardForm.cs`](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Agent/ReservationRentWizardForm.cs) (Reservation wizard), [`Services/CustomerService.cs`](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/CustomerService.cs) (Customer service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Access"]
  node_program["Application startup<br/>[Program.cs]"]
  node_login["Login form<br/>[NewLoginForm.cs]"]
  node_auth["Authentication<br/>[AuthService.cs]"]
  node_session["User session<br/>[UserSession.cs]"]
end

subgraph group_operations["Rental Operations"]
  node_agentui["Agent workspace<br/>[AgentForm.cs]"]
  node_wizard["Reservation wizard"]
  node_customerui["Customer details"]
  node_vehicleui["Vehicle details"]
  node_invoiceui["Invoice details"]
  node_invoice_admin["Invoice list<br/>[InvoiceControl.cs]"]
end

subgraph group_admin["Administration"]
  node_adminui["Admin workspace<br/>[AdminForm.cs]"]
  node_vehicle_admin["Vehicle management<br/>[VehicleControl.cs]"]
  node_customer_admin["Customer management<br/>[CustomerControl.cs]"]
  node_rates_admin["Rate management<br/>[RatesControl.cs]"]
  node_reports["Reports<br/>[ReportsControl.cs]"]
  node_dashboard["Dashboard"]
end

subgraph group_domain["Domain Services"]
  node_customer_service["Customer service<br/>[CustomerService.cs]"]
  node_customer_model["Customer and license<br/>[Customer.cs]"]
  node_features["Vehicle features"]
  node_vehicle_service["Vehicle service<br/>[VehicleService.cs]"]
  node_vehicle_model["Vehicle model<br/>[Vehicles.cs]"]
  node_rates["Rate service<br/>[RateService.cs]"]
  node_rate_model["Rental rates<br/>[Rates.cs]"]
  node_invoice_service["Invoice service<br/>[InvoiceService.cs]"]
  node_invoice_model["Invoice model<br/>[Invoice.cs]"]
  node_calculator["Invoice calculator"]
end

subgraph group_persistence["Persistence"]
  node_users["User repository<br/>[UserRepository.cs]"]
  node_customers["Customer repository"]
  node_vehicles["Vehicle repository"]
  node_rate_repo["Rate repository<br/>[RateRepository.cs]"]
  node_invoices["Invoice repository"]
end

node_staff(("Staff user"))
node_mysql[("MySQL database")]

node_staff -->|"starts app"| node_program
node_program -->|"opens"| node_login
node_staff -->|"provides credentials"| node_login
node_login -->|"authenticates"| node_auth
node_auth -->|"looks up user"| node_users
node_login -->|"sets session"| node_session
node_login -->|"opens agent"| node_agentui
node_login -->|"opens admin"| node_adminui
node_agentui -.->|"hosts workflow"| node_wizard
node_wizard -->|"uses customer service"| node_customer_service
node_customer_service -->|"persists customer"| node_customers
node_customers -->|"reads and writes"| node_mysql
node_wizard -->|"uses vehicle service"| node_vehicle_service
node_vehicle_service -->|"delegates vehicle data"| node_vehicles
node_vehicles -->|"reads and writes"| node_mysql
node_wizard -->|"gets rates"| node_rates
node_rates -->|"loads rates"| node_rate_repo
node_rate_repo -->|"maps rates"| node_rate_model
node_wizard -->|"requests invoice"| node_invoice_service
node_invoice_service -->|"creates invoice"| node_invoices
node_invoices -->|"reads and writes"| node_mysql
node_invoice_service -->|"builds invoice"| node_invoice_model
node_vehicleui -->|"loads and saves"| node_vehicles
node_vehicleui -->|"gets feature options"| node_features
node_customerui -->|"uses customer service"| node_customer_service
node_customerui -->|"references repository"| node_customers
node_customer_service -->|"validates customer"| node_customer_model
node_vehicles -->|"maps vehicles"| node_vehicle_model
node_invoiceui -->|"marks paid"| node_invoices
node_invoiceui -->|"calculates charges"| node_calculator
node_calculator -->|"calculates invoice total"| node_invoice_model
node_adminui -->|"loads view"| node_dashboard
node_adminui -->|"loads view"| node_vehicle_admin
node_adminui -->|"loads view"| node_customer_admin
node_adminui -->|"loads view"| node_rates_admin
node_adminui -->|"loads view"| node_reports
node_adminui -->|"loads view"| node_invoice_admin
node_customer_admin -->|"uses service"| node_customer_service
node_customer_admin -->|"references repository"| node_customers
node_invoice_admin -->|"loads invoices"| node_invoices

click node_program "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Program.cs"
click node_login "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/NewLoginForm.cs"
click node_auth "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/AuthService.cs"
click node_users "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/UserRepository.cs"
click node_session "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Session/UserSession.cs"
click node_agentui "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Agent/AgentForm.cs"
click node_wizard "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Agent/ReservationRentWizardForm.cs"
click node_customerui "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/CustomerDetailsForm.cs"
click node_customer_service "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/CustomerService.cs"
click node_customers "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/CustomerRepository.cs"
click node_customer_model "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/CustomerInfo/Customer.cs"
click node_vehicleui "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/VehicleDetailsForm.cs"
click node_features "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/StandardFeatureProvider.cs"
click node_vehicle_service "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/VehicleService.cs"
click node_vehicles "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/VehicleRepository.cs"
click node_vehicle_model "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/Vehicles.cs"
click node_rates "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/RateService.cs"
click node_rate_repo "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/RateRepository.cs"
click node_rate_model "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/Rates.cs"
click node_invoice_service "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/InvoiceService.cs"
click node_invoices "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/InvoiceRepository.cs"
click node_invoice_model "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/Invoice.cs"
click node_invoiceui "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/InvoiceDetailsForm.cs"
click node_calculator "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/InvoiceInfo/CalculateTotal/InvoiceCalculator.cs"
click node_adminui "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/AdminForm.cs"
click node_vehicle_admin "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/VehicleControl.cs"
click node_customer_admin "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/CustomerControl.cs"
click node_rates_admin "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/RatesControl.cs"
click node_reports "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/ReportsControl.cs"
click node_dashboard "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/DashboardControl.cs"
click node_invoice_admin "https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Agent/User%20Controls%20Agent/InvoiceControl.cs"

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_program,node_login,node_auth,node_session,node_staff toneBlue
class node_agentui,node_wizard,node_customerui,node_vehicleui,node_invoiceui,node_invoice_admin,node_mysql toneAmber
class node_adminui,node_vehicle_admin,node_customer_admin,node_rates_admin,node_reports,node_dashboard toneMint
class node_customer_service,node_customer_model,node_features,node_vehicle_service,node_vehicle_model,node_rates,node_rate_model,node_invoice_service,node_invoice_model,node_calculator toneRose
class node_users,node_customers,node_vehicles,node_rate_repo,node_invoices toneIndigo
```

## Components

### Entry and Access

- [Application startup](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Program.cs): `Program.cs`
- [Login form](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/NewLoginForm.cs): `Form(Gab)/NewLoginForm.cs`
- [Authentication](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/AuthService.cs): `Services/AuthService.cs`
- [User session](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Session/UserSession.cs): `Session/UserSession.cs`

### Rental Operations

- [Agent workspace](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Agent/AgentForm.cs): `Form(Gab)/Agent/AgentForm.cs`
- [Reservation wizard](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Agent/ReservationRentWizardForm.cs): `Form(Gab)/Agent/ReservationRentWizardForm.cs`
- [Customer details](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/CustomerDetailsForm.cs): `Form(Gab)/CustomerDetailsForm.cs`
- [Vehicle details](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/VehicleDetailsForm.cs): `Form(Gab)/VehicleDetailsForm.cs`
- [Invoice details](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/InvoiceDetailsForm.cs): `Form(Gab)/InvoiceDetailsForm.cs`
- [Invoice list](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Agent/User%20Controls%20Agent/InvoiceControl.cs): `Form(Gab)/Agent/User Controls Agent/InvoiceControl.cs`

### Administration

- [Admin workspace](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/AdminForm.cs): `Form(Gab)/Admin/AdminForm.cs`
- [Vehicle management](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/VehicleControl.cs): `Form(Gab)/Admin/User Controls (Admin)/VehicleControl.cs`
- [Customer management](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/CustomerControl.cs): `Form(Gab)/Admin/User Controls (Admin)/CustomerControl.cs`
- [Rate management](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/RatesControl.cs): `Form(Gab)/Admin/User Controls (Admin)/RatesControl.cs`
- [Reports](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/ReportsControl.cs): `Form(Gab)/Admin/User Controls (Admin)/ReportsControl.cs`
- [Dashboard](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Form(Gab)/Admin/User%20Controls%20(Admin)/DashboardControl.cs): `Form(Gab)/Admin/User Controls (Admin)/DashboardControl.cs`

### Domain Services

- [Customer service](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/CustomerService.cs): `Services/CustomerService.cs`
- [Customer and license](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/CustomerInfo/Customer.cs): `Models/CustomerInfo/Customer.cs`
- [Vehicle features](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/StandardFeatureProvider.cs): `Services/StandardFeatureProvider.cs`
- [Vehicle service](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/VehicleService.cs): `Services/VehicleService.cs`
- [Vehicle model](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/Vehicles.cs): `Models/Vehicles.cs`
- [Rate service](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/RateService.cs): `Services/RateService.cs`
- [Rental rates](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/Rates.cs): `Models/Rates.cs`
- [Invoice service](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Services/InvoiceService.cs): `Services/InvoiceService.cs`
- [Invoice model](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/Invoice.cs): `Models/Invoice.cs`
- [Invoice calculator](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Models/InvoiceInfo/CalculateTotal/InvoiceCalculator.cs): `Models/InvoiceInfo/CalculateTotal/InvoiceCalculator.cs`

### Persistence

- [User repository](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/UserRepository.cs): `Repositories/UserRepository.cs`
- [Customer repository](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/CustomerRepository.cs): `Repositories/CustomerRepository.cs`
- [Vehicle repository](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/VehicleRepository.cs): `Repositories/VehicleRepository.cs`
- [Rate repository](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/RateRepository.cs): `Repositories/RateRepository.cs`
- [Invoice repository](https://github.com/nikolai789/vehicle-rental-management-system-project/blob/master/Repositories/InvoiceRepository.cs): `Repositories/InvoiceRepository.cs`

### Other components

- **Staff user**
- **MySQL database**

## Connections

- Staff user → Application startup: starts app (evidence: `Program.cs`)
- Application startup → Login form: opens (evidence: `Program.cs`)
- Staff user → Login form: provides credentials (evidence: `Form(Gab)/NewLoginForm.cs`)
- Login form → Authentication: authenticates (evidence: `Form(Gab)/NewLoginForm.cs`)
- Authentication → User repository: looks up user (evidence: `Services/AuthService.cs`)
- Login form → User session: sets session (evidence: `Form(Gab)/NewLoginForm.cs`)
- Login form → Agent workspace: opens agent (evidence: `Form(Gab)/NewLoginForm.cs`)
- Login form → Admin workspace: opens admin (evidence: `Form(Gab)/NewLoginForm.cs`)
- Agent workspace → Reservation wizard: hosts workflow
- Reservation wizard → Customer service: uses customer service (evidence: `Form(Gab)/Agent/ReservationRentWizardForm.cs`)
- Customer service → Customer repository: persists customer (evidence: `Services/CustomerService.cs`)
- Customer repository → MySQL database: reads and writes (evidence: `Repositories/CustomerRepository.cs`)
- Reservation wizard → Vehicle service: uses vehicle service (evidence: `Form(Gab)/Agent/ReservationRentWizardForm.cs`)
- Vehicle service → Vehicle repository: delegates vehicle data (evidence: `Services/VehicleService.cs`)
- Vehicle repository → MySQL database: reads and writes (evidence: `Repositories/VehicleRepository.cs`)
- Reservation wizard → Rate service: gets rates (evidence: `Form(Gab)/Agent/ReservationRentWizardForm.cs`)
- Rate service → Rate repository: loads rates (evidence: `Services/RateService.cs`)
- Rate repository → Rental rates: maps rates (evidence: `Repositories/RateRepository.cs`)
- Reservation wizard → Invoice service: requests invoice (evidence: `Form(Gab)/Agent/ReservationRentWizardForm.cs`)
- Invoice service → Invoice repository: creates invoice (evidence: `Services/InvoiceService.cs`)
- Invoice repository → MySQL database: reads and writes (evidence: `Repositories/InvoiceRepository.cs`)
- Invoice service → Invoice model: builds invoice (evidence: `Services/InvoiceService.cs`)
- Vehicle details → Vehicle repository: loads and saves (evidence: `Form(Gab)/VehicleDetailsForm.cs`)
- Vehicle details → Vehicle features: gets feature options (evidence: `Form(Gab)/VehicleDetailsForm.cs`)
- Customer details → Customer service: uses customer service (evidence: `Form(Gab)/CustomerDetailsForm.cs`)
- Customer details → Customer repository: references repository (evidence: `Form(Gab)/CustomerDetailsForm.cs`)
- Customer service → Customer and license: validates customer (evidence: `Services/CustomerService.cs`)
- Vehicle repository → Vehicle model: maps vehicles (evidence: `Repositories/VehicleRepository.cs`)
- Invoice details → Invoice repository: marks paid (evidence: `Form(Gab)/InvoiceDetailsForm.cs`)
- Invoice details → Invoice calculator: calculates charges (evidence: `Form(Gab)/InvoiceDetailsForm.cs`)
- Invoice calculator → Invoice model: calculates invoice total (evidence: `Models/InvoiceInfo/CalculateTotal/InvoiceCalculator.cs`)
- Admin workspace → Dashboard: loads view (evidence: `Form(Gab)/Admin/AdminForm.cs`)
- Admin workspace → Vehicle management: loads view (evidence: `Form(Gab)/Admin/AdminForm.cs`)
- Admin workspace → Customer management: loads view (evidence: `Form(Gab)/Admin/AdminForm.cs`)
- Admin workspace → Rate management: loads view (evidence: `Form(Gab)/Admin/AdminForm.cs`)
- Admin workspace → Reports: loads view (evidence: `Form(Gab)/Admin/AdminForm.cs`)
- Admin workspace → Invoice list: loads view (evidence: `Form(Gab)/Admin/AdminForm.cs`)
- Customer management → Customer service: uses service (evidence: `Form(Gab)/Admin/User Controls (Admin)/CustomerControl.cs`)
- Customer management → Customer repository: references repository (evidence: `Form(Gab)/Admin/User Controls (Admin)/CustomerControl.cs`)
- Invoice list → Invoice repository: loads invoices (evidence: `Form(Gab)/Agent/User Controls Agent/InvoiceControl.cs`)
