# senerol/luggage-store architecture

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

- Interactive diagram: https://gitdiagram.com/senerol/luggage-store
- Repository: https://github.com/senerol/luggage-store

## Overview

Luggo is a two-sided luggage-storage marketplace. A traveler searches nearby locations, checks availability, books and pays, then uses a QR code for drop-off and pickup; partners list space and manage bookings, while admins review applications, moderate listings, and oversee marketplace operations. The graph follows the documented React-to-Express-to-PostgreSQL architecture and preserves onboarding, payouts, reviews, notifications, analytics, and reporting. Some backend domain links are based on README descriptions rather than sampled implementations; those are marked unverified or omitted.

Main entry points: [`server/src/app.ts`](https://github.com/senerol/luggage-store/blob/main/server/src/app.ts) (Express API), [`client/src/App.tsx`](https://github.com/senerol/luggage-store/blob/main/client/src/App.tsx) (Web application), [`server/src/services/storageService.ts`](https://github.com/senerol/luggage-store/blob/main/server/src/services/storageService.ts) (Storage search and listings), [`server/src/services/bookingService.ts`](https://github.com/senerol/luggage-store/blob/main/server/src/services/bookingService.ts) (Booking and capacity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer and partner app"]
  node_web_app["Web application<br/>[App.tsx]"]
  node_search_ui["Location search<br/>[SearchPage.tsx]"]
  node_booking_ui["Booking flow"]
  node_payment_ui["Payment checkout<br/>[PaymentPage.tsx]"]
  node_qr_ui["QR booking<br/>[BookingQrPage.tsx]"]
  node_partner_ui["Partner workspace"]
  node_admin_ui["Admin workspace"]
end

subgraph group_api["API and identity"]
  node_api_app["Express API<br/>[app.ts]"]
  node_auth["Authentication<br/>[authService.ts]"]
end

subgraph group_marketplace["Marketplace operations"]
  node_storage["Storage search and listings<br/>[storageService.ts]"]
  node_geocoding["Search geocoding"]
  node_partners["Partner applications"]
  node_partner_ops["Partner operations<br/>[partnerService.ts]"]
end

subgraph group_booking["Booking lifecycle"]
  node_booking["Booking and capacity<br/>[bookingService.ts]"]
  node_pricing["Pricing and commission<br/>[pricingService.ts]"]
  node_payments["Payment processing<br/>[paymentService.ts]"]
  node_qr["QR verification<br/>[qrService.ts]"]
end

subgraph group_oversight["Platform oversight"]
  node_reviews["Customer reviews<br/>[reviewService.ts]"]
  node_notifications["Notifications"]
  node_analytics["Analytics and funnel"]
  node_admin["Admin operations<br/>[adminService.ts]"]
  node_payouts["Payout ledger<br/>[payoutService.ts]"]
end

node_traveler(("Traveler"))
node_partner_actor(("Storage partner"))
node_admin_actor(("Luggo admin"))
node_database[("PostgreSQL")]
node_razorpay["Razorpay"]

node_traveler -->|"uses"| node_web_app
node_partner_actor -->|"uses"| node_web_app
node_admin_actor -->|"uses"| node_web_app
node_web_app -->|"routes to"| node_search_ui
node_web_app -->|"routes to"| node_booking_ui
node_web_app -->|"routes to"| node_payment_ui
node_web_app -->|"routes to"| node_qr_ui
node_web_app -->|"routes to"| node_partner_ui
node_web_app -->|"routes to"| node_admin_ui
node_search_ui -.->|"queries"| node_api_app
node_booking_ui -.->|"submits booking"| node_api_app
node_payment_ui -.->|"requests payment"| node_api_app
node_qr_ui -.->|"verifies QR"| node_api_app
node_partner_ui -.->|"manages listings"| node_api_app
node_admin_ui -.->|"requests operations"| node_api_app
node_api_app -->|"mounts auth routes"| node_auth
node_api_app -->|"mounts storage routes"| node_storage
node_api_app -->|"mounts partner routes"| node_partners
node_api_app -->|"mounts booking routes"| node_booking
node_api_app -->|"mounts payment routes"| node_payments
node_api_app -->|"mounts QR routes"| node_qr
node_api_app -->|"mounts review routes"| node_reviews
node_api_app -->|"mounts admin routes"| node_admin
node_api_app -->|"mounts analytics routes"| node_analytics
node_storage -->|"geocodes searches"| node_geocoding
node_storage -->|"checks capacity"| node_booking
node_storage -->|"reads listings"| node_database
node_booking -.->|"calculates price"| node_pricing
node_booking -.->|"stores bookings"| node_database
node_payments -.->|"creates orders"| node_razorpay
node_payments -.->|"records payments"| node_database
node_qr -.->|"verifies tokens"| node_database
node_partners -.->|"tracks applications"| node_database
node_partner_ops -.->|"manages locations"| node_database
node_reviews -.->|"stores reviews"| node_database
node_notifications -.->|"stores notifications"| node_database
node_analytics -.->|"queries events"| node_database
node_admin -.->|"manages marketplace"| node_database
node_admin -.->|"oversees payouts"| node_payouts
node_pricing -.->|"reads commission"| node_database

click node_web_app "https://github.com/senerol/luggage-store/blob/main/client/src/App.tsx"
click node_search_ui "https://github.com/senerol/luggage-store/blob/main/client/src/pages/search/SearchPage.tsx"
click node_booking_ui "https://github.com/senerol/luggage-store/blob/main/client/src/pages/booking/BookingFlowPage.tsx"
click node_payment_ui "https://github.com/senerol/luggage-store/blob/main/client/src/pages/booking/PaymentPage.tsx"
click node_qr_ui "https://github.com/senerol/luggage-store/blob/main/client/src/pages/booking/BookingQrPage.tsx"
click node_partner_ui "https://github.com/senerol/luggage-store/blob/main/client/src/pages/partner/PartnerStoragePage.tsx"
click node_admin_ui "https://github.com/senerol/luggage-store/blob/main/client/src/pages/admin/AdminDashboardPage.tsx"
click node_api_app "https://github.com/senerol/luggage-store/blob/main/server/src/app.ts"
click node_auth "https://github.com/senerol/luggage-store/blob/main/server/src/services/authService.ts"
click node_storage "https://github.com/senerol/luggage-store/blob/main/server/src/services/storageService.ts"
click node_geocoding "https://github.com/senerol/luggage-store/blob/main/server/src/services/geocodingService.ts"
click node_booking "https://github.com/senerol/luggage-store/blob/main/server/src/services/bookingService.ts"
click node_pricing "https://github.com/senerol/luggage-store/blob/main/server/src/services/pricingService.ts"
click node_payments "https://github.com/senerol/luggage-store/blob/main/server/src/services/paymentService.ts"
click node_qr "https://github.com/senerol/luggage-store/blob/main/server/src/services/qrService.ts"
click node_partners "https://github.com/senerol/luggage-store/blob/main/server/src/services/partnerApplicationService.ts"
click node_partner_ops "https://github.com/senerol/luggage-store/blob/main/server/src/services/partnerService.ts"
click node_reviews "https://github.com/senerol/luggage-store/blob/main/server/src/services/reviewService.ts"
click node_notifications "https://github.com/senerol/luggage-store/blob/main/server/src/services/notificationService.ts"
click node_analytics "https://github.com/senerol/luggage-store/blob/main/server/src/services/analyticsService.ts"
click node_admin "https://github.com/senerol/luggage-store/blob/main/server/src/services/adminService.ts"
click node_payouts "https://github.com/senerol/luggage-store/blob/main/server/src/services/payoutService.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_web_app,node_search_ui,node_booking_ui,node_payment_ui,node_qr_ui,node_partner_ui,node_admin_ui toneBlue
class node_api_app,node_auth,node_partner_actor,node_database toneAmber
class node_storage,node_geocoding,node_partners,node_partner_ops toneMint
class node_booking,node_pricing,node_payments,node_qr toneRose
class node_reviews,node_notifications,node_analytics,node_admin,node_payouts,node_traveler,node_admin_actor,node_razorpay toneIndigo
```

## Components

### Customer and partner app

- [Web application](https://github.com/senerol/luggage-store/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Location search](https://github.com/senerol/luggage-store/blob/main/client/src/pages/search/SearchPage.tsx): `client/src/pages/search/SearchPage.tsx`
- [Booking flow](https://github.com/senerol/luggage-store/blob/main/client/src/pages/booking/BookingFlowPage.tsx): `client/src/pages/booking/BookingFlowPage.tsx`
- [Payment checkout](https://github.com/senerol/luggage-store/blob/main/client/src/pages/booking/PaymentPage.tsx): `client/src/pages/booking/PaymentPage.tsx`
- [QR booking](https://github.com/senerol/luggage-store/blob/main/client/src/pages/booking/BookingQrPage.tsx): `client/src/pages/booking/BookingQrPage.tsx`
- [Partner workspace](https://github.com/senerol/luggage-store/blob/main/client/src/pages/partner/PartnerStoragePage.tsx): `client/src/pages/partner/PartnerStoragePage.tsx`
- [Admin workspace](https://github.com/senerol/luggage-store/blob/main/client/src/pages/admin/AdminDashboardPage.tsx): `client/src/pages/admin/AdminDashboardPage.tsx`

### API and identity

- [Express API](https://github.com/senerol/luggage-store/blob/main/server/src/app.ts): `server/src/app.ts`
- [Authentication](https://github.com/senerol/luggage-store/blob/main/server/src/services/authService.ts): `server/src/services/authService.ts`

### Marketplace operations

- [Storage search and listings](https://github.com/senerol/luggage-store/blob/main/server/src/services/storageService.ts): `server/src/services/storageService.ts`
- [Search geocoding](https://github.com/senerol/luggage-store/blob/main/server/src/services/geocodingService.ts): `server/src/services/geocodingService.ts`
- [Partner applications](https://github.com/senerol/luggage-store/blob/main/server/src/services/partnerApplicationService.ts): `server/src/services/partnerApplicationService.ts`
- [Partner operations](https://github.com/senerol/luggage-store/blob/main/server/src/services/partnerService.ts): `server/src/services/partnerService.ts`

### Booking lifecycle

- [Booking and capacity](https://github.com/senerol/luggage-store/blob/main/server/src/services/bookingService.ts): `server/src/services/bookingService.ts`
- [Pricing and commission](https://github.com/senerol/luggage-store/blob/main/server/src/services/pricingService.ts): `server/src/services/pricingService.ts`
- [Payment processing](https://github.com/senerol/luggage-store/blob/main/server/src/services/paymentService.ts): `server/src/services/paymentService.ts`
- [QR verification](https://github.com/senerol/luggage-store/blob/main/server/src/services/qrService.ts): `server/src/services/qrService.ts`

### Platform oversight

- [Customer reviews](https://github.com/senerol/luggage-store/blob/main/server/src/services/reviewService.ts): `server/src/services/reviewService.ts`
- [Notifications](https://github.com/senerol/luggage-store/blob/main/server/src/services/notificationService.ts): `server/src/services/notificationService.ts`
- [Analytics and funnel](https://github.com/senerol/luggage-store/blob/main/server/src/services/analyticsService.ts): `server/src/services/analyticsService.ts`
- [Admin operations](https://github.com/senerol/luggage-store/blob/main/server/src/services/adminService.ts): `server/src/services/adminService.ts`
- [Payout ledger](https://github.com/senerol/luggage-store/blob/main/server/src/services/payoutService.ts): `server/src/services/payoutService.ts`

### Other components

- **Traveler**
- **Storage partner**
- **Luggo admin**
- **PostgreSQL**
- **Razorpay**

## Connections

- Traveler → Web application: uses (evidence: `README.md`)
- Storage partner → Web application: uses (evidence: `README.md`)
- Luggo admin → Web application: uses (evidence: `README.md`)
- Web application → Location search: routes to (evidence: `client/src/App.tsx`)
- Web application → Booking flow: routes to (evidence: `client/src/App.tsx`)
- Web application → Payment checkout: routes to (evidence: `client/src/App.tsx`)
- Web application → QR booking: routes to (evidence: `client/src/App.tsx`)
- Web application → Partner workspace: routes to (evidence: `client/src/App.tsx`)
- Web application → Admin workspace: routes to (evidence: `client/src/App.tsx`)
- Location search → Express API: queries
- Booking flow → Express API: submits booking
- Payment checkout → Express API: requests payment
- QR booking → Express API: verifies QR
- Partner workspace → Express API: manages listings
- Admin workspace → Express API: requests operations
- Express API → Authentication: mounts auth routes (evidence: `server/src/app.ts`)
- Express API → Storage search and listings: mounts storage routes (evidence: `server/src/app.ts`)
- Express API → Partner applications: mounts partner routes (evidence: `server/src/app.ts`)
- Express API → Booking and capacity: mounts booking routes (evidence: `server/src/app.ts`)
- Express API → Payment processing: mounts payment routes (evidence: `server/src/app.ts`)
- Express API → QR verification: mounts QR routes (evidence: `server/src/app.ts`)
- Express API → Customer reviews: mounts review routes (evidence: `server/src/app.ts`)
- Express API → Admin operations: mounts admin routes (evidence: `server/src/app.ts`)
- Express API → Analytics and funnel: mounts analytics routes (evidence: `server/src/app.ts`)
- Storage search and listings → Search geocoding: geocodes searches (evidence: `server/src/services/storageService.ts`)
- Storage search and listings → Booking and capacity: checks capacity (evidence: `server/src/services/storageService.ts`)
- Storage search and listings → PostgreSQL: reads listings (evidence: `server/src/services/storageService.ts`)
- Booking and capacity → Pricing and commission: calculates price
- Booking and capacity → PostgreSQL: stores bookings
- Payment processing → Razorpay: creates orders (evidence: `README.md`)
- Payment processing → PostgreSQL: records payments
- QR verification → PostgreSQL: verifies tokens (evidence: `README.md`)
- Partner applications → PostgreSQL: tracks applications (evidence: `README.md`)
- Partner operations → PostgreSQL: manages locations
- Customer reviews → PostgreSQL: stores reviews
- Notifications → PostgreSQL: stores notifications (evidence: `README.md`)
- Analytics and funnel → PostgreSQL: queries events (evidence: `README.md`)
- Admin operations → PostgreSQL: manages marketplace
- Admin operations → Payout ledger: oversees payouts
- Pricing and commission → PostgreSQL: reads commission (evidence: `README.md`)
