# uygnis/nus-iss-ass-practice-module architecture

> Architecture diagram of the GitHub repository uygnis/nus-iss-ass-practice-module, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/uygnis/nus-iss-ass-practice-module
- Repository: https://github.com/uygnis/nus-iss-ass-practice-module

## Overview

RentEZ is a car-rental platform with five independently deployable Spring Boot services behind a public API gateway. A customer browses the fleet, checks date-range availability, books through reservation, pays through payment, and receives a notification. Staff manage cars and maintenance; admins manage accounts, refunds, and reporting. The README documents service calls, separate schemas, fail-soft dashboard reads, and outbox delivery. Source excerpts show key booking, payment, catalog, auth, maintenance, and notification behavior; other service internals are represented from the documented architecture, not inferred source calls.

Main entry points: [`services/account-service/src/main/java/org/rentez/accountservice`](https://github.com/uygnis/nus-iss-ass-practice-module/tree/main/services/account-service/src/main/java/org/rentez/accountservice) (Account service), [`services/reservation-service/src/main/java/org/rentez/reservationservice/service/BookingService.java`](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/reservation-service/src/main/java/org/rentez/reservationservice/service/BookingService.java) (Reservation service), [`services/payment-service/src/main/java/org/rentez/paymentservice/service/PaymentService.java`](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/payment-service/src/main/java/org/rentez/paymentservice/service/PaymentService.java) (Payment service), [`services/catalog-service/src/main/java/org/rentez/catalogservice/service/CarService.java`](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/catalog-service/src/main/java/org/rentez/catalogservice/service/CarService.java) (Catalog service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Client entry"]
  node_browser(("Browser / API client"))
  node_gateway{{"API gateway"}}
  node_frontend["RentEZ web UI<br/>[App.jsx]"]
end

subgraph group_identity["Accounts"]
  node_account["Account service"]
  node_auth["Auth and JWT<br/>[AuthService.java]"]
  node_accountdb[("Auth schema")]
end

subgraph group_fleet["Fleet catalog"]
  node_catalog["Catalog service<br/>[CarService.java]"]
  node_maintenance["Maintenance"]
  node_fleetdb[("Fleet schema")]
end

subgraph group_reservation["Reservations"]
  node_reservation["Reservation service"]
  node_bookingdb[("Booking schema")]
end

subgraph group_money["Payments"]
  node_payment["Payment service"]
  node_paymentdb[("Payment schema")]
end

subgraph group_messaging["Notifications"]
  node_notification["Notification service"]
  node_notificationdb[("Notification schema")]
end

node_browser -->|"sends requests"| node_gateway
node_browser -->|"uses"| node_frontend
node_gateway -->|"routes accounts"| node_account
node_gateway -->|"routes catalog"| node_catalog
node_gateway -->|"routes reservations"| node_reservation
node_gateway -->|"routes payments"| node_payment
node_gateway -->|"routes notifications"| node_notification
node_account -->|"handles identity"| node_auth
node_reservation -->|"fetches car data"| node_catalog
node_payment -->|"confirms or cancels"| node_reservation
node_reservation -.->|"delivers outbox"| node_notification
node_payment -.->|"delivers outbox"| node_notification
node_account -.->|"reads dashboard stats"| node_catalog
node_account -.->|"reads dashboard stats"| node_reservation
node_account -.->|"reads dashboard stats"| node_payment
node_account -->|"owns schema"| node_accountdb
node_catalog -->|"owns schema"| node_fleetdb
node_reservation -->|"owns schema"| node_bookingdb
node_payment -->|"owns schema"| node_paymentdb
node_notification -->|"owns schema"| node_notificationdb
node_maintenance -->|"updates fleet state"| node_fleetdb

click node_frontend "https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/frontend/src/App.jsx"
click node_account "https://github.com/uygnis/nus-iss-ass-practice-module/tree/main/services/account-service/src/main/java/org/rentez/accountservice"
click node_auth "https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/account-service/src/main/java/org/rentez/accountservice/service/AuthService.java"
click node_catalog "https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/catalog-service/src/main/java/org/rentez/catalogservice/service/CarService.java"
click node_maintenance "https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/catalog-service/src/main/java/org/rentez/catalogservice/service/MaintenanceService.java"
click node_reservation "https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/reservation-service/src/main/java/org/rentez/reservationservice/service/BookingService.java"
click node_payment "https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/payment-service/src/main/java/org/rentez/paymentservice/service/PaymentService.java"
click node_notification "https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/notification-service/src/main/java/org/rentez/notificationservice/service/NotificationService.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_browser,node_gateway,node_frontend toneBlue
class node_account,node_auth,node_accountdb toneAmber
class node_catalog,node_maintenance,node_fleetdb toneMint
class node_reservation,node_bookingdb toneRose
class node_payment,node_paymentdb toneIndigo
class node_notification,node_notificationdb toneTeal
```

## Components

### Client entry

- **Browser / API client**
- **API gateway**
- [RentEZ web UI](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### Accounts

- [Account service](https://github.com/uygnis/nus-iss-ass-practice-module/tree/main/services/account-service/src/main/java/org/rentez/accountservice): `services/account-service/src/main/java/org/rentez/accountservice`
- [Auth and JWT](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/account-service/src/main/java/org/rentez/accountservice/service/AuthService.java): `services/account-service/src/main/java/org/rentez/accountservice/service/AuthService.java`
- **Auth schema**

### Fleet catalog

- [Catalog service](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/catalog-service/src/main/java/org/rentez/catalogservice/service/CarService.java): `services/catalog-service/src/main/java/org/rentez/catalogservice/service/CarService.java`
- [Maintenance](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/catalog-service/src/main/java/org/rentez/catalogservice/service/MaintenanceService.java): `services/catalog-service/src/main/java/org/rentez/catalogservice/service/MaintenanceService.java`
- **Fleet schema**

### Reservations

- [Reservation service](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/reservation-service/src/main/java/org/rentez/reservationservice/service/BookingService.java): `services/reservation-service/src/main/java/org/rentez/reservationservice/service/BookingService.java`
- **Booking schema**

### Payments

- [Payment service](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/payment-service/src/main/java/org/rentez/paymentservice/service/PaymentService.java): `services/payment-service/src/main/java/org/rentez/paymentservice/service/PaymentService.java`
- **Payment schema**

### Notifications

- [Notification service](https://github.com/uygnis/nus-iss-ass-practice-module/blob/main/services/notification-service/src/main/java/org/rentez/notificationservice/service/NotificationService.java): `services/notification-service/src/main/java/org/rentez/notificationservice/service/NotificationService.java`
- **Notification schema**

## Connections

- Browser / API client → API gateway: sends requests
- Browser / API client → RentEZ web UI: uses
- API gateway → Account service: routes accounts
- API gateway → Catalog service: routes catalog
- API gateway → Reservation service: routes reservations
- API gateway → Payment service: routes payments
- API gateway → Notification service: routes notifications
- Account service → Auth and JWT: handles identity (evidence: `services/account-service/src/main/java/org/rentez/accountservice/service/AuthService.java`)
- Reservation service → Catalog service: fetches car data (evidence: `services/reservation-service/src/main/java/org/rentez/reservationservice/service/BookingService.java`)
- Payment service → Reservation service: confirms or cancels
- Reservation service → Notification service: delivers outbox
- Payment service → Notification service: delivers outbox
- Account service → Catalog service: reads dashboard stats
- Account service → Reservation service: reads dashboard stats
- Account service → Payment service: reads dashboard stats
- Account service → Auth schema: owns schema
- Catalog service → Fleet schema: owns schema
- Reservation service → Booking schema: owns schema
- Payment service → Payment schema: owns schema
- Notification service → Notification schema: owns schema
- Maintenance → Fleet schema: updates fleet state (evidence: `services/catalog-service/src/main/java/org/rentez/catalogservice/service/MaintenanceService.java`)
