# lakshitasisodia/food-ordering-app architecture

> Architecture diagram of the GitHub repository lakshitasisodia/food-ordering-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lakshitasisodia/food-ordering-app
- Repository: https://github.com/lakshitasisodia/food-ordering-app

## Overview

##### Project type and purpose
- This is a **multi‐page, static food‐ordering web app** built purely with HTML, CSS and vanilla JavaScript.
- All “back-end” behavior (cart, favorites, order history, table booking) is emulated via the browser’s **LocalStorage API**.

##### File structure
- Top level:
- index.html + HTML subfolder (cart.html, favourites.html, orderHistory.html, plus category pages under html/)
- css/ folder (each page’s styles and shared utilities)
- images/ (food images & restaurant images)
- script.js (central JS logic)
- poster/ (marketing assets)
- No true server or database folder—persistence lives in LocalStorage.

##### README for additional insights
- Features: cart qty management, favorites, reorder from history, booking modal, form validation.
- Tech stack: HTML5, CSS3, JavaScript, LocalStorage.
- No mention of an existing backend; there are “Future Enhancements” for Node.js + MongoDB integration.

##### Detail
- How CSS files map to page components or shared styles.
- How script.js imports or references those CSS/HTML fragments if applicable.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Static Server
    A["Static Asset Server"]:::external
    A -->|HTTP GET| B["Browser / Client"]:::external

    subgraph "Browser / Client"
        direction TB
        subgraph "UI Layer" 
            direction TB
            H1["Homepage"]:::ui
            H2["Burger Category"]:::ui
            H3["Pizza Category"]:::ui
            H4["Cakes Category"]:::ui
            H5["Milkshakes Category"]:::ui
            H6["BestSeller Category"]:::ui
            H7["MostOrdered Category"]:::ui
            C1["Cart Page"]:::ui
            F1["Favourites Page"]:::ui
            O1["Order History Page"]:::ui
            R1["Reserve Table Page"]:::ui
        end

        subgraph "Logic Controller" 
            direction TB
            S["script.js Controller"]:::logic
        end

        subgraph "Styling Modules"
            direction TB
            U1["utility.css"]:::css
            U2["navbar.css"]:::css
            U3["footer.css"]:::css
            U4["mediaquery.css"]:::css
            P1["homepage.css"]:::css
            P2["bestSeller.css"]:::css
            P3["cart.css"]:::css
            P4["favourites.css"]:::css
            P5["orderHistory.css"]:::css
            P6["reserveTable.css"]:::css
            N2["navbar2format.css"]:::css
        end

        subgraph "Static Assets"
            direction TB
            I1["Food Images"]:::asset
            I2["Restaurant Images"]:::asset
            M["Marketing Posters"]:::asset
        end

        LS["LocalStorage Store"]:::storage
    end

    %% Data Flows
    B -->|Renders| H1
    B -->|Renders| H2
    B -->|Renders| H3
    B -->|Renders| H4
    B -->|Renders| H5
    B -->|Renders| H6
    B -->|Renders| H7
    B -->|Renders| C1
    B -->|Renders| F1
    B -->|Renders| O1
    B -->|Renders| R1

    H1 -->|listens to events| S
    H2 -->|listens to events| S
    H3 -->|listens to events| S
    H4 -->|listens to events| S
    H5 -->|listens to events| S
    H6 -->|listens to events| S
    H7 -->|listens to events| S
    C1 -->|listens to events| S
    F1 -->|listens to events| S
    O1 -->|listens to events| S
    R1 -->|listens to events| S

    S -->|reads/writes| LS
    S -->|updates DOM| H1
    S -->|updates DOM| H2
    S -->|updates DOM| H3
    S -->|updates DOM| H4
    S -->|updates DOM| H5
    S -->|updates DOM| H6
    S -->|updates DOM| H7
    S -->|updates DOM| C1
    S -->|updates DOM| F1
    S -->|updates DOM| O1
    S -->|updates DOM| R1

    %% Asset delivery
    A -->|serves CSS| U1
    A -->|serves CSS| U2
    A -->|serves CSS| U3
    A -->|serves CSS| U4
    A -->|serves CSS| P1
    A -->|serves CSS| P2
    A -->|serves CSS| P3
    A -->|serves CSS| P4
    A -->|serves CSS| P5
    A -->|serves CSS| P6
    A -->|serves CSS| N2
    A -->|serves JS| S
    A -->|serves Assets| I1
    A -->|serves Assets| I2
    A -->|serves Assets| M

    %% Future Backend (optional)
    subgraph "Future Backend (optional)" style dashed
        direction TB
        BE["Node.js + Express API"]:::future
        DB["MongoDB Database"]:::future
        B -->|HTTP API calls| BE
        BE -->|CRUD| DB
    end

    %% Click events
    click H1 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/index.html"
    click H2 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/burger.html"
    click H3 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/pizza.html"
    click H4 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/cakes.html"
    click H5 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/milkshakes.html"
    click H6 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/bestSEller.html"
    click H7 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/mostOrdered.html"
    click C1 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/cart.html"
    click F1 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/favourites.html"
    click O1 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/orderHistory.html"
    click R1 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/html/reserveTable.html"
    click U1 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/utility.css"
    click U2 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/navbar.css"
    click U3 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/footer.css"
    click U4 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/mediaquery.css"
    click P1 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/homepage.css"
    click P2 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/bestSeller.css"
    click P3 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/cart.css"
    click P4 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/favourites.css"
    click P5 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/orderHistory.css"
    click P6 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/reserveTable.css"
    click N2 "https://github.com/lakshitasisodia/food-ordering-app/blob/main/css/navbar2format.css"
    click S "https://github.com/lakshitasisodia/food-ordering-app/blob/main/script.js"
    click I1 "https://github.com/lakshitasisodia/food-ordering-app/tree/main/images/food images/"
    click I2 "https://github.com/lakshitasisodia/food-ordering-app/tree/main/images/restruants/"
    click M "https://github.com/lakshitasisodia/food-ordering-app/tree/main/poster/"
    click DB "https://github.com/lakshitasisodia/food-ordering-app/blob/main/README.md"

    %% Styling
    classDef ui fill:#ddeeff,stroke:#3399ff,stroke-width:1px
    classDef logic fill:#ffe4b5,stroke:#ff9900,stroke-width:1px
    classDef css fill:#f0f0f0,stroke:#999999,stroke-width:1px
    classDef asset fill:#e8fadf,stroke:#33cc33,stroke-width:1px
    classDef storage fill:#ccffcc,stroke:#33aa33,stroke-width:1px
    classDef external fill:#f5f5f5,stroke:#888888,stroke-width:1px,stroke-dasharray: 5 5
    classDef future fill:#fff2cc,stroke:#cc9900,stroke-width:1px,stroke-dasharray: 5 5
```
