# vedha-v/roadwise-smart-transportation-system architecture

> Architecture diagram of the GitHub repository vedha-v/roadwise-smart-transportation-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vedha-v/roadwise-smart-transportation-system
- Repository: https://github.com/vedha-v/roadwise-smart-transportation-system

## Overview

RoadWise is a NestJS backend for a parking, traffic, and mobility app. The main documented workflow is: a client discovers nearby parking, checks verified slots for a time range, and creates or lists reservations; the backend stores reservations with overlap checks. Traffic requests fetch TomTom flow and incidents, save snapshots, and fall back to a nearby saved reading when live lookup fails. The tree also names auth, users, routes, transport, and EV endpoints. Those modules are included, but their internal behavior was not sampled. No client source was provided.

Main entry points: [`src/app.module.ts`](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/app.module.ts) (Nest application), [`src/parking/parking.service.ts`](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/parking/parking.service.ts) (Parking service), [`src/traffic/traffic.service.ts`](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/traffic/traffic.service.ts) (Traffic service), [`src/parking/parking.controller.ts`](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/parking/parking.controller.ts) (Parking API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["API framework"]
  node_appmodule["Nest application<br/>[app.module.ts]"]
end

subgraph group_parking["Parking reservations"]
  node_parkingapi["Parking API"]
  node_parkingservice["Parking service<br/>[parking.service.ts]"]
  node_parkingdb[("Parking tables")]
  node_overpass["Overpass API"]
  node_bookingsapi["Bookings API"]
end

subgraph group_traffic["Traffic data"]
  node_trafficapi["Traffic API"]
  node_trafficservice["Traffic service<br/>[traffic.service.ts]"]
  node_trafficdb[("Traffic snapshots")]
  node_tomtom["TomTom traffic"]
end

subgraph group_mobility["Account and mobility"]
  node_authapi["Auth API<br/>[auth.controller.ts]"]
  node_usersapi["Users API"]
  node_routeapi["Route API"]
  node_transportapi["Transport API"]
  node_evapi["EV API<br/>[ev.controller.ts]"]
end

node_client(("App client"))

node_appmodule -->|"registers module"| node_parkingapi
node_appmodule -->|"registers module"| node_bookingsapi
node_appmodule -->|"registers module"| node_trafficapi
node_appmodule -.->|"registers module"| node_authapi
node_appmodule -->|"registers module"| node_usersapi
node_appmodule -->|"registers module"| node_routeapi
node_appmodule -->|"registers module"| node_transportapi
node_appmodule -->|"registers module"| node_evapi
node_client -->|"requests parking"| node_parkingapi
node_client -->|"requests bookings"| node_bookingsapi
node_client -->|"requests traffic"| node_trafficapi
node_parkingapi -->|"calls"| node_parkingservice
node_bookingsapi -->|"calls"| node_parkingservice
node_parkingservice -->|"reads and writes"| node_parkingdb
node_parkingservice -->|"discovers facilities"| node_overpass
node_trafficapi -->|"calls"| node_trafficservice
node_trafficservice -->|"fetches flow and incidents"| node_tomtom
node_trafficservice -->|"saves and reads snapshots"| node_trafficdb

click node_appmodule "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/app.module.ts"
click node_parkingapi "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/parking/parking.controller.ts"
click node_parkingservice "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/parking/parking.service.ts"
click node_bookingsapi "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/bookings/bookings.controller.ts"
click node_trafficapi "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/traffic/traffic.controller.ts"
click node_trafficservice "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/traffic/traffic.service.ts"
click node_authapi "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/auth/auth.controller.ts"
click node_usersapi "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/users/users.controller.ts"
click node_routeapi "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/route/route.controller.ts"
click node_transportapi "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/transport/transport.controller.ts"
click node_evapi "https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/ev/ev.controller.ts"

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_appmodule,node_client toneBlue
class node_parkingapi,node_parkingservice,node_parkingdb,node_overpass,node_bookingsapi toneAmber
class node_trafficapi,node_trafficservice,node_trafficdb,node_tomtom toneMint
class node_authapi,node_usersapi,node_routeapi,node_transportapi,node_evapi toneRose
```

## Components

### API framework

- [Nest application](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/app.module.ts): `src/app.module.ts`

### Parking reservations

- [Parking API](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/parking/parking.controller.ts): `src/parking/parking.controller.ts`
- [Parking service](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/parking/parking.service.ts): `src/parking/parking.service.ts`
- **Parking tables**
- **Overpass API**
- [Bookings API](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/bookings/bookings.controller.ts): `src/bookings/bookings.controller.ts`

### Traffic data

- [Traffic API](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/traffic/traffic.controller.ts): `src/traffic/traffic.controller.ts`
- [Traffic service](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/traffic/traffic.service.ts): `src/traffic/traffic.service.ts`
- **Traffic snapshots**
- **TomTom traffic**

### Account and mobility

- [Auth API](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/auth/auth.controller.ts): `src/auth/auth.controller.ts`
- [Users API](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/users/users.controller.ts): `src/users/users.controller.ts`
- [Route API](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/route/route.controller.ts): `src/route/route.controller.ts`
- [Transport API](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/transport/transport.controller.ts): `src/transport/transport.controller.ts`
- [EV API](https://github.com/vedha-v/roadwise-smart-transportation-system/blob/main/src/ev/ev.controller.ts): `src/ev/ev.controller.ts`

### Other components

- **App client**

## Connections

- Nest application → Parking API: registers module (evidence: `src/app.module.ts`)
- Nest application → Bookings API: registers module (evidence: `src/app.module.ts`)
- Nest application → Traffic API: registers module (evidence: `src/app.module.ts`)
- Nest application → Auth API: registers module
- Nest application → Users API: registers module (evidence: `src/app.module.ts`)
- Nest application → Route API: registers module (evidence: `src/app.module.ts`)
- Nest application → Transport API: registers module (evidence: `src/app.module.ts`)
- Nest application → EV API: registers module (evidence: `src/app.module.ts`)
- App client → Parking API: requests parking (evidence: `README.md`)
- App client → Bookings API: requests bookings (evidence: `README.md`)
- App client → Traffic API: requests traffic (evidence: `README.md`)
- Parking API → Parking service: calls (evidence: `src/parking/parking.controller.ts`)
- Bookings API → Parking service: calls (evidence: `src/bookings/bookings.controller.ts`)
- Parking service → Parking tables: reads and writes (evidence: `src/parking/parking.service.ts`)
- Parking service → Overpass API: discovers facilities (evidence: `src/parking/parking.service.ts`)
- Traffic API → Traffic service: calls (evidence: `src/traffic/traffic.controller.ts`)
- Traffic service → TomTom traffic: fetches flow and incidents (evidence: `src/traffic/traffic.service.ts`)
- Traffic service → Traffic snapshots: saves and reads snapshots (evidence: `src/traffic/traffic.service.ts`)
