# rounit20/eatbit architecture

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

- Interactive diagram: https://gitdiagram.com/rounit20/eatbit
- Repository: https://github.com/rounit20/eatbit

## Overview

EatBit is a restaurant-discovery and food-ordering web app with customer, outlet-owner, and administrator experiences. The visible customer journey routes users from outlet discovery and menu viewing into a cart, checkout, and order history; authenticated routes are guarded by PrivateRoute. Firebase provides authentication and Firestore-backed state, including carts, outlets, and orders. The README provides no feature detail, so several workflow links rely on routing evidence or are omitted where implementation was not sampled.

Main entry points: [`EatBit/src/App.jsx`](https://github.com/rounit20/eatbit/blob/main/EatBit/src/App.jsx) (App Router), [`EatBit/src/components/Signup.jsx`](https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/Signup.jsx) (Customer Signup), [`EatBit/src/firebase.js`](https://github.com/rounit20/eatbit/blob/main/EatBit/src/firebase.js) (Firebase Client), [`EatBit/src/pages/OutletDetails.jsx`](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletDetails.jsx) (Outlet Menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_application["App Router<br/>[App.jsx]"]
  node_private_route["Route Guard<br/>[PrivateRoute.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
end

subgraph group_customer["Customer Ordering"]
  node_landing["Landing Page<br/>[LandingPage.jsx]"]
  node_outlet_list["Outlet List<br/>[Outlets.jsx]"]
  node_outlet_detail["Outlet Menu<br/>[OutletDetails.jsx]"]
  node_cart["Cart State<br/>[CartContext.jsx]"]
  node_cart_page["Cart Page<br/>[Cart.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_orders["Order Placement<br/>[OrdersPage.jsx]"]
  node_order_history["Order History<br/>[MyOrders.jsx]"]
  node_user_profile["User Profile<br/>[UserData.jsx]"]
  node_signup["Customer Signup<br/>[Signup.jsx]"]
  node_login["Customer Login<br/>[Login.jsx]"]
end

subgraph group_outlets["Outlet Operations"]
  node_outlet_signup["Owner Signup<br/>[OutletSignup.jsx]"]
  node_outlet_login["Owner Login<br/>[OutletLogin.jsx]"]
  node_outlet_dashboard["Owner Dashboard"]
end

subgraph group_admin["Administration"]
  node_admin_auth["Admin Access<br/>[AdminAuth.jsx]"]
  node_admin_dashboard["Admin Dashboard<br/>[AdminDashboard.jsx]"]
  node_add_outlet["Protected Outlet Add"]
  node_edit_outlet["Outlet Editor<br/>[EditOutlet.jsx]"]
end

subgraph group_services["Firebase Services"]
  node_firebase_client["Firebase Client<br/>[firebase.js]"]
  node_firebase_auth["Firebase Auth"]
  node_firestore[("Cloud Firestore")]
end

node_customer_actor(("Customer"))

node_customer_actor -->|"uses"| node_application
node_application -->|"routes"| node_landing
node_application -->|"routes"| node_outlet_list
node_application -->|"routes"| node_outlet_detail
node_application -->|"routes"| node_cart_page
node_application -->|"routes"| node_checkout
node_application -->|"routes"| node_orders
node_application -->|"routes"| node_order_history
node_application -->|"routes"| node_user_profile
node_application -->|"guards"| node_private_route
node_application -->|"renders"| node_navbar
node_application -->|"provides"| node_cart
node_application -->|"routes"| node_admin_auth
node_application -->|"routes"| node_admin_dashboard
node_application -->|"routes"| node_add_outlet
node_application -->|"routes"| node_edit_outlet
node_application -->|"routes"| node_outlet_signup
node_application -->|"routes"| node_outlet_login
node_application -->|"routes"| node_outlet_dashboard
node_signup -->|"creates account"| node_firebase_auth
node_signup -->|"stores profile"| node_firestore
node_cart -->|"loads and saves"| node_firestore
node_admin_auth -->|"checks sessions"| node_firestore
node_admin_dashboard -->|"manages outlets"| node_firestore
node_outlet_dashboard -->|"reads and updates"| node_firestore
node_outlet_detail -->|"loads outlet"| node_firestore
node_order_history -->|"loads orders"| node_firestore
node_firebase_client -->|"initializes"| node_firebase_auth
node_firebase_client -->|"initializes"| node_firestore

click node_application "https://github.com/rounit20/eatbit/blob/main/EatBit/src/App.jsx"
click node_landing "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/LandingPage.jsx"
click node_outlet_list "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/Outlets.jsx"
click node_outlet_detail "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletDetails.jsx"
click node_cart "https://github.com/rounit20/eatbit/blob/main/EatBit/src/Context/CartContext.jsx"
click node_cart_page "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/Cart.jsx"
click node_checkout "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/Checkout.jsx"
click node_orders "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OrdersPage.jsx"
click node_order_history "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/MyOrders.jsx"
click node_user_profile "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/UserData.jsx"
click node_signup "https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/Signup.jsx"
click node_login "https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/Login.jsx"
click node_private_route "https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/PrivateRoute.jsx"
click node_navbar "https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/Navbar.jsx"
click node_firebase_client "https://github.com/rounit20/eatbit/blob/main/EatBit/src/firebase.js"
click node_admin_auth "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/AdminAuth.jsx"
click node_admin_dashboard "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/AdminDashboard.jsx"
click node_add_outlet "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/ProtectedAddOutlet.jsx"
click node_edit_outlet "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/EditOutlet.jsx"
click node_outlet_signup "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletSignup.jsx"
click node_outlet_login "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletLogin.jsx"
click node_outlet_dashboard "https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletDashboard.jsx"

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_application,node_private_route,node_navbar toneBlue
class node_landing,node_outlet_list,node_outlet_detail,node_cart,node_cart_page,node_checkout,node_orders,node_order_history,node_user_profile,node_signup,node_login toneAmber
class node_outlet_signup,node_outlet_login,node_outlet_dashboard toneMint
class node_admin_auth,node_admin_dashboard,node_add_outlet,node_edit_outlet toneRose
class node_firebase_client,node_firebase_auth,node_firestore,node_customer_actor toneIndigo
```

## Components

### Application

- [App Router](https://github.com/rounit20/eatbit/blob/main/EatBit/src/App.jsx): `EatBit/src/App.jsx`
- [Route Guard](https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/PrivateRoute.jsx): `EatBit/src/components/PrivateRoute.jsx`
- [Navigation](https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/Navbar.jsx): `EatBit/src/components/Navbar.jsx`

### Customer Ordering

- [Landing Page](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/LandingPage.jsx): `EatBit/src/pages/LandingPage.jsx`
- [Outlet List](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/Outlets.jsx): `EatBit/src/pages/Outlets.jsx`
- [Outlet Menu](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletDetails.jsx): `EatBit/src/pages/OutletDetails.jsx`
- [Cart State](https://github.com/rounit20/eatbit/blob/main/EatBit/src/Context/CartContext.jsx): `EatBit/src/Context/CartContext.jsx`
- [Cart Page](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/Cart.jsx): `EatBit/src/pages/Cart.jsx`
- [Checkout](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/Checkout.jsx): `EatBit/src/pages/Checkout.jsx`
- [Order Placement](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OrdersPage.jsx): `EatBit/src/pages/OrdersPage.jsx`
- [Order History](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/MyOrders.jsx): `EatBit/src/pages/MyOrders.jsx`
- [User Profile](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/UserData.jsx): `EatBit/src/pages/UserData.jsx`
- [Customer Signup](https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/Signup.jsx): `EatBit/src/components/Signup.jsx`
- [Customer Login](https://github.com/rounit20/eatbit/blob/main/EatBit/src/components/Login.jsx): `EatBit/src/components/Login.jsx`

### Outlet Operations

- [Owner Signup](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletSignup.jsx): `EatBit/src/pages/OutletSignup.jsx`
- [Owner Login](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletLogin.jsx): `EatBit/src/pages/OutletLogin.jsx`
- [Owner Dashboard](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/OutletDashboard.jsx): `EatBit/src/pages/OutletDashboard.jsx`

### Administration

- [Admin Access](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/AdminAuth.jsx): `EatBit/src/pages/AdminAuth.jsx`
- [Admin Dashboard](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/AdminDashboard.jsx): `EatBit/src/pages/AdminDashboard.jsx`
- [Protected Outlet Add](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/ProtectedAddOutlet.jsx): `EatBit/src/pages/ProtectedAddOutlet.jsx`
- [Outlet Editor](https://github.com/rounit20/eatbit/blob/main/EatBit/src/pages/EditOutlet.jsx): `EatBit/src/pages/EditOutlet.jsx`

### Firebase Services

- [Firebase Client](https://github.com/rounit20/eatbit/blob/main/EatBit/src/firebase.js): `EatBit/src/firebase.js`
- **Firebase Auth**
- **Cloud Firestore**

### Other components

- **Customer**

## Connections

- Customer → App Router: uses
- App Router → Landing Page: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Outlet List: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Outlet Menu: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Cart Page: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Checkout: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Order Placement: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Order History: routes (evidence: `EatBit/src/App.jsx`)
- App Router → User Profile: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Route Guard: guards (evidence: `EatBit/src/App.jsx`)
- App Router → Navigation: renders (evidence: `EatBit/src/App.jsx`)
- App Router → Cart State: provides (evidence: `EatBit/src/App.jsx`)
- App Router → Admin Access: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Admin Dashboard: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Protected Outlet Add: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Outlet Editor: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Owner Signup: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Owner Login: routes (evidence: `EatBit/src/App.jsx`)
- App Router → Owner Dashboard: routes (evidence: `EatBit/src/App.jsx`)
- Customer Signup → Firebase Auth: creates account (evidence: `EatBit/src/components/Signup.jsx`)
- Customer Signup → Cloud Firestore: stores profile (evidence: `EatBit/src/components/Signup.jsx`)
- Cart State → Cloud Firestore: loads and saves (evidence: `EatBit/src/Context/CartContext.jsx`)
- Admin Access → Cloud Firestore: checks sessions (evidence: `EatBit/src/pages/AdminAuth.jsx`)
- Admin Dashboard → Cloud Firestore: manages outlets (evidence: `EatBit/src/pages/AdminDashboard.jsx`)
- Owner Dashboard → Cloud Firestore: reads and updates (evidence: `EatBit/src/pages/OutletDashboard.jsx`)
- Outlet Menu → Cloud Firestore: loads outlet (evidence: `EatBit/src/pages/OutletDetails.jsx`)
- Order History → Cloud Firestore: loads orders (evidence: `EatBit/src/pages/MyOrders.jsx`)
- Firebase Client → Firebase Auth: initializes (evidence: `EatBit/src/firebase.js`)
- Firebase Client → Cloud Firestore: initializes (evidence: `EatBit/src/firebase.js`)
