# sureshadapa11/the-royal-chilli architecture

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

- Interactive diagram: https://gitdiagram.com/sureshadapa11/the-royal-chilli
- Repository: https://github.com/sureshadapa11/the-royal-chilli

## Overview

The Royal Chilli is a restaurant website with menu browsing, online ordering and payment, table reservations, and restaurant administration. The customer path is menu browsing → cart/order details → checkout; reservations form a separate booking path, while the admin page supports reservation management. The sampled browser code shows menu/content presentation and cart behavior, and the API handlers show SumUp checkout creation and GitHub-backed reservation updates. The README is empty, and some page-to-API wiring is not shown, so those connections are omitted.

Main entry points: [`index.html`](https://github.com/sureshadapa11/the-royal-chilli/blob/main/index.html) (Restaurant Site), [`menu-order.html`](https://github.com/sureshadapa11/the-royal-chilli/blob/main/menu-order.html) (Menu Pages), [`content-loader.js`](https://github.com/sureshadapa11/the-royal-chilli/blob/main/content-loader.js) (Content Loader), [`order.html`](https://github.com/sureshadapa11/the-royal-chilli/blob/main/order.html) (Order Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer_site["Customer Website"]
  node_home["Restaurant Site<br/>[index.html]"]
  node_browser_ui["Site Interactions<br/>[script.js]"]
  node_menu["Menu Pages<br/>[menu-order.html]"]
end

subgraph group_ordering["Ordering &amp; Payment"]
  node_order["Order Details<br/>[order.html]"]
  node_checkout_page["Checkout Page<br/>[checkout.html]"]
  node_checkout_api["Checkout API<br/>[create-checkout.js]"]
end

subgraph group_reservations["Reservations"]
  node_booking_page["Booking Form<br/>[reservations.html]"]
  node_save_booking["Save Reservation"]
  node_admin["Admin Page<br/>[admin.html]"]
  node_update_booking["Update Reservation"]
  node_reservation_data[("Reservation Records<br/>[reservations.json]")]
end

subgraph group_content_media["Content &amp; Media"]
  node_content_loader["Content Loader<br/>[content-loader.js]"]
  node_content_data["Published Content<br/>[content.json]"]
  node_gallery["Gallery Assets"]
  node_menu_assets["Menu Downloads"]
  node_video_assets["Restaurant Videos"]
  node_print_menu["Printable Menu"]
end

node_customer(("Customer"))
node_sumup["SumUp"]
node_github["GitHub Contents API"]

node_customer -->|"visits"| node_home
node_home -->|"loads content"| node_content_loader
node_content_loader -->|"fetches"| node_content_data
node_content_loader -->|"uses assets"| node_gallery
node_customer -->|"browses"| node_menu
node_menu -->|"starts order"| node_order
node_order -->|"continues to"| node_checkout_page
node_checkout_page -.->|"creates checkout"| node_checkout_api
node_checkout_api -->|"creates payment"| node_sumup
node_customer -->|"requests booking"| node_booking_page
node_booking_page -.->|"submits booking"| node_save_booking
node_save_booking -->|"reads and writes"| node_github
node_github -->|"stores file"| node_reservation_data
node_admin -.->|"updates status"| node_update_booking
node_update_booking -->|"reads and writes"| node_github
node_menu -->|"offers pages"| node_menu_assets
node_menu -->|"offers download"| node_print_menu
node_home -->|"uses media"| node_video_assets
node_home -->|"runs interactions"| node_browser_ui

click node_home "https://github.com/sureshadapa11/the-royal-chilli/blob/main/index.html"
click node_browser_ui "https://github.com/sureshadapa11/the-royal-chilli/blob/main/script.js"
click node_menu "https://github.com/sureshadapa11/the-royal-chilli/blob/main/menu-order.html"
click node_order "https://github.com/sureshadapa11/the-royal-chilli/blob/main/order.html"
click node_checkout_page "https://github.com/sureshadapa11/the-royal-chilli/blob/main/checkout.html"
click node_checkout_api "https://github.com/sureshadapa11/the-royal-chilli/blob/main/api/create-checkout.js"
click node_booking_page "https://github.com/sureshadapa11/the-royal-chilli/blob/main/reservations.html"
click node_save_booking "https://github.com/sureshadapa11/the-royal-chilli/blob/main/api/save-reservation.js"
click node_admin "https://github.com/sureshadapa11/the-royal-chilli/blob/main/admin.html"
click node_update_booking "https://github.com/sureshadapa11/the-royal-chilli/blob/main/api/update-reservation.js"
click node_reservation_data "https://github.com/sureshadapa11/the-royal-chilli/blob/main/reservations.json"
click node_content_loader "https://github.com/sureshadapa11/the-royal-chilli/blob/main/content-loader.js"
click node_content_data "https://github.com/sureshadapa11/the-royal-chilli/blob/main/content.json"
click node_gallery "https://github.com/sureshadapa11/the-royal-chilli/tree/main/gallery"
click node_menu_assets "https://github.com/sureshadapa11/the-royal-chilli/tree/main/menu-pages"
click node_video_assets "https://github.com/sureshadapa11/the-royal-chilli/tree/main/video"
click node_print_menu "https://github.com/sureshadapa11/the-royal-chilli/blob/main/Royal_Chilli_Dinner_Menu_Print_Ready2.pdf"

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_browser_ui,node_menu toneBlue
class node_order,node_checkout_page,node_checkout_api toneAmber
class node_booking_page,node_save_booking,node_admin,node_update_booking,node_reservation_data,node_github toneMint
class node_content_loader,node_content_data,node_gallery,node_menu_assets,node_video_assets,node_print_menu toneRose
class node_customer,node_sumup toneIndigo
```

## Components

### Customer Website

- [Restaurant Site](https://github.com/sureshadapa11/the-royal-chilli/blob/main/index.html): `index.html`
- [Site Interactions](https://github.com/sureshadapa11/the-royal-chilli/blob/main/script.js): `script.js`
- [Menu Pages](https://github.com/sureshadapa11/the-royal-chilli/blob/main/menu-order.html): `menu-order.html`

### Ordering & Payment

- [Order Details](https://github.com/sureshadapa11/the-royal-chilli/blob/main/order.html): `order.html`
- [Checkout Page](https://github.com/sureshadapa11/the-royal-chilli/blob/main/checkout.html): `checkout.html`
- [Checkout API](https://github.com/sureshadapa11/the-royal-chilli/blob/main/api/create-checkout.js): `api/create-checkout.js`

### Reservations

- [Booking Form](https://github.com/sureshadapa11/the-royal-chilli/blob/main/reservations.html): `reservations.html`
- [Save Reservation](https://github.com/sureshadapa11/the-royal-chilli/blob/main/api/save-reservation.js): `api/save-reservation.js`
- [Admin Page](https://github.com/sureshadapa11/the-royal-chilli/blob/main/admin.html): `admin.html`
- [Update Reservation](https://github.com/sureshadapa11/the-royal-chilli/blob/main/api/update-reservation.js): `api/update-reservation.js`
- [Reservation Records](https://github.com/sureshadapa11/the-royal-chilli/blob/main/reservations.json): `reservations.json`

### Content & Media

- [Content Loader](https://github.com/sureshadapa11/the-royal-chilli/blob/main/content-loader.js): `content-loader.js`
- [Published Content](https://github.com/sureshadapa11/the-royal-chilli/blob/main/content.json): `content.json`
- [Gallery Assets](https://github.com/sureshadapa11/the-royal-chilli/tree/main/gallery): `gallery`
- [Menu Downloads](https://github.com/sureshadapa11/the-royal-chilli/tree/main/menu-pages): `menu-pages`
- [Restaurant Videos](https://github.com/sureshadapa11/the-royal-chilli/tree/main/video): `video`
- [Printable Menu](https://github.com/sureshadapa11/the-royal-chilli/blob/main/Royal_Chilli_Dinner_Menu_Print_Ready2.pdf): `Royal_Chilli_Dinner_Menu_Print_Ready2.pdf`

### Other components

- **Customer**
- **SumUp**
- **GitHub Contents API**

## Connections

- Customer → Restaurant Site: visits
- Restaurant Site → Content Loader: loads content
- Content Loader → Published Content: fetches
- Content Loader → Gallery Assets: uses assets
- Customer → Menu Pages: browses
- Menu Pages → Order Details: starts order
- Order Details → Checkout Page: continues to
- Checkout Page → Checkout API: creates checkout
- Checkout API → SumUp: creates payment
- Customer → Booking Form: requests booking
- Booking Form → Save Reservation: submits booking
- Save Reservation → GitHub Contents API: reads and writes
- GitHub Contents API → Reservation Records: stores file
- Admin Page → Update Reservation: updates status
- Update Reservation → GitHub Contents API: reads and writes
- Menu Pages → Menu Downloads: offers pages
- Menu Pages → Printable Menu: offers download
- Restaurant Site → Restaurant Videos: uses media
- Restaurant Site → Site Interactions: runs interactions
