# sourodipc18/lockit-platform-mvp architecture

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

- Interactive diagram: https://gitdiagram.com/sourodipc18/lockit-platform-mvp
- Repository: https://github.com/sourodipc18/lockit-platform-mvp
- Video tour (about a minute): https://gitdiagram.com/sourodipc18/lockit-platform-mvp/video

## Overview

LOCKIT is a web app for reserving urban storage lockers and managing access for each booking. Customers choose a location and booking details, create a reservation, and receive booking and access information; separate access and approval pages support confirmation, timers, overtime display, and closing a booking. The booking API owns the booking actions and persists them in PostgreSQL. Edges reflect the sampled page fetches and API queries; unsampled UI behavior and integrations are not inferred.

Main entry points: [`app/api/bookings/route.ts`](https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/api/bookings/route.ts) (Booking API), [`app/page.tsx`](https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/page.tsx) (Locker discovery and booking), [`app/access/page.tsx`](https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/access/page.tsx) (Live locker access), [`app/approve/page.tsx`](https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/approve/page.tsx) (QR approval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer booking"]
  node_storefront["Locker discovery and booking<br/>[page.tsx]"]
end

subgraph group_access["Access lifecycle"]
  node_approval["QR approval<br/>[page.tsx]"]
  node_access_page["Live locker access<br/>[page.tsx]"]
end

subgraph group_backend["Booking backend"]
  node_booking_api["Booking API<br/>[route.ts]"]
  node_booking_store[("PostgreSQL bookings")]
end

node_customer_actor(("Customer"))

node_customer_actor -.->|"uses"| node_storefront
node_customer_actor -.->|"opens access"| node_access_page
node_customer_actor -.->|"scans QR"| node_approval
node_storefront -->|"creates bookings"| node_booking_api
node_storefront -->|"polls bookings"| node_booking_api
node_access_page -->|"loads booking"| node_booking_api
node_access_page -->|"approves or closes"| node_booking_api
node_approval -->|"loads and approves"| node_booking_api
node_booking_api -->|"reads and writes"| node_booking_store

click node_storefront "https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/page.tsx"
click node_approval "https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/approve/page.tsx"
click node_access_page "https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/access/page.tsx"
click node_booking_api "https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/api/bookings/route.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_storefront toneBlue
class node_approval,node_access_page toneAmber
class node_booking_api,node_booking_store toneMint
class node_customer_actor toneIndigo
```

## Components

### Customer booking

- [Locker discovery and booking](https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/page.tsx): `app/page.tsx`

### Access lifecycle

- [QR approval](https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/approve/page.tsx): `app/approve/page.tsx`
- [Live locker access](https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/access/page.tsx): `app/access/page.tsx`

### Booking backend

- [Booking API](https://github.com/sourodipc18/lockit-platform-mvp/blob/main/app/api/bookings/route.ts): `app/api/bookings/route.ts`
- **PostgreSQL bookings**

### Other components

- **Customer**

## Connections

- Customer → Locker discovery and booking: uses
- Customer → Live locker access: opens access
- Customer → QR approval: scans QR
- Locker discovery and booking → Booking API: creates bookings (evidence: `app/page.tsx`)
- Locker discovery and booking → Booking API: polls bookings (evidence: `app/page.tsx`)
- Live locker access → Booking API: loads booking (evidence: `app/access/page.tsx`)
- Live locker access → Booking API: approves or closes (evidence: `app/access/page.tsx`)
- QR approval → Booking API: loads and approves (evidence: `app/approve/page.tsx`)
- Booking API → PostgreSQL bookings: reads and writes (evidence: `app/api/bookings/route.ts`)
