# ameershahal/luxeb architecture

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

- Interactive diagram: https://gitdiagram.com/ameershahal/luxeb
- Repository: https://github.com/ameershahal/luxeb

## Overview

Luxe is a beauty salon and training-academy storefront with appointment booking, product sales, courses, and an administrative back office. Customers discover services, choose a booking through the booking wizard, and can proceed through checkout; the Stripe webhook handles post-payment fulfillment. The graph preserves the catalog, gallery, course, review, and administration branches visible in the tree. Several routes and components were not sampled, so their internal connections are omitted rather than inferred.

Main entry points: [`app/api/webhooks/stripe/route.ts`](https://github.com/ameershahal/luxeb/blob/main/app/api/webhooks/stripe/route.ts) (Stripe Webhook), [`lib/mongodb.ts`](https://github.com/ameershahal/luxeb/blob/main/lib/mongodb.ts) (MongoDB Connector), [`app/api/bookings/route.ts`](https://github.com/ameershahal/luxeb/blob/main/app/api/bookings/route.ts) (Booking API), [`app/api/create-checkout-session/route.ts`](https://github.com/ameershahal/luxeb/blob/main/app/api/create-checkout-session/route.ts) (Checkout Session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Experience"]
  node_home["Home Page<br/>[page.tsx]"]
  node_service_browse["Service Pages<br/>[page.tsx]"]
  node_service_cards["Service Listings"]
  node_courses["Course Pages<br/>[page.tsx]"]
  node_gallery["Gallery<br/>[page.tsx]"]
  node_reviews["Reviews<br/>[route.ts]"]
end

subgraph group_booking["Appointments"]
  node_booking_page["Booking Page<br/>[page.tsx]"]
  node_booking_wizard["Booking Wizard<br/>[booking-wizard.tsx]"]
  node_booking_api["Booking API<br/>[route.ts]"]
  node_availability["Slot Availability"]
  node_fulfillment["Booking Fulfillment<br/>[fulfill-booking.ts]"]
end

subgraph group_commerce["Commerce and Payments"]
  node_checkout["Checkout Session<br/>[route.ts]"]
  node_stripe["Stripe"]
  node_webhook["Stripe Webhook<br/>[route.ts]"]
  node_shop["Shop Pages<br/>[page.tsx]"]
  node_product_detail["Product Detail<br/>[product-detail.tsx]"]
  node_products_api["Products API<br/>[route.ts]"]
  node_cart["Shopping Cart<br/>[cart-context.tsx]"]
  node_orders_api["Orders API<br/>[route.ts]"]
end

subgraph group_operations["Academy Operations"]
  node_enrollment[("Course Enrollment")]
  node_admin["Admin Console<br/>[page.tsx]"]
  node_admin_bookings["Booking Management<br/>[page.tsx]"]
  node_admin_products["Product Management<br/>[page.tsx]"]
end

subgraph group_platform["Data and Integrations"]
  node_service_api["Service Catalog API<br/>[route.ts]"]
  node_mongodb["MongoDB Connector<br/>[mongodb.ts]"]
  node_product_model[("Product Records<br/>[Product.ts]")]
  node_booking_model[("Booking Records<br/>[Booking.ts]")]
  node_email["Email Service<br/>[email.ts]"]
end

node_visitor(("Customer"))

node_visitor -->|"browses"| node_home
node_home -->|"renders"| node_service_cards
node_service_cards -->|"fetches"| node_service_api
node_service_browse -->|"links to book"| node_booking_page
node_visitor -->|"starts booking"| node_booking_page
node_booking_page -->|"renders"| node_booking_wizard
node_booking_api -->|"connects"| node_mongodb
node_booking_api -->|"reads and writes"| node_booking_model
node_booking_api -->|"sends email"| node_email
node_visitor -->|"browses"| node_shop
node_shop -->|"shows products"| node_product_detail
node_product_detail -->|"connects"| node_mongodb
node_product_detail -->|"reads"| node_product_model
node_products_api -->|"connects"| node_mongodb
node_products_api -->|"queries and creates"| node_product_model
node_cart -.->|"starts checkout"| node_checkout
node_checkout -->|"checks slot"| node_availability
node_checkout -->|"creates session"| node_stripe
node_stripe -.->|"notifies payment"| node_webhook
node_webhook -->|"verifies event"| node_stripe
node_webhook -->|"connects"| node_mongodb
node_webhook -->|"fulfills booking"| node_fulfillment
node_webhook -->|"creates enrollment"| node_enrollment
node_visitor -->|"explores courses"| node_courses
node_visitor -->|"views work"| node_gallery
node_visitor -->|"uses reviews"| node_reviews
node_admin -.->|"manages bookings"| node_admin_bookings
node_admin -.->|"manages products"| node_admin_products

click node_home "https://github.com/ameershahal/luxeb/blob/main/app/page.tsx"
click node_service_browse "https://github.com/ameershahal/luxeb/blob/main/app/services/page.tsx"
click node_service_cards "https://github.com/ameershahal/luxeb/blob/main/components/services-section.tsx"
click node_service_api "https://github.com/ameershahal/luxeb/blob/main/app/api/services/route.ts"
click node_booking_page "https://github.com/ameershahal/luxeb/blob/main/app/booking/page.tsx"
click node_booking_wizard "https://github.com/ameershahal/luxeb/blob/main/components/booking/booking-wizard.tsx"
click node_booking_api "https://github.com/ameershahal/luxeb/blob/main/app/api/bookings/route.ts"
click node_availability "https://github.com/ameershahal/luxeb/blob/main/lib/booking-availability.ts"
click node_checkout "https://github.com/ameershahal/luxeb/blob/main/app/api/create-checkout-session/route.ts"
click node_webhook "https://github.com/ameershahal/luxeb/blob/main/app/api/webhooks/stripe/route.ts"
click node_fulfillment "https://github.com/ameershahal/luxeb/blob/main/lib/fulfill-booking.ts"
click node_shop "https://github.com/ameershahal/luxeb/blob/main/app/shop/page.tsx"
click node_product_detail "https://github.com/ameershahal/luxeb/blob/main/components/shop/product-detail.tsx"
click node_products_api "https://github.com/ameershahal/luxeb/blob/main/app/api/products/route.ts"
click node_cart "https://github.com/ameershahal/luxeb/blob/main/contexts/cart-context.tsx"
click node_orders_api "https://github.com/ameershahal/luxeb/blob/main/app/api/orders/route.ts"
click node_courses "https://github.com/ameershahal/luxeb/blob/main/app/courses/page.tsx"
click node_enrollment "https://github.com/ameershahal/luxeb/blob/main/lib/models/CourseEnrollment.ts"
click node_gallery "https://github.com/ameershahal/luxeb/blob/main/app/gallery/page.tsx"
click node_reviews "https://github.com/ameershahal/luxeb/blob/main/app/api/reviews/route.ts"
click node_admin "https://github.com/ameershahal/luxeb/blob/main/app/admin/dashboard/page.tsx"
click node_admin_bookings "https://github.com/ameershahal/luxeb/blob/main/app/admin/bookings/page.tsx"
click node_admin_products "https://github.com/ameershahal/luxeb/blob/main/app/admin/products/page.tsx"
click node_mongodb "https://github.com/ameershahal/luxeb/blob/main/lib/mongodb.ts"
click node_product_model "https://github.com/ameershahal/luxeb/blob/main/lib/models/Product.ts"
click node_booking_model "https://github.com/ameershahal/luxeb/blob/main/lib/models/Booking.ts"
click node_email "https://github.com/ameershahal/luxeb/blob/main/lib/email.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_home,node_service_browse,node_service_cards,node_courses,node_gallery,node_reviews toneBlue
class node_booking_page,node_booking_wizard,node_booking_api,node_availability,node_fulfillment toneAmber
class node_checkout,node_stripe,node_webhook,node_shop,node_product_detail,node_products_api,node_cart,node_orders_api toneMint
class node_enrollment,node_admin,node_admin_bookings,node_admin_products toneRose
class node_service_api,node_mongodb,node_product_model,node_booking_model,node_email,node_visitor toneIndigo
```

## Components

### Customer Experience

- [Home Page](https://github.com/ameershahal/luxeb/blob/main/app/page.tsx): `app/page.tsx`
- [Service Pages](https://github.com/ameershahal/luxeb/blob/main/app/services/page.tsx): `app/services/page.tsx`
- [Service Listings](https://github.com/ameershahal/luxeb/blob/main/components/services-section.tsx): `components/services-section.tsx`
- [Course Pages](https://github.com/ameershahal/luxeb/blob/main/app/courses/page.tsx): `app/courses/page.tsx`
- [Gallery](https://github.com/ameershahal/luxeb/blob/main/app/gallery/page.tsx): `app/gallery/page.tsx`
- [Reviews](https://github.com/ameershahal/luxeb/blob/main/app/api/reviews/route.ts): `app/api/reviews/route.ts`

### Appointments

- [Booking Page](https://github.com/ameershahal/luxeb/blob/main/app/booking/page.tsx): `app/booking/page.tsx`
- [Booking Wizard](https://github.com/ameershahal/luxeb/blob/main/components/booking/booking-wizard.tsx): `components/booking/booking-wizard.tsx`
- [Booking API](https://github.com/ameershahal/luxeb/blob/main/app/api/bookings/route.ts): `app/api/bookings/route.ts`
- [Slot Availability](https://github.com/ameershahal/luxeb/blob/main/lib/booking-availability.ts): `lib/booking-availability.ts`
- [Booking Fulfillment](https://github.com/ameershahal/luxeb/blob/main/lib/fulfill-booking.ts): `lib/fulfill-booking.ts`

### Commerce and Payments

- [Checkout Session](https://github.com/ameershahal/luxeb/blob/main/app/api/create-checkout-session/route.ts): `app/api/create-checkout-session/route.ts`
- **Stripe**
- [Stripe Webhook](https://github.com/ameershahal/luxeb/blob/main/app/api/webhooks/stripe/route.ts): `app/api/webhooks/stripe/route.ts`
- [Shop Pages](https://github.com/ameershahal/luxeb/blob/main/app/shop/page.tsx): `app/shop/page.tsx`
- [Product Detail](https://github.com/ameershahal/luxeb/blob/main/components/shop/product-detail.tsx): `components/shop/product-detail.tsx`
- [Products API](https://github.com/ameershahal/luxeb/blob/main/app/api/products/route.ts): `app/api/products/route.ts`
- [Shopping Cart](https://github.com/ameershahal/luxeb/blob/main/contexts/cart-context.tsx): `contexts/cart-context.tsx`
- [Orders API](https://github.com/ameershahal/luxeb/blob/main/app/api/orders/route.ts): `app/api/orders/route.ts`

### Academy Operations

- [Course Enrollment](https://github.com/ameershahal/luxeb/blob/main/lib/models/CourseEnrollment.ts): `lib/models/CourseEnrollment.ts`
- [Admin Console](https://github.com/ameershahal/luxeb/blob/main/app/admin/dashboard/page.tsx): `app/admin/dashboard/page.tsx`
- [Booking Management](https://github.com/ameershahal/luxeb/blob/main/app/admin/bookings/page.tsx): `app/admin/bookings/page.tsx`
- [Product Management](https://github.com/ameershahal/luxeb/blob/main/app/admin/products/page.tsx): `app/admin/products/page.tsx`

### Data and Integrations

- [Service Catalog API](https://github.com/ameershahal/luxeb/blob/main/app/api/services/route.ts): `app/api/services/route.ts`
- [MongoDB Connector](https://github.com/ameershahal/luxeb/blob/main/lib/mongodb.ts): `lib/mongodb.ts`
- [Product Records](https://github.com/ameershahal/luxeb/blob/main/lib/models/Product.ts): `lib/models/Product.ts`
- [Booking Records](https://github.com/ameershahal/luxeb/blob/main/lib/models/Booking.ts): `lib/models/Booking.ts`
- [Email Service](https://github.com/ameershahal/luxeb/blob/main/lib/email.ts): `lib/email.ts`

### Other components

- **Customer**

## Connections

- Customer → Home Page: browses
- Home Page → Service Listings: renders (evidence: `app/page.tsx`)
- Service Listings → Service Catalog API: fetches (evidence: `components/services-section.tsx`)
- Service Pages → Booking Page: links to book
- Customer → Booking Page: starts booking
- Booking Page → Booking Wizard: renders (evidence: `app/booking/page.tsx`)
- Booking API → MongoDB Connector: connects (evidence: `app/api/bookings/route.ts`)
- Booking API → Booking Records: reads and writes (evidence: `app/api/bookings/route.ts`)
- Booking API → Email Service: sends email (evidence: `app/api/bookings/route.ts`)
- Customer → Shop Pages: browses
- Shop Pages → Product Detail: shows products
- Product Detail → MongoDB Connector: connects (evidence: `app/shop/[id]/page.tsx`)
- Product Detail → Product Records: reads (evidence: `app/shop/[id]/page.tsx`)
- Products API → MongoDB Connector: connects (evidence: `app/api/products/route.ts`)
- Products API → Product Records: queries and creates (evidence: `app/api/products/route.ts`)
- Shopping Cart → Checkout Session: starts checkout
- Checkout Session → Slot Availability: checks slot (evidence: `app/api/create-checkout-session/route.ts`)
- Checkout Session → Stripe: creates session (evidence: `app/api/create-checkout-session/route.ts`)
- Stripe → Stripe Webhook: notifies payment
- Stripe Webhook → Stripe: verifies event (evidence: `app/api/webhooks/stripe/route.ts`)
- Stripe Webhook → MongoDB Connector: connects (evidence: `app/api/webhooks/stripe/route.ts`)
- Stripe Webhook → Booking Fulfillment: fulfills booking (evidence: `app/api/webhooks/stripe/route.ts`)
- Stripe Webhook → Course Enrollment: creates enrollment (evidence: `app/api/webhooks/stripe/route.ts`)
- Customer → Course Pages: explores courses
- Customer → Gallery: views work
- Customer → Reviews: uses reviews
- Admin Console → Booking Management: manages bookings
- Admin Console → Product Management: manages products
