How praneeth-venkat/ember-crust works
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: App.tsx App orchestration · CartContext.tsx Cart state · ReviewStep.tsx Order review · AuthContext.tsx Mock auth state
Components 31
Menu & Cart
- Dish catalog
src/data/menu.ts - Menu browsing
src/components/FoodGrid.tsx - Category filter
src/components/CategoryFilter.tsx - Menu search
src/components/SearchModal.tsx - Dish presentation
src/components/FoodCard.tsx - Cart state
src/context/CartContext.tsx - Cart drawer
src/components/CartDrawer.tsx - Sauce catalog
src/data/sauces.ts
Checkout & Orders
- Checkout flow
src/features/checkout/CheckoutModal.tsx - Order review
src/features/checkout/ReviewStep.tsx - Checkout state
src/features/checkout/CheckoutContext.tsx - Checkout validation
src/features/checkout/validation.ts - Mock checkout API
src/features/checkout/api/mockCheckoutApi.ts - Order tracking
src/features/checkout/OrderTracking.tsx - Order simulation
src/features/checkout/useOrderSimulation.ts
Accounts & Split
- Mock auth state
src/context/AuthContext.tsx - Sign-in modal
src/components/AuthModal.tsx - Order history
src/components/OrdersModal.tsx - Session timeout
src/components/SessionInactivityHandler.tsx - Split-bill state
src/features/split/SplitContext.tsx - Split calculation
src/features/split/splitUtils.ts - Group participants
src/features/split/PeopleManager.tsx - Split summary
src/features/split/SplitSummaryCard.tsx
VIP Portfolio
- VIP PIN gate
src/components/VipGateModal.tsx - VIP access config
src/config/access.ts - VIP portfolio
src/features/portfolio - Creative Lab
src/features/portfolio/playground
Shared UI & State
- App orchestration
src/App.tsx - Browser local storage
- Currency formatting
src/utils/formatCurrency.ts
Other components
- Customer
Connections 47
- Customer → App orchestration: uses
src/App.tsx - App orchestration → Menu browsing: renders
src/App.tsx - App orchestration → Category filter: renders
src/App.tsx - App orchestration → Cart drawer: renders
src/App.tsx - App orchestration → Checkout flow: opens
src/App.tsx - App orchestration → Sign-in modal: renders
src/App.tsx - App orchestration → Order history: renders
src/App.tsx - App orchestration → Menu search: renders
src/App.tsx - App orchestration → Session timeout: renders
src/App.tsx - App orchestration → VIP PIN gate: renders
src/App.tsx - App orchestration → Mock auth state: provides state
src/App.tsx - App orchestration → Cart state: provides state
src/App.tsx - App orchestration → Split-bill state: provides state
src/App.tsx - Menu browsing → Dish catalog: reads dishes
src/components/FoodGrid.tsx - Menu browsing → Dish presentation: renders
src/components/FoodGrid.tsx - Category filter → Dish catalog: reads categories
src/components/CategoryFilter.tsx - Menu search → Dish catalog: searches
src/components/SearchModal.tsx - Menu search → Cart state: adds items
src/components/SearchModal.tsx - Cart drawer → Cart state: updates
src/components/CartDrawer.tsx - Cart drawer → Sauce catalog: uses
src/components/CartDrawer.tsx - Cart state → Dish catalog: loads catalog
src/context/CartContext.tsx - Cart state → Sauce catalog: loads sauces
src/context/CartContext.tsx - Cart state → Browser local storage: persists cart
src/context/CartContext.tsx - Mock auth state → Browser local storage: persists account data
src/context/AuthContext.tsx - Sign-in modal → Mock auth state: authenticates
src/components/AuthModal.tsx - Session timeout → Mock auth state: logs out
src/components/SessionInactivityHandler.tsx - Session timeout → Cart state: clears cart
src/components/SessionInactivityHandler.tsx - Cart drawer → Split-bill state: manages group order
src/components/CartDrawer.tsx - Split-bill state → Split calculation: calculates shares
src/features/split/SplitContext.tsx - Group participants → Split-bill state: manages people
src/features/split/PeopleManager.tsx - Group participants → Split calculation: uses helpers
src/features/split/PeopleManager.tsx - Checkout flow → Order review: shows step
- Order review → Cart state: reads order
src/features/checkout/ReviewStep.tsx - Order review → Split-bill state: reads assignments
src/features/checkout/ReviewStep.tsx - Order review → Split summary: renders
src/features/checkout/ReviewStep.tsx - Order review → Checkout state: uses state
src/features/checkout/ReviewStep.tsx - Checkout state → Mock checkout API: calls
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
src/components/VipGateModal.tsx - App orchestration → VIP portfolio: unlocks lazily
src/App.tsx - VIP portfolio → Creative Lab: includes
README.md - Cart drawer → Currency formatting: formats totals
src/components/CartDrawer.tsx - Order review → Currency formatting: formats prices
src/features/checkout/ReviewStep.tsx