# rrimeks/java-spring-boot-car-rental architecture

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

- Interactive diagram: https://gitdiagram.com/rrimeks/java-spring-boot-car-rental
- Repository: https://github.com/rrimeks/java-spring-boot-car-rental

## Overview

RentaCar is a full-stack rental platform: customers browse cars, check date availability, authenticate, and reserve; administrators manage the brand and car catalog. The graph follows the shown frontend route and API structure into backend controllers and transactional services, then repositories and JPA entities. README-described UI features and security are retained, but unsampled implementation links are dashed where necessary; frontend API transport and several backend internals were not shown directly.

Main entry points: [`frontend/src/App.jsx`](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/App.jsx) (Application routes), [`frontend/src/features/car/carApi.js`](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/car/carApi.js) (Car API), [`frontend/src/app/api.js`](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/app/api.js) (RTK base API), [`src/main/java/com/rentacar/rentacarproject/service/BrandService.java`](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/BrandService.java) (Brand management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer experience"]
  node_home["Home and search<br/>[HomePage.jsx]"]
  node_carlist["Car catalog<br/>[CarListPage.jsx]"]
  node_cardetail["Car details<br/>[CarDetailPage.jsx]"]
  node_reservationui["Reservations UI"]
  node_adminui["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_authui["Sign in/up<br/>[LoginPage.jsx]"]
  node_searchbar["Date search<br/>[SearchBar.jsx]"]
end

subgraph group_frontend["Frontend platform"]
  node_routes["Application routes<br/>[App.jsx]"]
  node_baseapi["RTK base API<br/>[api.js]"]
  node_store["Redux store<br/>[store.js]"]
  node_authslice["Auth API<br/>[authApi.js]"]
  node_brandapi["Brand API<br/>[brandApi.js]"]
  node_carapi["Car API<br/>[carApi.js]"]
  node_reservationapi["Reservation API<br/>[reservationApi.js]"]
end

subgraph group_api["Backend API"]
  node_authcontroller["Auth endpoints"]
  node_brandcontroller["Brand endpoints"]
  node_carcontroller["Car endpoints<br/>[CarController.java]"]
  node_reservationcontroller["Reservation endpoints"]
end

subgraph group_domain["Rental domain"]
  node_brandservice["Brand management<br/>[BrandService.java]"]
  node_carservice["Car management<br/>[CarService.java]"]
  node_reservationservice["Reservation logic"]
  node_carsrepo[("Car repository<br/>[CarRepository.java]")]
  node_brandsrepo[("Brand repository")]
  node_reservationsrepo[("Reservation repository")]
  node_usersrepo[("User repository")]
  node_entities[("Rental entities")]
end

subgraph group_security["Identity and security"]
  node_authservice["Auth logic<br/>[AuthService.java]"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_securityfilter["JWT filter<br/>[JwtAuthFilter.java]"]
  node_securityrules["Access rules"]
end

node_renter(("Renter"))
node_admin(("Administrator"))

node_renter -->|"uses"| node_routes
node_admin -.->|"uses"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_carlist
node_routes -->|"routes to"| node_cardetail
node_routes -->|"protects"| node_reservationui
node_routes -->|"protects"| node_adminui
node_routes -->|"routes to"| node_authui
node_home -.->|"renders"| node_searchbar
node_searchbar -.->|"searches availability"| node_carapi
node_home -.->|"loads brands"| node_brandapi
node_carlist -.->|"loads cars"| node_carapi
node_cardetail -.->|"loads details"| node_carapi
node_reservationui -.->|"manages bookings"| node_reservationapi
node_adminui -.->|"manages cars"| node_carapi
node_adminui -.->|"manages brands"| node_brandapi
node_authui -.->|"authenticates"| node_authslice
node_store -->|"registers"| node_baseapi
node_authslice -.->|"injects endpoints"| node_baseapi
node_brandapi -.->|"injects endpoints"| node_baseapi
node_carapi -.->|"injects endpoints"| node_baseapi
node_reservationapi -.->|"injects endpoints"| node_baseapi
node_authslice -.->|"calls API"| node_authcontroller
node_brandapi -.->|"calls API"| node_brandcontroller
node_carapi -.->|"calls API"| node_carcontroller
node_reservationapi -.->|"calls API"| node_reservationcontroller
node_authcontroller -->|"delegates to"| node_authservice
node_brandcontroller -->|"delegates to"| node_brandservice
node_carcontroller -->|"delegates to"| node_carservice
node_reservationcontroller -->|"delegates to"| node_reservationservice
node_authservice -->|"reads/writes users"| node_usersrepo
node_authservice -->|"creates token"| node_jwt
node_authservice -->|"builds user"| node_entities
node_brandservice -->|"reads/writes brands"| node_brandsrepo
node_brandservice -->|"checks attached cars"| node_carsrepo
node_brandservice -->|"maps brands"| node_entities
node_carservice -->|"reads/writes cars"| node_carsrepo
node_carservice -->|"loads brand"| node_brandsrepo
node_carservice -->|"maps cars"| node_entities
node_reservationservice -->|"reads/writes bookings"| node_reservationsrepo
node_reservationservice -->|"checks and updates car"| node_carsrepo
node_reservationservice -->|"maps booking"| node_entities
node_securityfilter -.->|"validates token"| node_jwt
node_securityrules -->|"configures filter"| node_securityfilter

click node_routes "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/App.jsx"
click node_home "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/HomePage.jsx"
click node_carlist "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/CarListPage.jsx"
click node_cardetail "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/CarDetailPage.jsx"
click node_reservationui "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/MyReservationsPage.jsx"
click node_adminui "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_authui "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/LoginPage.jsx"
click node_searchbar "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/components/SearchBar.jsx"
click node_baseapi "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/app/api.js"
click node_store "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/app/store.js"
click node_authslice "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/auth/authApi.js"
click node_brandapi "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/brand/brandApi.js"
click node_carapi "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/car/carApi.js"
click node_reservationapi "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/reservation/reservationApi.js"
click node_authcontroller "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/controller/AuthController.java"
click node_brandcontroller "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/controller/BrandController.java"
click node_carcontroller "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/controller/CarController.java"
click node_reservationcontroller "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/controller/ReservationController.java"
click node_authservice "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/AuthService.java"
click node_brandservice "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/BrandService.java"
click node_carservice "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/CarService.java"
click node_reservationservice "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/ReservationService.java"
click node_jwt "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/security/JwtService.java"
click node_securityfilter "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/security/JwtAuthFilter.java"
click node_securityrules "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/security/SecurityService.java"
click node_carsrepo "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/repository/CarRepository.java"
click node_brandsrepo "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/repository/BrandRepository.java"
click node_reservationsrepo "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/repository/ReservationRepository.java"
click node_usersrepo "https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/repository/UserRepository.java"
click node_entities "https://github.com/rrimeks/java-spring-boot-car-rental/tree/main/src/main/java/com/rentacar/rentacarproject/entity"

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_home,node_carlist,node_cardetail,node_reservationui,node_adminui,node_authui,node_searchbar toneBlue
class node_routes,node_baseapi,node_store,node_authslice,node_brandapi,node_carapi,node_reservationapi toneAmber
class node_authcontroller,node_brandcontroller,node_carcontroller,node_reservationcontroller toneMint
class node_brandservice,node_carservice,node_reservationservice,node_carsrepo,node_brandsrepo,node_reservationsrepo,node_usersrepo,node_entities toneRose
class node_authservice,node_jwt,node_securityfilter,node_securityrules,node_renter,node_admin toneIndigo
```

## Components

### Customer experience

- [Home and search](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/HomePage.jsx): `frontend/src/pages/HomePage.jsx`
- [Car catalog](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/CarListPage.jsx): `frontend/src/pages/CarListPage.jsx`
- [Car details](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/CarDetailPage.jsx): `frontend/src/pages/CarDetailPage.jsx`
- [Reservations UI](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/MyReservationsPage.jsx): `frontend/src/pages/MyReservationsPage.jsx`
- [Admin dashboard](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [Sign in/up](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/pages/LoginPage.jsx): `frontend/src/pages/LoginPage.jsx`
- [Date search](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/components/SearchBar.jsx): `frontend/src/components/SearchBar.jsx`

### Frontend platform

- [Application routes](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [RTK base API](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/app/api.js): `frontend/src/app/api.js`
- [Redux store](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/app/store.js): `frontend/src/app/store.js`
- [Auth API](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/auth/authApi.js): `frontend/src/features/auth/authApi.js`
- [Brand API](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/brand/brandApi.js): `frontend/src/features/brand/brandApi.js`
- [Car API](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/car/carApi.js): `frontend/src/features/car/carApi.js`
- [Reservation API](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/frontend/src/features/reservation/reservationApi.js): `frontend/src/features/reservation/reservationApi.js`

### Backend API

- [Auth endpoints](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/controller/AuthController.java): `src/main/java/com/rentacar/rentacarproject/controller/AuthController.java`
- [Brand endpoints](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/controller/BrandController.java): `src/main/java/com/rentacar/rentacarproject/controller/BrandController.java`
- [Car endpoints](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/controller/CarController.java): `src/main/java/com/rentacar/rentacarproject/controller/CarController.java`
- [Reservation endpoints](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/controller/ReservationController.java): `src/main/java/com/rentacar/rentacarproject/controller/ReservationController.java`

### Rental domain

- [Brand management](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/BrandService.java): `src/main/java/com/rentacar/rentacarproject/service/BrandService.java`
- [Car management](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/CarService.java): `src/main/java/com/rentacar/rentacarproject/service/CarService.java`
- [Reservation logic](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/ReservationService.java): `src/main/java/com/rentacar/rentacarproject/service/ReservationService.java`
- [Car repository](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/repository/CarRepository.java): `src/main/java/com/rentacar/rentacarproject/repository/CarRepository.java`
- [Brand repository](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/repository/BrandRepository.java): `src/main/java/com/rentacar/rentacarproject/repository/BrandRepository.java`
- [Reservation repository](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/repository/ReservationRepository.java): `src/main/java/com/rentacar/rentacarproject/repository/ReservationRepository.java`
- [User repository](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/repository/UserRepository.java): `src/main/java/com/rentacar/rentacarproject/repository/UserRepository.java`
- [Rental entities](https://github.com/rrimeks/java-spring-boot-car-rental/tree/main/src/main/java/com/rentacar/rentacarproject/entity): `src/main/java/com/rentacar/rentacarproject/entity`

### Identity and security

- [Auth logic](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/service/AuthService.java): `src/main/java/com/rentacar/rentacarproject/service/AuthService.java`
- [JWT service](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/security/JwtService.java): `src/main/java/com/rentacar/rentacarproject/security/JwtService.java`
- [JWT filter](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/security/JwtAuthFilter.java): `src/main/java/com/rentacar/rentacarproject/security/JwtAuthFilter.java`
- [Access rules](https://github.com/rrimeks/java-spring-boot-car-rental/blob/main/src/main/java/com/rentacar/rentacarproject/security/SecurityService.java): `src/main/java/com/rentacar/rentacarproject/security/SecurityService.java`

### Other components

- **Renter**
- **Administrator**

## Connections

- Renter → Application routes: uses (evidence: `frontend/src/App.jsx`)
- Administrator → Application routes: uses · Inferred; not shown in the code that was read.
- Application routes → Home and search: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Car catalog: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Car details: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Reservations UI: protects (evidence: `frontend/src/App.jsx`)
- Application routes → Admin dashboard: protects (evidence: `frontend/src/App.jsx`)
- Application routes → Sign in/up: routes to (evidence: `frontend/src/App.jsx`)
- Home and search → Date search: renders · Inferred; not shown in the code that was read.
- Date search → Car API: searches availability · Inferred; not shown in the code that was read.
- Home and search → Brand API: loads brands · Inferred; not shown in the code that was read.
- Car catalog → Car API: loads cars · Inferred; not shown in the code that was read.
- Car details → Car API: loads details · Inferred; not shown in the code that was read.
- Reservations UI → Reservation API: manages bookings · Inferred; not shown in the code that was read.
- Admin dashboard → Car API: manages cars · Inferred; not shown in the code that was read.
- Admin dashboard → Brand API: manages brands · Inferred; not shown in the code that was read.
- Sign in/up → Auth API: authenticates · Inferred; not shown in the code that was read.
- Redux store → RTK base API: registers (evidence: `frontend/src/app/store.js`)
- Auth API → RTK base API: injects endpoints · Inferred; not shown in the code that was read.
- Brand API → RTK base API: injects endpoints · Inferred; not shown in the code that was read.
- Car API → RTK base API: injects endpoints · Inferred; not shown in the code that was read.
- Reservation API → RTK base API: injects endpoints · Inferred; not shown in the code that was read.
- Auth API → Auth endpoints: calls API · Inferred; not shown in the code that was read.
- Brand API → Brand endpoints: calls API · Inferred; not shown in the code that was read.
- Car API → Car endpoints: calls API · Inferred; not shown in the code that was read.
- Reservation API → Reservation endpoints: calls API · Inferred; not shown in the code that was read.
- Auth endpoints → Auth logic: delegates to (evidence: `src/main/java/com/rentacar/rentacarproject/controller/AuthController.java`)
- Brand endpoints → Brand management: delegates to (evidence: `src/main/java/com/rentacar/rentacarproject/controller/BrandController.java`)
- Car endpoints → Car management: delegates to (evidence: `src/main/java/com/rentacar/rentacarproject/controller/CarController.java`)
- Reservation endpoints → Reservation logic: delegates to (evidence: `src/main/java/com/rentacar/rentacarproject/controller/ReservationController.java`)
- Auth logic → User repository: reads/writes users (evidence: `src/main/java/com/rentacar/rentacarproject/service/AuthService.java`)
- Auth logic → JWT service: creates token (evidence: `src/main/java/com/rentacar/rentacarproject/service/AuthService.java`)
- Auth logic → Rental entities: builds user (evidence: `src/main/java/com/rentacar/rentacarproject/service/AuthService.java`)
- Brand management → Brand repository: reads/writes brands (evidence: `src/main/java/com/rentacar/rentacarproject/service/BrandService.java`)
- Brand management → Car repository: checks attached cars (evidence: `src/main/java/com/rentacar/rentacarproject/service/BrandService.java`)
- Brand management → Rental entities: maps brands (evidence: `src/main/java/com/rentacar/rentacarproject/service/BrandService.java`)
- Car management → Car repository: reads/writes cars (evidence: `src/main/java/com/rentacar/rentacarproject/service/CarService.java`)
- Car management → Brand repository: loads brand (evidence: `src/main/java/com/rentacar/rentacarproject/service/CarService.java`)
- Car management → Rental entities: maps cars (evidence: `src/main/java/com/rentacar/rentacarproject/service/CarService.java`)
- Reservation logic → Reservation repository: reads/writes bookings (evidence: `src/main/java/com/rentacar/rentacarproject/service/ReservationService.java`)
- Reservation logic → Car repository: checks and updates car (evidence: `src/main/java/com/rentacar/rentacarproject/service/ReservationService.java`)
- Reservation logic → Rental entities: maps booking (evidence: `src/main/java/com/rentacar/rentacarproject/service/ReservationService.java`)
- JWT filter → JWT service: validates token · Inferred; not shown in the code that was read.
- Access rules → JWT filter: configures filter (evidence: `src/main/java/com/rentacar/rentacarproject/security/SecurityService.java`)
