# nikogrizek/parqis architecture

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

- Interactive diagram: https://gitdiagram.com/nikogrizek/parqis
- Repository: https://github.com/nikogrizek/parqis

## Overview

Parqis is a parking-management platform: users interact through a web or mobile gateway to manage accounts, reservations, parking inventory, and entry/exit validation. Reservations and parking availability are separate domain stages; MS3 validates entry against MS2 availability and records validation outcomes. The README documents REST, gRPC, and Kafka integrations, while the excerpts show key service-level calls. Some gateway and frontend capabilities are documented but their internal routing was not sampled, so those links are shown only where supported.

Main entry points: [`api-gateway-web/index.js`](https://github.com/nikogrizek/parqis/blob/main/api-gateway-web/index.js) (Web gateway), [`frontend-shell/src/App.jsx`](https://github.com/nikogrizek/parqis/blob/main/frontend-shell/src/App.jsx) (Frontend shell), [`api-gateway-mobile/main.py`](https://github.com/nikogrizek/parqis/blob/main/api-gateway-mobile/main.py) (Mobile gateway), [`ms2-parking-spots/app/SPOT_ALLOCATION/service.py`](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/SPOT_ALLOCATION/service.py) (Spot allocation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client UI"]
  node_shell["Frontend shell<br/>[App.jsx]"]
  node_authmfe["Auth MFE<br/>[App.jsx]"]
  node_resmfe["Reservations MFE<br/>[App.jsx]"]
  node_opsmfe["Operations MFE<br/>[App.jsx]"]
end

subgraph group_gateways["API Gateways"]
  node_webgw["Web gateway<br/>[index.js]"]
  node_mobilegw["Mobile gateway<br/>[main.py]"]
end

subgraph group_reservations["MS1 Reservations"]
  node_ms1auth["Authentication<br/>[auth.service.ts]"]
  node_ms1routes["Reservation API"]
  node_ms1service["Reservation workflows"]
  node_ms1validation["Request validation"]
  node_ms1userrepo["User persistence"]
  node_ms1platform["MS1 platform setup<br/>[env.ts]"]
  node_ms1db[("MS1 database<br/>[prisma.client.ts]")]
  node_ms1logger["MS1 logging<br/>[logger.ts]"]
end

subgraph group_parking["MS2 Parking"]
  node_ms2api["Parking lot API<br/>[api.py]"]
  node_ms2spots["Spot allocation<br/>[service.py]"]
  node_ms2occupancy["Occupancy calculation<br/>[service.py]"]
  node_ms2cache[("Availability cache<br/>[cache.py]")]
  node_ms2platform["MS2 platform<br/>[config.py]"]
  node_ms2db[("MS2 database<br/>[database.py]")]
  node_ms2models["Spot data model<br/>[models.py]"]
  node_ms2repo["Spot repository<br/>[repository.py]"]
  node_ms2grpc["MS2 gRPC service<br/>[grpc_server.py]"]
end

subgraph group_validation["MS3 Validation"]
  node_ms3api["Validation API"]
  node_ms3service["Validation workflow"]
  node_ms3grpc["MS2 gRPC client"]
  node_ms3logs[("Validation records")]
  node_ms3events["Parking event publisher"]
end

node_user(("User"))
node_kafka["Kafka"]

node_user -->|"uses"| node_shell
node_shell -->|"loads"| node_authmfe
node_shell -->|"loads"| node_resmfe
node_shell -->|"loads"| node_opsmfe
node_user -->|"requests web API"| node_webgw
node_user -->|"requests mobile API"| node_mobilegw
node_webgw -->|"forwards auth"| node_ms1auth
node_webgw -->|"forwards reservations"| node_ms1routes
node_webgw -->|"forwards parking"| node_ms2api
node_webgw -->|"forwards validation"| node_ms3api
node_mobilegw -->|"forwards reservations"| node_ms1routes
node_mobilegw -->|"forwards parking"| node_ms2api
node_mobilegw -->|"forwards gate checks"| node_ms3api
node_ms1routes -->|"validates requests"| node_ms1validation
node_ms1routes -->|"dispatches"| node_ms1service
node_ms1auth -->|"uses"| node_ms1userrepo
node_ms1service -.->|"persists reservations"| node_ms1db
node_ms1service -.->|"publishes events"| node_kafka
node_ms1platform -->|"configures"| node_ms1db
node_ms1platform -->|"configures"| node_ms1logger
node_ms2api -.->|"delegates allocation"| node_ms2spots
node_ms2spots -->|"reads and updates"| node_ms2repo
node_ms2spots -->|"calculates availability"| node_ms2occupancy
node_ms2spots -->|"reads and invalidates"| node_ms2cache
node_ms2repo -->|"loads spots"| node_ms2models
node_ms2db -->|"uses settings"| node_ms2platform
node_ms3api -->|"dispatches"| node_ms3service
node_ms3service -->|"checks availability"| node_ms3grpc
node_ms3grpc -.->|"calls gRPC"| node_ms2grpc
node_ms3service -->|"stores validation"| node_ms3logs
node_ms3service -->|"publishes outcomes"| node_ms3events
node_ms3events -.->|"sends events"| node_kafka

click node_shell "https://github.com/nikogrizek/parqis/blob/main/frontend-shell/src/App.jsx"
click node_authmfe "https://github.com/nikogrizek/parqis/blob/main/mfe-auth/src/App.jsx"
click node_resmfe "https://github.com/nikogrizek/parqis/blob/main/mfe-reservations/src/App.jsx"
click node_opsmfe "https://github.com/nikogrizek/parqis/blob/main/mfe-operations/src/App.jsx"
click node_webgw "https://github.com/nikogrizek/parqis/blob/main/api-gateway-web/index.js"
click node_mobilegw "https://github.com/nikogrizek/parqis/blob/main/api-gateway-mobile/main.py"
click node_ms1auth "https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/modules/auth/application/auth.service.ts"
click node_ms1routes "https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/modules/reservations/api/reservations.routes.ts"
click node_ms1service "https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/modules/reservations/application/reservations.service.ts"
click node_ms1validation "https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/app/http/middlewares/validation.middleware.ts"
click node_ms1userrepo "https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/modules/auth/infrastructure/user.repository.prisma.ts"
click node_ms1platform "https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/shared/config/env.ts"
click node_ms1db "https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/shared/infrastructure/database/prisma.client.ts"
click node_ms1logger "https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/shared/observability/logger.ts"
click node_ms2api "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/PARKING_LOTS/api.py"
click node_ms2spots "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/SPOT_ALLOCATION/service.py"
click node_ms2occupancy "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/OCCUPANCY/service.py"
click node_ms2cache "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/INTEGRATIONS/cache.py"
click node_ms2platform "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/PLATFORM/config.py"
click node_ms2db "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/PLATFORM/database.py"
click node_ms2models "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/SPOT_ALLOCATION/models.py"
click node_ms2repo "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/SPOT_ALLOCATION/repository.py"
click node_ms3api "https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/validation/api/ValidationController.java"
click node_ms3service "https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/validation/application/ValidationService.java"
click node_ms3grpc "https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/integrations/grpc/ParkingSpotsGrpcClient.java"
click node_ms3logs "https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/validation/infrastructure/ValidationLogRepository.java"
click node_ms3events "https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/integrations/kafka/ParkingEventsPublisher.java"
click node_ms2grpc "https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/INTEGRATIONS/grpc_server.py"

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_shell,node_authmfe,node_resmfe,node_opsmfe,node_user toneBlue
class node_webgw,node_mobilegw toneAmber
class node_ms1auth,node_ms1routes,node_ms1service,node_ms1validation,node_ms1userrepo,node_ms1platform,node_ms1db,node_ms1logger toneMint
class node_ms2api,node_ms2spots,node_ms2occupancy,node_ms2cache,node_ms2platform,node_ms2db,node_ms2models,node_ms2repo,node_ms2grpc toneRose
class node_ms3api,node_ms3service,node_ms3grpc,node_ms3logs,node_ms3events,node_kafka toneIndigo
```

## Components

### Client UI

- [Frontend shell](https://github.com/nikogrizek/parqis/blob/main/frontend-shell/src/App.jsx): `frontend-shell/src/App.jsx`
- [Auth MFE](https://github.com/nikogrizek/parqis/blob/main/mfe-auth/src/App.jsx): `mfe-auth/src/App.jsx`
- [Reservations MFE](https://github.com/nikogrizek/parqis/blob/main/mfe-reservations/src/App.jsx): `mfe-reservations/src/App.jsx`
- [Operations MFE](https://github.com/nikogrizek/parqis/blob/main/mfe-operations/src/App.jsx): `mfe-operations/src/App.jsx`

### API Gateways

- [Web gateway](https://github.com/nikogrizek/parqis/blob/main/api-gateway-web/index.js): `api-gateway-web/index.js`
- [Mobile gateway](https://github.com/nikogrizek/parqis/blob/main/api-gateway-mobile/main.py): `api-gateway-mobile/main.py`

### MS1 Reservations

- [Authentication](https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/modules/auth/application/auth.service.ts): `ms1-reservations/src/modules/auth/application/auth.service.ts`
- [Reservation API](https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/modules/reservations/api/reservations.routes.ts): `ms1-reservations/src/modules/reservations/api/reservations.routes.ts`
- [Reservation workflows](https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/modules/reservations/application/reservations.service.ts): `ms1-reservations/src/modules/reservations/application/reservations.service.ts`
- [Request validation](https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/app/http/middlewares/validation.middleware.ts): `ms1-reservations/src/app/http/middlewares/validation.middleware.ts`
- [User persistence](https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/modules/auth/infrastructure/user.repository.prisma.ts): `ms1-reservations/src/modules/auth/infrastructure/user.repository.prisma.ts`
- [MS1 platform setup](https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/shared/config/env.ts): `ms1-reservations/src/shared/config/env.ts`
- [MS1 database](https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/shared/infrastructure/database/prisma.client.ts): `ms1-reservations/src/shared/infrastructure/database/prisma.client.ts`
- [MS1 logging](https://github.com/nikogrizek/parqis/blob/main/ms1-reservations/src/shared/observability/logger.ts): `ms1-reservations/src/shared/observability/logger.ts`

### MS2 Parking

- [Parking lot API](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/PARKING_LOTS/api.py): `ms2-parking-spots/app/PARKING_LOTS/api.py`
- [Spot allocation](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/SPOT_ALLOCATION/service.py): `ms2-parking-spots/app/SPOT_ALLOCATION/service.py`
- [Occupancy calculation](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/OCCUPANCY/service.py): `ms2-parking-spots/app/OCCUPANCY/service.py`
- [Availability cache](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/INTEGRATIONS/cache.py): `ms2-parking-spots/app/INTEGRATIONS/cache.py`
- [MS2 platform](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/PLATFORM/config.py): `ms2-parking-spots/app/PLATFORM/config.py`
- [MS2 database](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/PLATFORM/database.py): `ms2-parking-spots/app/PLATFORM/database.py`
- [Spot data model](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/SPOT_ALLOCATION/models.py): `ms2-parking-spots/app/SPOT_ALLOCATION/models.py`
- [Spot repository](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/SPOT_ALLOCATION/repository.py): `ms2-parking-spots/app/SPOT_ALLOCATION/repository.py`
- [MS2 gRPC service](https://github.com/nikogrizek/parqis/blob/main/ms2-parking-spots/app/INTEGRATIONS/grpc_server.py): `ms2-parking-spots/app/INTEGRATIONS/grpc_server.py`

### MS3 Validation

- [Validation API](https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/validation/api/ValidationController.java): `ms3-validation/src/main/java/com/parqis/ms3/validation/api/ValidationController.java`
- [Validation workflow](https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/validation/application/ValidationService.java): `ms3-validation/src/main/java/com/parqis/ms3/validation/application/ValidationService.java`
- [MS2 gRPC client](https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/integrations/grpc/ParkingSpotsGrpcClient.java): `ms3-validation/src/main/java/com/parqis/ms3/integrations/grpc/ParkingSpotsGrpcClient.java`
- [Validation records](https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/validation/infrastructure/ValidationLogRepository.java): `ms3-validation/src/main/java/com/parqis/ms3/validation/infrastructure/ValidationLogRepository.java`
- [Parking event publisher](https://github.com/nikogrizek/parqis/blob/main/ms3-validation/src/main/java/com/parqis/ms3/integrations/kafka/ParkingEventsPublisher.java): `ms3-validation/src/main/java/com/parqis/ms3/integrations/kafka/ParkingEventsPublisher.java`

### Other components

- **User**
- **Kafka**

## Connections

- User → Frontend shell: uses
- Frontend shell → Auth MFE: loads (evidence: `frontend-shell/src/App.jsx`)
- Frontend shell → Reservations MFE: loads (evidence: `frontend-shell/src/App.jsx`)
- Frontend shell → Operations MFE: loads (evidence: `frontend-shell/src/App.jsx`)
- User → Web gateway: requests web API
- User → Mobile gateway: requests mobile API
- Web gateway → Authentication: forwards auth
- Web gateway → Reservation API: forwards reservations
- Web gateway → Parking lot API: forwards parking
- Web gateway → Validation API: forwards validation
- Mobile gateway → Reservation API: forwards reservations
- Mobile gateway → Parking lot API: forwards parking
- Mobile gateway → Validation API: forwards gate checks
- Reservation API → Request validation: validates requests (evidence: `ms1-reservations/src/modules/reservations/api/reservations.routes.ts`)
- Reservation API → Reservation workflows: dispatches
- Authentication → User persistence: uses (evidence: `ms1-reservations/src/modules/auth/application/auth.service.ts`)
- Reservation workflows → MS1 database: persists reservations
- Reservation workflows → Kafka: publishes events
- MS1 platform setup → MS1 database: configures (evidence: `ms1-reservations/src/index.ts`)
- MS1 platform setup → MS1 logging: configures (evidence: `ms1-reservations/src/index.ts`)
- Parking lot API → Spot allocation: delegates allocation (evidence: `ms2-parking-spots/app/main.py`)
- Spot allocation → Spot repository: reads and updates (evidence: `ms2-parking-spots/app/SPOT_ALLOCATION/service.py`)
- Spot allocation → Occupancy calculation: calculates availability (evidence: `ms2-parking-spots/app/SPOT_ALLOCATION/service.py`)
- Spot allocation → Availability cache: reads and invalidates (evidence: `ms2-parking-spots/app/SPOT_ALLOCATION/service.py`)
- Spot repository → Spot data model: loads spots (evidence: `ms2-parking-spots/app/SPOT_ALLOCATION/repository.py`)
- MS2 database → MS2 platform: uses settings (evidence: `ms2-parking-spots/app/PLATFORM/database.py`)
- Validation API → Validation workflow: dispatches (evidence: `ms3-validation/src/main/java/com/parqis/ms3/validation/api/ValidationController.java`)
- Validation workflow → MS2 gRPC client: checks availability (evidence: `ms3-validation/src/main/java/com/parqis/ms3/validation/application/ValidationService.java`)
- MS2 gRPC client → MS2 gRPC service: calls gRPC
- Validation workflow → Validation records: stores validation (evidence: `ms3-validation/src/main/java/com/parqis/ms3/validation/application/ValidationService.java`)
- Validation workflow → Parking event publisher: publishes outcomes (evidence: `ms3-validation/src/main/java/com/parqis/ms3/validation/application/ValidationService.java`)
- Parking event publisher → Kafka: sends events
