# praneeth-venkat/ember-crust architecture

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

- Interactive diagram: https://gitdiagram.com/praneeth-venkat/ember-crust
- Repository: https://github.com/praneeth-venkat/ember-crust

## Overview

Ember & Crust is a frontend-only food ordering app. The main customer flow runs from menu discovery and cart management through bill splitting and a simulated checkout to order tracking/history. It also includes mock account management and a PIN-gated portfolio with an interactive Creative Lab. Connections are limited to those shown in the README or SOURCE INDEX; unsampled checkout and portfolio internals are represented by their exact enclosing directories.

Main entry points: [`src/App.tsx`](https://github.com/praneeth-venkat/ember-crust/blob/master/src/App.tsx) (App orchestration), [`src/context/CartContext.tsx`](https://github.com/praneeth-venkat/ember-crust/blob/master/src/context/CartContext.tsx) (Cart state), [`src/features/checkout/ReviewStep.tsx`](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/ReviewStep.tsx) (Order review), [`src/context/AuthContext.tsx`](https://github.com/praneeth-venkat/ember-crust/blob/master/src/context/AuthContext.tsx) (Mock auth state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ordering["Menu &amp; Cart"]
  node_menu["Dish catalog<br/>[menu.ts]"]
  node_browse["Menu browsing<br/>[FoodGrid.tsx]"]
  node_category["Category filter<br/>[CategoryFilter.tsx]"]
  node_search["Menu search<br/>[SearchModal.tsx]"]
  node_dish["Dish presentation<br/>[FoodCard.tsx]"]
  node_cart["Cart state<br/>[CartContext.tsx]"]
  node_cartdrawer["Cart drawer<br/>[CartDrawer.tsx]"]
  node_sauces["Sauce catalog<br/>[sauces.ts]"]
end

subgraph group_checkout["Checkout &amp; Orders"]
  node_checkout["Checkout flow<br/>[CheckoutModal.tsx]"]
  node_review["Order review<br/>[ReviewStep.tsx]"]
  node_checkoutstate["Checkout state"]
  node_validation["Checkout validation<br/>[validation.ts]"]
  node_mockapi["Mock checkout API<br/>[mockCheckoutApi.ts]"]
  node_tracking["Order tracking<br/>[OrderTracking.tsx]"]
  node_simulation["Order simulation"]
end

subgraph group_accounts["Accounts &amp; Split"]
  node_auth["Mock auth state<br/>[AuthContext.tsx]"]
  node_authmodal["Sign-in modal<br/>[AuthModal.tsx]"]
  node_history["Order history<br/>[OrdersModal.tsx]"]
  node_inactivity["Session timeout"]
  node_split["Split-bill state<br/>[SplitContext.tsx]"]
  node_splitmath["Split calculation<br/>[splitUtils.ts]"]
  node_people["Group participants<br/>[PeopleManager.tsx]"]
  node_splitreview["Split summary"]
end

subgraph group_vip["VIP Portfolio"]
  node_vipgate["VIP PIN gate<br/>[VipGateModal.tsx]"]
  node_access["VIP access config<br/>[access.ts]"]
  node_portfolio["VIP portfolio"]
  node_playground["Creative Lab"]
end

subgraph group_shared["Shared UI &amp; State"]
  node_app["App orchestration<br/>[App.tsx]"]
  node_localstorage[("Browser local storage")]
  node_format["Currency formatting<br/>[formatCurrency.ts]"]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_app
node_app -->|"renders"| node_browse
node_app -->|"renders"| node_category
node_app -->|"renders"| node_cartdrawer
node_app -->|"opens"| node_checkout
node_app -->|"renders"| node_authmodal
node_app -->|"renders"| node_history
node_app -->|"renders"| node_search
node_app -->|"renders"| node_inactivity
node_app -->|"renders"| node_vipgate
node_app -->|"provides state"| node_auth
node_app -->|"provides state"| node_cart
node_app -->|"provides state"| node_split
node_browse -->|"reads dishes"| node_menu
node_browse -->|"renders"| node_dish
node_category -->|"reads categories"| node_menu
node_search -->|"searches"| node_menu
node_search -->|"adds items"| node_cart
node_cartdrawer -->|"updates"| node_cart
node_cartdrawer -->|"uses"| node_sauces
node_cart -->|"loads catalog"| node_menu
node_cart -->|"loads sauces"| node_sauces
node_cart -->|"persists cart"| node_localstorage
node_auth -->|"persists account data"| node_localstorage
node_authmodal -->|"authenticates"| node_auth
node_inactivity -->|"logs out"| node_auth
node_inactivity -->|"clears cart"| node_cart
node_cartdrawer -->|"manages group order"| node_split
node_split -->|"calculates shares"| node_splitmath
node_people -->|"manages people"| node_split
node_people -->|"uses helpers"| node_splitmath
node_checkout -.->|"shows step"| node_review
node_review -->|"reads order"| node_cart
node_review -->|"reads assignments"| node_split
node_review -->|"renders"| node_splitreview
node_review -->|"uses state"| node_checkoutstate
node_checkoutstate -->|"calls"| node_mockapi
node_checkout -.->|"validates inputs"| node_validation
node_checkout -.->|"shows tracking"| node_tracking
node_tracking -.->|"simulates progress"| node_simulation
node_checkout -.->|"records orders"| node_auth
node_history -.->|"reads orders"| node_auth
node_vipgate -->|"checks PIN"| node_access
node_app -.->|"unlocks lazily"| node_portfolio
node_portfolio -.->|"includes"| node_playground
node_cartdrawer -->|"formats totals"| node_format
node_review -->|"formats prices"| node_format

click node_app "https://github.com/praneeth-venkat/ember-crust/blob/master/src/App.tsx"
click node_menu "https://github.com/praneeth-venkat/ember-crust/blob/master/src/data/menu.ts"
click node_browse "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/FoodGrid.tsx"
click node_category "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/CategoryFilter.tsx"
click node_search "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/SearchModal.tsx"
click node_dish "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/FoodCard.tsx"
click node_cart "https://github.com/praneeth-venkat/ember-crust/blob/master/src/context/CartContext.tsx"
click node_cartdrawer "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/CartDrawer.tsx"
click node_sauces "https://github.com/praneeth-venkat/ember-crust/blob/master/src/data/sauces.ts"
click node_checkout "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/CheckoutModal.tsx"
click node_review "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/ReviewStep.tsx"
click node_checkoutstate "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/CheckoutContext.tsx"
click node_validation "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/validation.ts"
click node_mockapi "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/api/mockCheckoutApi.ts"
click node_tracking "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/OrderTracking.tsx"
click node_simulation "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/useOrderSimulation.ts"
click node_auth "https://github.com/praneeth-venkat/ember-crust/blob/master/src/context/AuthContext.tsx"
click node_authmodal "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/AuthModal.tsx"
click node_history "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/OrdersModal.tsx"
click node_inactivity "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/SessionInactivityHandler.tsx"
click node_split "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/split/SplitContext.tsx"
click node_splitmath "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/split/splitUtils.ts"
click node_people "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/split/PeopleManager.tsx"
click node_splitreview "https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/split/SplitSummaryCard.tsx"
click node_vipgate "https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/VipGateModal.tsx"
click node_access "https://github.com/praneeth-venkat/ember-crust/blob/master/src/config/access.ts"
click node_portfolio "https://github.com/praneeth-venkat/ember-crust/tree/master/src/features/portfolio"
click node_playground "https://github.com/praneeth-venkat/ember-crust/tree/master/src/features/portfolio/playground"
click node_format "https://github.com/praneeth-venkat/ember-crust/blob/master/src/utils/formatCurrency.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_menu,node_browse,node_category,node_search,node_dish,node_cart,node_cartdrawer,node_sauces toneBlue
class node_checkout,node_review,node_checkoutstate,node_validation,node_mockapi,node_tracking,node_simulation toneAmber
class node_auth,node_authmodal,node_history,node_inactivity,node_split,node_splitmath,node_people,node_splitreview toneMint
class node_vipgate,node_access,node_portfolio,node_playground toneRose
class node_app,node_localstorage,node_format,node_customer toneIndigo
```

## Components

### Menu & Cart

- [Dish catalog](https://github.com/praneeth-venkat/ember-crust/blob/master/src/data/menu.ts): `src/data/menu.ts`
- [Menu browsing](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/FoodGrid.tsx): `src/components/FoodGrid.tsx`
- [Category filter](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/CategoryFilter.tsx): `src/components/CategoryFilter.tsx`
- [Menu search](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/SearchModal.tsx): `src/components/SearchModal.tsx`
- [Dish presentation](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/FoodCard.tsx): `src/components/FoodCard.tsx`
- [Cart state](https://github.com/praneeth-venkat/ember-crust/blob/master/src/context/CartContext.tsx): `src/context/CartContext.tsx`
- [Cart drawer](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/CartDrawer.tsx): `src/components/CartDrawer.tsx`
- [Sauce catalog](https://github.com/praneeth-venkat/ember-crust/blob/master/src/data/sauces.ts): `src/data/sauces.ts`

### Checkout & Orders

- [Checkout flow](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/CheckoutModal.tsx): `src/features/checkout/CheckoutModal.tsx`
- [Order review](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/ReviewStep.tsx): `src/features/checkout/ReviewStep.tsx`
- [Checkout state](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/CheckoutContext.tsx): `src/features/checkout/CheckoutContext.tsx`
- [Checkout validation](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/validation.ts): `src/features/checkout/validation.ts`
- [Mock checkout API](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/api/mockCheckoutApi.ts): `src/features/checkout/api/mockCheckoutApi.ts`
- [Order tracking](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/OrderTracking.tsx): `src/features/checkout/OrderTracking.tsx`
- [Order simulation](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/checkout/useOrderSimulation.ts): `src/features/checkout/useOrderSimulation.ts`

### Accounts & Split

- [Mock auth state](https://github.com/praneeth-venkat/ember-crust/blob/master/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Sign-in modal](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/AuthModal.tsx): `src/components/AuthModal.tsx`
- [Order history](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/OrdersModal.tsx): `src/components/OrdersModal.tsx`
- [Session timeout](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/SessionInactivityHandler.tsx): `src/components/SessionInactivityHandler.tsx`
- [Split-bill state](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/split/SplitContext.tsx): `src/features/split/SplitContext.tsx`
- [Split calculation](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/split/splitUtils.ts): `src/features/split/splitUtils.ts`
- [Group participants](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/split/PeopleManager.tsx): `src/features/split/PeopleManager.tsx`
- [Split summary](https://github.com/praneeth-venkat/ember-crust/blob/master/src/features/split/SplitSummaryCard.tsx): `src/features/split/SplitSummaryCard.tsx`

### VIP Portfolio

- [VIP PIN gate](https://github.com/praneeth-venkat/ember-crust/blob/master/src/components/VipGateModal.tsx): `src/components/VipGateModal.tsx`
- [VIP access config](https://github.com/praneeth-venkat/ember-crust/blob/master/src/config/access.ts): `src/config/access.ts`
- [VIP portfolio](https://github.com/praneeth-venkat/ember-crust/tree/master/src/features/portfolio): `src/features/portfolio`
- [Creative Lab](https://github.com/praneeth-venkat/ember-crust/tree/master/src/features/portfolio/playground): `src/features/portfolio/playground`

### Shared UI & State

- [App orchestration](https://github.com/praneeth-venkat/ember-crust/blob/master/src/App.tsx): `src/App.tsx`
- **Browser local storage**
- [Currency formatting](https://github.com/praneeth-venkat/ember-crust/blob/master/src/utils/formatCurrency.ts): `src/utils/formatCurrency.ts`

### Other components

- **Customer**

## Connections

- Customer → App orchestration: uses (evidence: `src/App.tsx`)
- App orchestration → Menu browsing: renders (evidence: `src/App.tsx`)
- App orchestration → Category filter: renders (evidence: `src/App.tsx`)
- App orchestration → Cart drawer: renders (evidence: `src/App.tsx`)
- App orchestration → Checkout flow: opens (evidence: `src/App.tsx`)
- App orchestration → Sign-in modal: renders (evidence: `src/App.tsx`)
- App orchestration → Order history: renders (evidence: `src/App.tsx`)
- App orchestration → Menu search: renders (evidence: `src/App.tsx`)
- App orchestration → Session timeout: renders (evidence: `src/App.tsx`)
- App orchestration → VIP PIN gate: renders (evidence: `src/App.tsx`)
- App orchestration → Mock auth state: provides state (evidence: `src/App.tsx`)
- App orchestration → Cart state: provides state (evidence: `src/App.tsx`)
- App orchestration → Split-bill state: provides state (evidence: `src/App.tsx`)
- Menu browsing → Dish catalog: reads dishes (evidence: `src/components/FoodGrid.tsx`)
- Menu browsing → Dish presentation: renders (evidence: `src/components/FoodGrid.tsx`)
- Category filter → Dish catalog: reads categories (evidence: `src/components/CategoryFilter.tsx`)
- Menu search → Dish catalog: searches (evidence: `src/components/SearchModal.tsx`)
- Menu search → Cart state: adds items (evidence: `src/components/SearchModal.tsx`)
- Cart drawer → Cart state: updates (evidence: `src/components/CartDrawer.tsx`)
- Cart drawer → Sauce catalog: uses (evidence: `src/components/CartDrawer.tsx`)
- Cart state → Dish catalog: loads catalog (evidence: `src/context/CartContext.tsx`)
- Cart state → Sauce catalog: loads sauces (evidence: `src/context/CartContext.tsx`)
- Cart state → Browser local storage: persists cart (evidence: `src/context/CartContext.tsx`)
- Mock auth state → Browser local storage: persists account data (evidence: `src/context/AuthContext.tsx`)
- Sign-in modal → Mock auth state: authenticates (evidence: `src/components/AuthModal.tsx`)
- Session timeout → Mock auth state: logs out (evidence: `src/components/SessionInactivityHandler.tsx`)
- Session timeout → Cart state: clears cart (evidence: `src/components/SessionInactivityHandler.tsx`)
- Cart drawer → Split-bill state: manages group order (evidence: `src/components/CartDrawer.tsx`)
- Split-bill state → Split calculation: calculates shares (evidence: `src/features/split/SplitContext.tsx`)
- Group participants → Split-bill state: manages people (evidence: `src/features/split/PeopleManager.tsx`)
- Group participants → Split calculation: uses helpers (evidence: `src/features/split/PeopleManager.tsx`)
- Checkout flow → Order review: shows step
- Order review → Cart state: reads order (evidence: `src/features/checkout/ReviewStep.tsx`)
- Order review → Split-bill state: reads assignments (evidence: `src/features/checkout/ReviewStep.tsx`)
- Order review → Split summary: renders (evidence: `src/features/checkout/ReviewStep.tsx`)
- Order review → Checkout state: uses state (evidence: `src/features/checkout/ReviewStep.tsx`)
- Checkout state → Mock checkout API: calls (evidence: `src/features/checkout/CheckoutContext.tsx`)
- Checkout flow → Checkout validation: validates inputs
- Checkout flow → Order tracking: shows tracking
- Order tracking → Order simulation: simulates progress
- Checkout flow → Mock auth state: records orders
- Order history → Mock auth state: reads orders
- VIP PIN gate → VIP access config: checks PIN (evidence: `src/components/VipGateModal.tsx`)
- App orchestration → VIP portfolio: unlocks lazily (evidence: `src/App.tsx`)
- VIP portfolio → Creative Lab: includes (evidence: `README.md`)
- Cart drawer → Currency formatting: formats totals (evidence: `src/components/CartDrawer.tsx`)
- Order review → Currency formatting: formats prices (evidence: `src/features/checkout/ReviewStep.tsx`)
