# revathybalaji06-commits/smart-parking architecture

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

- Interactive diagram: https://gitdiagram.com/revathybalaji06-commits/smart-parking
- Repository: https://github.com/revathybalaji06-commits/smart-parking

## Overview

This is a smart-parking reservation design, but the repository currently contains only the PostgreSQL schema and seed data. The documented workflow is: a driver provides a vehicle class, the backend finds the smallest available slot that fits, records the reservation, and returns a slot-specific route. The frontend, backend logic, and sensing are planned rather than implemented here; those relationships reflect the README, not inspected source code.

Main entry points: [`schema.sql`](https://github.com/revathybalaji06-commits/smart-parking/blob/main/schema.sql) (Parking database), [`seed.sql`](https://github.com/revathybalaji06-commits/smart-parking/blob/main/seed.sql) (Initial slot data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Parking application"]
  node_frontend["Driver frontend"]
  node_backend["API and matching"]
  node_slot_match["Size-aware slot match"]
  node_routing["Slot routing"]
  node_availability["Live availability"]
end

subgraph group_data["Parking data"]
  node_parking_db[("Parking database<br/>[schema.sql]")]
  node_seed_data["Initial slot data<br/>[seed.sql]"]
end

node_driver(("Driver"))
node_sensors["Sensors"]

node_driver -->|"submits class"| node_frontend
node_frontend -->|"sends requests"| node_backend
node_backend -->|"returns slot"| node_frontend
node_frontend -->|"shows route"| node_driver
node_sensors -->|"reports events"| node_backend
node_backend -->|"matches vehicle"| node_slot_match
node_backend -->|"reads and writes"| node_parking_db
node_backend -->|"routes assigned slot"| node_routing
node_backend -->|"updates counts"| node_availability
node_slot_match -->|"selects fitting slot"| node_parking_db
node_seed_data -->|"creates slots"| node_parking_db

click node_parking_db "https://github.com/revathybalaji06-commits/smart-parking/blob/main/schema.sql"
click node_seed_data "https://github.com/revathybalaji06-commits/smart-parking/blob/main/seed.sql"

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_frontend,node_backend,node_slot_match,node_routing,node_availability toneBlue
class node_parking_db,node_seed_data toneAmber
class node_driver,node_sensors toneIndigo
```

## Components

### Parking application

- **Driver frontend**
- **API and matching**
- **Size-aware slot match**
- **Slot routing**
- **Live availability**

### Parking data

- [Parking database](https://github.com/revathybalaji06-commits/smart-parking/blob/main/schema.sql): `schema.sql`
- [Initial slot data](https://github.com/revathybalaji06-commits/smart-parking/blob/main/seed.sql): `seed.sql`

### Other components

- **Driver**
- **Sensors**

## Connections

- Driver → Driver frontend: submits class (evidence: `README.md`)
- Driver frontend → API and matching: sends requests (evidence: `README.md`)
- API and matching → Driver frontend: returns slot (evidence: `README.md`)
- Driver frontend → Driver: shows route (evidence: `README.md`)
- Sensors → API and matching: reports events (evidence: `README.md`)
- API and matching → Size-aware slot match: matches vehicle (evidence: `README.md`)
- API and matching → Parking database: reads and writes (evidence: `README.md`)
- API and matching → Slot routing: routes assigned slot (evidence: `README.md`)
- API and matching → Live availability: updates counts (evidence: `README.md`)
- Size-aware slot match → Parking database: selects fitting slot (evidence: `README.md`)
- Initial slot data → Parking database: creates slots (evidence: `README.md`)
