# ritheesh024-hub/savora architecture

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

- Interactive diagram: https://gitdiagram.com/ritheesh024-hub/savora
- Repository: https://github.com/ritheesh024-hub/savora

## Overview

Savora is a mobile-first restaurant ordering and operations platform. Its principal customer workflow is discovering menu items, customizing a cart, placing an order, and tracking it while staff prepare it. The README also documents QR ordering, payments, kitchen operations, analytics, favorites, order history, and AI support. The graph includes those documented capabilities; some implementation details and connections are not verifiable from the sampled source, so README-supported links are cited as such.

Main entry points: [`src/app/checkout/page.tsx`](https://github.com/ritheesh024-hub/savora/blob/main/src/app/checkout/page.tsx) (Checkout), [`src/app/admin/dashboard/page.tsx`](https://github.com/ritheesh024-hub/savora/blob/main/src/app/admin/dashboard/page.tsx) (Admin Dashboard), [`src/app/page.tsx`](https://github.com/ritheesh024-hub/savora/blob/main/src/app/page.tsx) (Storefront), [`src/app/menu/page.tsx`](https://github.com/ritheesh024-hub/savora/blob/main/src/app/menu/page.tsx) (Menu Browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Ordering"]
  node_home["Storefront<br/>[page.tsx]"]
  node_menu["Menu Browser<br/>[page.tsx]"]
  node_product["Product Options<br/>[FoodCard.tsx]"]
  node_cart["Cart State<br/>[store.ts]"]
  node_checkout["Checkout<br/>[page.tsx]"]
  node_orders["Order History<br/>[page.tsx]"]
  node_tracking["Order Tracking<br/>[page.tsx]"]
  node_favorites["Favorites<br/>[page.tsx]"]
  node_qr["QR Ordering<br/>[page.tsx]"]
  node_support["Customer Support<br/>[page.tsx]"]
end

subgraph group_operations["Restaurant Operations"]
  node_kitchen["Kitchen Management<br/>[KitchenSystem.tsx]"]
  node_admin["Admin Dashboard<br/>[page.tsx]"]
end

subgraph group_platform["Platform Services"]
  node_auth["Authentication<br/>[AuthModal.tsx]"]
  node_firebase["Firebase Services<br/>[index.ts]"]
  node_firestore[("Firestore")]
end

subgraph group_intelligence["AI and Insights"]
  node_analytics["Analytics<br/>[use-analytics.ts]"]
  node_supportai["Support AI<br/>[support-ai-flow.ts]"]
  node_recommendations["Meal Recommendations"]
  node_reviewsai["Review Summaries"]
end

node_customer(("Customer"))
node_payments["UPI / Cash"]

node_customer -->|"discovers"| node_home
node_home -->|"browses"| node_menu
node_menu -->|"customizes"| node_product
node_product -->|"adds items"| node_cart
node_cart -->|"checks out"| node_checkout
node_checkout -->|"pays with"| node_payments
node_checkout -->|"places order"| node_orders
node_orders -->|"opens tracking"| node_tracking
node_tracking -->|"tracks preparation"| node_kitchen
node_customer -->|"starts QR order"| node_qr
node_customer -->|"manages favorites"| node_favorites
node_checkout -->|"authenticates"| node_auth
node_checkout -->|"uses services"| node_firebase
node_firebase -->|"accesses data"| node_firestore
node_admin -->|"coordinates orders"| node_kitchen
node_admin -->|"views insights"| node_analytics
node_support -->|"requests assistance"| node_supportai
node_home -.->|"offers suggestions"| node_recommendations
node_admin -.->|"summarizes feedback"| node_reviewsai

click node_home "https://github.com/ritheesh024-hub/savora/blob/main/src/app/page.tsx"
click node_menu "https://github.com/ritheesh024-hub/savora/blob/main/src/app/menu/page.tsx"
click node_product "https://github.com/ritheesh024-hub/savora/blob/main/src/components/FoodCard.tsx"
click node_cart "https://github.com/ritheesh024-hub/savora/blob/main/src/app/lib/store.ts"
click node_checkout "https://github.com/ritheesh024-hub/savora/blob/main/src/app/checkout/page.tsx"
click node_orders "https://github.com/ritheesh024-hub/savora/blob/main/src/app/orders/page.tsx"
click node_tracking "https://github.com/ritheesh024-hub/savora/blob/main/src/app/orders/%5BorderId%5D/page.tsx"
click node_favorites "https://github.com/ritheesh024-hub/savora/blob/main/src/app/favorites/page.tsx"
click node_qr "https://github.com/ritheesh024-hub/savora/blob/main/src/app/scan/page.tsx"
click node_auth "https://github.com/ritheesh024-hub/savora/blob/main/src/components/AuthModal.tsx"
click node_firebase "https://github.com/ritheesh024-hub/savora/blob/main/src/firebase/index.ts"
click node_kitchen "https://github.com/ritheesh024-hub/savora/blob/main/src/components/KitchenSystem.tsx"
click node_admin "https://github.com/ritheesh024-hub/savora/blob/main/src/app/admin/dashboard/page.tsx"
click node_analytics "https://github.com/ritheesh024-hub/savora/blob/main/src/hooks/use-analytics.ts"
click node_support "https://github.com/ritheesh024-hub/savora/blob/main/src/app/support/page.tsx"
click node_supportai "https://github.com/ritheesh024-hub/savora/blob/main/src/ai/flows/support-ai-flow.ts"
click node_recommendations "https://github.com/ritheesh024-hub/savora/blob/main/src/ai/flows/contextual-meal-recommendations-flow.ts"
click node_reviewsai "https://github.com/ritheesh024-hub/savora/blob/main/src/ai/flows/review-summary-generator.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_menu,node_product,node_cart,node_checkout,node_orders,node_tracking,node_favorites,node_qr,node_support toneBlue
class node_kitchen,node_admin toneAmber
class node_auth,node_firebase,node_firestore toneMint
class node_analytics,node_supportai,node_recommendations,node_reviewsai toneRose
class node_customer,node_payments toneIndigo
```

## Components

### Customer Ordering

- [Storefront](https://github.com/ritheesh024-hub/savora/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Menu Browser](https://github.com/ritheesh024-hub/savora/blob/main/src/app/menu/page.tsx): `src/app/menu/page.tsx`
- [Product Options](https://github.com/ritheesh024-hub/savora/blob/main/src/components/FoodCard.tsx): `src/components/FoodCard.tsx`
- [Cart State](https://github.com/ritheesh024-hub/savora/blob/main/src/app/lib/store.ts): `src/app/lib/store.ts`
- [Checkout](https://github.com/ritheesh024-hub/savora/blob/main/src/app/checkout/page.tsx): `src/app/checkout/page.tsx`
- [Order History](https://github.com/ritheesh024-hub/savora/blob/main/src/app/orders/page.tsx): `src/app/orders/page.tsx`
- [Order Tracking](https://github.com/ritheesh024-hub/savora/blob/main/src/app/orders/%5BorderId%5D/page.tsx): `src/app/orders/[orderId]/page.tsx`
- [Favorites](https://github.com/ritheesh024-hub/savora/blob/main/src/app/favorites/page.tsx): `src/app/favorites/page.tsx`
- [QR Ordering](https://github.com/ritheesh024-hub/savora/blob/main/src/app/scan/page.tsx): `src/app/scan/page.tsx`
- [Customer Support](https://github.com/ritheesh024-hub/savora/blob/main/src/app/support/page.tsx): `src/app/support/page.tsx`

### Restaurant Operations

- [Kitchen Management](https://github.com/ritheesh024-hub/savora/blob/main/src/components/KitchenSystem.tsx): `src/components/KitchenSystem.tsx`
- [Admin Dashboard](https://github.com/ritheesh024-hub/savora/blob/main/src/app/admin/dashboard/page.tsx): `src/app/admin/dashboard/page.tsx`

### Platform Services

- [Authentication](https://github.com/ritheesh024-hub/savora/blob/main/src/components/AuthModal.tsx): `src/components/AuthModal.tsx`
- [Firebase Services](https://github.com/ritheesh024-hub/savora/blob/main/src/firebase/index.ts): `src/firebase/index.ts`
- **Firestore**

### AI and Insights

- [Analytics](https://github.com/ritheesh024-hub/savora/blob/main/src/hooks/use-analytics.ts): `src/hooks/use-analytics.ts`
- [Support AI](https://github.com/ritheesh024-hub/savora/blob/main/src/ai/flows/support-ai-flow.ts): `src/ai/flows/support-ai-flow.ts`
- [Meal Recommendations](https://github.com/ritheesh024-hub/savora/blob/main/src/ai/flows/contextual-meal-recommendations-flow.ts): `src/ai/flows/contextual-meal-recommendations-flow.ts`
- [Review Summaries](https://github.com/ritheesh024-hub/savora/blob/main/src/ai/flows/review-summary-generator.ts): `src/ai/flows/review-summary-generator.ts`

### Other components

- **Customer**
- **UPI / Cash**

## Connections

- Customer → Storefront: discovers
- Storefront → Menu Browser: browses
- Menu Browser → Product Options: customizes (evidence: `src/app/menu/page.tsx`)
- Product Options → Cart State: adds items (evidence: `src/components/FoodCard.tsx`)
- Cart State → Checkout: checks out (evidence: `src/app/checkout/page.tsx`)
- Checkout → UPI / Cash: pays with
- Checkout → Order History: places order
- Order History → Order Tracking: opens tracking
- Order Tracking → Kitchen Management: tracks preparation
- Customer → QR Ordering: starts QR order
- Customer → Favorites: manages favorites
- Checkout → Authentication: authenticates (evidence: `src/app/checkout/page.tsx`)
- Checkout → Firebase Services: uses services (evidence: `src/app/checkout/page.tsx`)
- Firebase Services → Firestore: accesses data (evidence: `src/firebase/index.ts`)
- Admin Dashboard → Kitchen Management: coordinates orders
- Admin Dashboard → Analytics: views insights
- Customer Support → Support AI: requests assistance (evidence: `src/app/support/page.tsx`)
- Storefront → Meal Recommendations: offers suggestions
- Admin Dashboard → Review Summaries: summarizes feedback
