# subha035/tastybite-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/subha035/tastybite-frontend
- Repository: https://github.com/subha035/tastybite-frontend

## Overview

TastyBite is a React restaurant frontend spanning customer discovery and transactions, authentication, and an admin dashboard. The main customer journey is to browse menu and offers, place and pay for an order or submit a reservation, while admins manage menu, offers, orders, reservations, and activity. App.jsx is the evidenced routing/orchestration layer; apiService.js centralizes backend requests. Some documented capabilities, including chat and contact, are represented from the README; unsampled wiring and external service details are not inferred.

Main entry points: [`src/App.jsx`](https://github.com/subha035/tastybite-frontend/blob/main/src/App.jsx) (Tab routing), [`src/services/apiService.js`](https://github.com/subha035/tastybite-frontend/blob/main/src/services/apiService.js) (API client), [`src/components/PlaceOrder.jsx`](https://github.com/subha035/tastybite-frontend/blob/main/src/components/PlaceOrder.jsx) (Cart and checkout), [`src/components/MenuSection.jsx`](https://github.com/subha035/tastybite-frontend/blob/main/src/components/MenuSection.jsx) (Menu browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app_root["Tab routing<br/>[App.jsx]"]
  node_navigation["Navigation sidebar<br/>[Sidebar.jsx]"]
end

subgraph group_customer["Customer Experience"]
  node_home["Restaurant home<br/>[HomeSection.jsx]"]
  node_menu["Menu browser<br/>[MenuSection.jsx]"]
  node_order["Cart and checkout<br/>[PlaceOrder.jsx]"]
  node_reservation["Table booking"]
  node_offers["Offers display<br/>[OffersSection.jsx]"]
  node_chat["AI chat<br/>[ChatArea.jsx]"]
  node_contact["Contact information<br/>[ContactSection.jsx]"]
  node_quick_menu["Menu quick view<br/>[RightPanel.jsx]"]
  node_auth["Customer sign-in<br/>[AuthModal.jsx]"]
end

subgraph group_admin["Admin Operations"]
  node_admin_login["Admin login<br/>[AdminLogin.jsx]"]
  node_dashboard["Admin dashboard<br/>[AdminPanel.jsx]"]
  node_menu_admin["Menu management<br/>[MenuManager.jsx]"]
  node_offers_admin["Offer management<br/>[OffersManager.jsx]"]
  node_orders_admin["Order management<br/>[AdminOrders.jsx]"]
  node_reservations_admin["Reservation management"]
end

subgraph group_services["Integration Services"]
  node_api["API client<br/>[apiService.js]"]
  node_firebase["Firebase auth setup<br/>[firebaseConfig.js]"]
end

node_user(("Restaurant guest"))
node_admin_user(("Admin user"))
node_backend["TastyBite backend"]
node_firebase_service["Firebase Authentication"]
node_razorpay["Razorpay payments"]

node_entry -->|"renders"| node_app_root
node_app_root -->|"renders"| node_navigation
node_app_root -->|"routes to"| node_home
node_app_root -->|"routes to"| node_menu
node_app_root -->|"routes to"| node_order
node_app_root -->|"routes to"| node_reservation
node_app_root -->|"routes to"| node_offers
node_app_root -->|"routes to"| node_chat
node_app_root -->|"routes to"| node_contact
node_app_root -->|"renders"| node_quick_menu
node_app_root -->|"routes to"| node_admin_login
node_app_root -->|"routes to"| node_dashboard
node_app_root -->|"routes to"| node_menu_admin
node_app_root -->|"routes to"| node_offers_admin
node_app_root -->|"routes to"| node_orders_admin
node_app_root -->|"routes to"| node_reservations_admin
node_user -.->|"opens app"| node_entry
node_admin_user -.->|"opens app"| node_entry
node_auth -->|"auth requests"| node_api
node_auth -->|"uses auth"| node_firebase
node_firebase -->|"initializes"| node_firebase_service
node_home -.->|"loads menu"| node_api
node_menu -->|"loads menu"| node_api
node_menu -->|"creates item"| node_api
node_order -->|"loads menu and offers"| node_api
node_order -->|"submits order"| node_api
node_order -.->|"starts checkout"| node_razorpay
node_reservation -->|"creates booking"| node_api
node_offers -->|"loads offers"| node_api
node_chat -.->|"sends chat"| node_api
node_quick_menu -.->|"loads menu"| node_api
node_app_root -->|"sends chat"| node_api
node_app_root -->|"manages reservations"| node_api
node_admin_login -->|"authenticates admin"| node_api
node_dashboard -->|"loads activity"| node_api
node_menu_admin -->|"manages menu"| node_api
node_offers_admin -->|"manages offers"| node_api
node_orders_admin -->|"manages orders"| node_api
node_reservations_admin -.->|"manages bookings"| node_api
node_api -->|"HTTP requests"| node_backend

click node_entry "https://github.com/subha035/tastybite-frontend/blob/main/src/main.jsx"
click node_app_root "https://github.com/subha035/tastybite-frontend/blob/main/src/App.jsx"
click node_navigation "https://github.com/subha035/tastybite-frontend/blob/main/src/components/Sidebar.jsx"
click node_home "https://github.com/subha035/tastybite-frontend/blob/main/src/components/HomeSection.jsx"
click node_menu "https://github.com/subha035/tastybite-frontend/blob/main/src/components/MenuSection.jsx"
click node_order "https://github.com/subha035/tastybite-frontend/blob/main/src/components/PlaceOrder.jsx"
click node_reservation "https://github.com/subha035/tastybite-frontend/blob/main/src/components/ReservationsSection.jsx"
click node_offers "https://github.com/subha035/tastybite-frontend/blob/main/src/components/OffersSection.jsx"
click node_chat "https://github.com/subha035/tastybite-frontend/blob/main/src/components/ChatArea.jsx"
click node_contact "https://github.com/subha035/tastybite-frontend/blob/main/src/components/ContactSection.jsx"
click node_quick_menu "https://github.com/subha035/tastybite-frontend/blob/main/src/components/RightPanel.jsx"
click node_auth "https://github.com/subha035/tastybite-frontend/blob/main/src/components/AuthModal.jsx"
click node_admin_login "https://github.com/subha035/tastybite-frontend/blob/main/src/components/AdminLogin.jsx"
click node_dashboard "https://github.com/subha035/tastybite-frontend/blob/main/src/components/AdminPanel.jsx"
click node_menu_admin "https://github.com/subha035/tastybite-frontend/blob/main/src/components/MenuManager.jsx"
click node_offers_admin "https://github.com/subha035/tastybite-frontend/blob/main/src/components/OffersManager.jsx"
click node_orders_admin "https://github.com/subha035/tastybite-frontend/blob/main/src/components/AdminOrders.jsx"
click node_reservations_admin "https://github.com/subha035/tastybite-frontend/blob/main/src/components/AdminReservations.jsx"
click node_api "https://github.com/subha035/tastybite-frontend/blob/main/src/services/apiService.js"
click node_firebase "https://github.com/subha035/tastybite-frontend/blob/main/src/firebaseConfig.js"

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_entry,node_app_root,node_navigation,node_admin_user toneBlue
class node_home,node_menu,node_order,node_reservation,node_offers,node_chat,node_contact,node_quick_menu,node_auth toneAmber
class node_admin_login,node_dashboard,node_menu_admin,node_offers_admin,node_orders_admin,node_reservations_admin toneMint
class node_api,node_firebase toneRose
class node_user,node_backend,node_firebase_service,node_razorpay toneIndigo
```

## Components

### App Shell

- [React entry](https://github.com/subha035/tastybite-frontend/blob/main/src/main.jsx): `src/main.jsx`
- [Tab routing](https://github.com/subha035/tastybite-frontend/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation sidebar](https://github.com/subha035/tastybite-frontend/blob/main/src/components/Sidebar.jsx): `src/components/Sidebar.jsx`

### Customer Experience

- [Restaurant home](https://github.com/subha035/tastybite-frontend/blob/main/src/components/HomeSection.jsx): `src/components/HomeSection.jsx`
- [Menu browser](https://github.com/subha035/tastybite-frontend/blob/main/src/components/MenuSection.jsx): `src/components/MenuSection.jsx`
- [Cart and checkout](https://github.com/subha035/tastybite-frontend/blob/main/src/components/PlaceOrder.jsx): `src/components/PlaceOrder.jsx`
- [Table booking](https://github.com/subha035/tastybite-frontend/blob/main/src/components/ReservationsSection.jsx): `src/components/ReservationsSection.jsx`
- [Offers display](https://github.com/subha035/tastybite-frontend/blob/main/src/components/OffersSection.jsx): `src/components/OffersSection.jsx`
- [AI chat](https://github.com/subha035/tastybite-frontend/blob/main/src/components/ChatArea.jsx): `src/components/ChatArea.jsx`
- [Contact information](https://github.com/subha035/tastybite-frontend/blob/main/src/components/ContactSection.jsx): `src/components/ContactSection.jsx`
- [Menu quick view](https://github.com/subha035/tastybite-frontend/blob/main/src/components/RightPanel.jsx): `src/components/RightPanel.jsx`
- [Customer sign-in](https://github.com/subha035/tastybite-frontend/blob/main/src/components/AuthModal.jsx): `src/components/AuthModal.jsx`

### Admin Operations

- [Admin login](https://github.com/subha035/tastybite-frontend/blob/main/src/components/AdminLogin.jsx): `src/components/AdminLogin.jsx`
- [Admin dashboard](https://github.com/subha035/tastybite-frontend/blob/main/src/components/AdminPanel.jsx): `src/components/AdminPanel.jsx`
- [Menu management](https://github.com/subha035/tastybite-frontend/blob/main/src/components/MenuManager.jsx): `src/components/MenuManager.jsx`
- [Offer management](https://github.com/subha035/tastybite-frontend/blob/main/src/components/OffersManager.jsx): `src/components/OffersManager.jsx`
- [Order management](https://github.com/subha035/tastybite-frontend/blob/main/src/components/AdminOrders.jsx): `src/components/AdminOrders.jsx`
- [Reservation management](https://github.com/subha035/tastybite-frontend/blob/main/src/components/AdminReservations.jsx): `src/components/AdminReservations.jsx`

### Integration Services

- [API client](https://github.com/subha035/tastybite-frontend/blob/main/src/services/apiService.js): `src/services/apiService.js`
- [Firebase auth setup](https://github.com/subha035/tastybite-frontend/blob/main/src/firebaseConfig.js): `src/firebaseConfig.js`

### Other components

- **Restaurant guest**
- **Admin user**
- **TastyBite backend**
- **Firebase Authentication**
- **Razorpay payments**

## Connections

- React entry → Tab routing: renders (evidence: `src/main.jsx`)
- Tab routing → Navigation sidebar: renders (evidence: `src/App.jsx`)
- Tab routing → Restaurant home: routes to (evidence: `src/App.jsx`)
- Tab routing → Menu browser: routes to (evidence: `src/App.jsx`)
- Tab routing → Cart and checkout: routes to (evidence: `src/App.jsx`)
- Tab routing → Table booking: routes to (evidence: `src/App.jsx`)
- Tab routing → Offers display: routes to (evidence: `src/App.jsx`)
- Tab routing → AI chat: routes to (evidence: `src/App.jsx`)
- Tab routing → Contact information: routes to (evidence: `src/App.jsx`)
- Tab routing → Menu quick view: renders (evidence: `src/App.jsx`)
- Tab routing → Admin login: routes to (evidence: `src/App.jsx`)
- Tab routing → Admin dashboard: routes to (evidence: `src/App.jsx`)
- Tab routing → Menu management: routes to (evidence: `src/App.jsx`)
- Tab routing → Offer management: routes to (evidence: `src/App.jsx`)
- Tab routing → Order management: routes to (evidence: `src/App.jsx`)
- Tab routing → Reservation management: routes to (evidence: `src/App.jsx`)
- Restaurant guest → React entry: opens app
- Admin user → React entry: opens app
- Customer sign-in → API client: auth requests (evidence: `src/components/AuthModal.jsx`)
- Customer sign-in → Firebase auth setup: uses auth (evidence: `src/components/AuthModal.jsx`)
- Firebase auth setup → Firebase Authentication: initializes (evidence: `src/firebaseConfig.js`)
- Restaurant home → API client: loads menu (evidence: `src/components/HomeSection.jsx`)
- Menu browser → API client: loads menu (evidence: `src/components/MenuSection.jsx`)
- Menu browser → API client: creates item (evidence: `src/components/MenuSection.jsx`)
- Cart and checkout → API client: loads menu and offers (evidence: `src/components/PlaceOrder.jsx`)
- Cart and checkout → API client: submits order (evidence: `src/components/PlaceOrder.jsx`)
- Cart and checkout → Razorpay payments: starts checkout
- Table booking → API client: creates booking (evidence: `src/components/ReservationsSection.jsx`)
- Offers display → API client: loads offers (evidence: `src/components/OffersSection.jsx`)
- AI chat → API client: sends chat
- Menu quick view → API client: loads menu (evidence: `src/components/RightPanel.jsx`)
- Tab routing → API client: sends chat (evidence: `src/App.jsx`)
- Tab routing → API client: manages reservations (evidence: `src/App.jsx`)
- Admin login → API client: authenticates admin (evidence: `src/components/AdminLogin.jsx`)
- Admin dashboard → API client: loads activity (evidence: `src/components/AdminPanel.jsx`)
- Menu management → API client: manages menu (evidence: `src/components/MenuManager.jsx`)
- Offer management → API client: manages offers (evidence: `src/components/OffersManager.jsx`)
- Order management → API client: manages orders (evidence: `src/components/AdminOrders.jsx`)
- Reservation management → API client: manages bookings
- API client → TastyBite backend: HTTP requests (evidence: `src/services/apiService.js`)
