# arjung352/tastebudstreat architecture

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

- Interactive diagram: https://gitdiagram.com/arjung352/tastebudstreat
- Repository: https://github.com/arjung352/tastebudstreat

## Overview

TasteBudsTreat is a MERN food-ordering demo: users browse restaurants and dishes, add items to a cart, and proceed through a simulated checkout; restaurant and menu management are also provided. The frontend uses Clerk for sign-in and offers an AI chatbot, while the backend exposes API routes, persists records in MongoDB, and integrates payment and email features. The graph follows documented and indexed relationships; some implementation details are unsampled, so uncertain connections are omitted.

Main entry points: [`Backend/backend.js`](https://github.com/arjung352/tastebudstreat/blob/main/Backend/backend.js) (Express server), [`Frontend/src/Components/Main/App.jsx`](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Main/App.jsx) (Route entry), [`Frontend/src/Components/Menu/Menu.jsx`](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Menu/Menu.jsx) (Menu browsing), [`Backend/routes/menu.js`](https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/menu.js) (Menu API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer experience"]
  node_app["Route entry<br/>[App.jsx]"]
  node_home["Home discovery<br/>[Home.jsx]"]
  node_menu["Menu browsing<br/>[Menu.jsx]"]
  node_nav["Navigation and sign-in<br/>[Navbar.jsx]"]
  node_cart["Cart and checkout<br/>[Cart.jsx]"]
  node_cartstate["Cart count state<br/>[CartSlice.js]"]
  node_paymentpage["Payment confirmation<br/>[PaymentSuccess.jsx]"]
  node_chatbot["AI chatbot<br/>[Chatbot.jsx]"]
  node_about["About and team<br/>[About.jsx]"]
  node_contact["Contact and FAQ<br/>[ContactUs.jsx]"]
end

subgraph group_management["Restaurant management"]
  node_admin["Admin dashboard<br/>[Admin.jsx]"]
  node_restaurantform["Restaurant registration"]
  node_menumanage["Menu management<br/>[Menu.jsx]"]
end

subgraph group_server["API and persistence"]
  node_api["Express server<br/>[backend.js]"]
  node_restaurantapi["Restaurant API<br/>[restaurant.js]"]
  node_menuapi["Menu API<br/>[menu.js]"]
  node_cartapi["Cart API<br/>[cart.js]"]
  node_userapi["User API<br/>[user.js]"]
  node_dashboardapi["Dashboard API<br/>[dashboard.js]"]
  node_restaurantmodel[("Restaurant records<br/>[Restaurant.js]")]
  node_menumodel[("Menu records<br/>[Menu.js]")]
  node_cartmodel[("Cart records<br/>[Cart.js]")]
  node_usermodel[("User and order history<br/>[User.js]")]
end

subgraph group_integrations["External services"]
  node_clerk["Clerk identity"]
  node_gemini["Gemini API"]
  node_razorpay["Razorpay"]
  node_cloudinary["Cloudinary media"]
  node_gmail["Gmail delivery"]
  node_mongo[("MongoDB")]
end

node_user(("Visitor"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_menu
node_app -->|"routes to"| node_cart
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_restaurantform
node_app -->|"routes to"| node_menumanage
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_contact
node_home -->|"renders"| node_chatbot
node_menu -->|"renders"| node_chatbot
node_menu -->|"fetches restaurants"| node_restaurantapi
node_menu -->|"fetches dishes"| node_menuapi
node_menu -->|"adds items"| node_cartapi
node_menu -->|"updates count"| node_cartstate
node_nav -->|"updates count"| node_cartstate
node_cart -->|"uses state"| node_cartstate
node_cart -->|"renders confirmation"| node_paymentpage
node_cart -.->|"processes checkout"| node_razorpay
node_api -->|"mounts routes"| node_restaurantapi
node_api -->|"mounts routes"| node_menuapi
node_api -->|"mounts routes"| node_cartapi
node_api -->|"mounts routes"| node_userapi
node_api -->|"mounts routes"| node_dashboardapi
node_restaurantapi -->|"reads and writes"| node_restaurantmodel
node_menuapi -->|"reads and writes"| node_menumodel
node_menuapi -->|"updates restaurant"| node_restaurantmodel
node_cartapi -->|"reads and writes"| node_cartmodel
node_userapi -->|"reads and writes"| node_usermodel
node_dashboardapi -->|"reads"| node_usermodel
node_api -->|"creates payment orders"| node_razorpay
node_api -->|"saves order history"| node_usermodel
node_api -->|"reads cart"| node_cartmodel
node_api -->|"sends email"| node_gmail
node_restaurantapi -->|"uploads images"| node_cloudinary
node_menuapi -->|"uploads images"| node_cloudinary
node_api -->|"connects"| node_mongo
node_chatbot -->|"sends prompts"| node_gemini
node_nav -->|"uses sign-in"| node_clerk
node_app -->|"provides identity"| node_clerk

click node_app "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Main/App.jsx"
click node_home "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Home/Home.jsx"
click node_menu "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Menu/Menu.jsx"
click node_nav "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Navbar/Navbar.jsx"
click node_cart "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Cart/Cart.jsx"
click node_cartstate "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Redux/Slice/CartSlice.js"
click node_paymentpage "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/PaymentSuccess/PaymentSuccess.jsx"
click node_chatbot "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/ChatBot/Chatbot.jsx"
click node_about "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/AboutMe/About.jsx"
click node_contact "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/ContactUs/ContactUs.jsx"
click node_admin "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Admin/Admin.jsx"
click node_restaurantform "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Admin/Restaurant/Register_Restaurant.jsx"
click node_menumanage "https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Admin/Restaurant/Menu.jsx"
click node_api "https://github.com/arjung352/tastebudstreat/blob/main/Backend/backend.js"
click node_restaurantapi "https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/restaurant.js"
click node_menuapi "https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/menu.js"
click node_cartapi "https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/cart.js"
click node_userapi "https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/user.js"
click node_dashboardapi "https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/dashboard.js"
click node_restaurantmodel "https://github.com/arjung352/tastebudstreat/blob/main/Backend/Models/Restaurant.js"
click node_menumodel "https://github.com/arjung352/tastebudstreat/blob/main/Backend/Models/Menu.js"
click node_cartmodel "https://github.com/arjung352/tastebudstreat/blob/main/Backend/Models/Cart.js"
click node_usermodel "https://github.com/arjung352/tastebudstreat/blob/main/Backend/Models/User.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_app,node_home,node_menu,node_nav,node_cart,node_cartstate,node_paymentpage,node_chatbot,node_about,node_contact toneBlue
class node_admin,node_restaurantform,node_menumanage toneAmber
class node_api,node_restaurantapi,node_menuapi,node_cartapi,node_userapi,node_dashboardapi,node_restaurantmodel,node_menumodel,node_cartmodel,node_usermodel toneMint
class node_clerk,node_gemini,node_razorpay,node_cloudinary,node_gmail,node_mongo toneRose
class node_user toneIndigo
```

## Components

### Customer experience

- [Route entry](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Main/App.jsx): `Frontend/src/Components/Main/App.jsx`
- [Home discovery](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Home/Home.jsx): `Frontend/src/Components/Home/Home.jsx`
- [Menu browsing](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Menu/Menu.jsx): `Frontend/src/Components/Menu/Menu.jsx`
- [Navigation and sign-in](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Navbar/Navbar.jsx): `Frontend/src/Components/Navbar/Navbar.jsx`
- [Cart and checkout](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Cart/Cart.jsx): `Frontend/src/Components/Cart/Cart.jsx`
- [Cart count state](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Redux/Slice/CartSlice.js): `Frontend/src/Components/Redux/Slice/CartSlice.js`
- [Payment confirmation](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/PaymentSuccess/PaymentSuccess.jsx): `Frontend/src/Components/PaymentSuccess/PaymentSuccess.jsx`
- [AI chatbot](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/ChatBot/Chatbot.jsx): `Frontend/src/Components/ChatBot/Chatbot.jsx`
- [About and team](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/AboutMe/About.jsx): `Frontend/src/Components/AboutMe/About.jsx`
- [Contact and FAQ](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/ContactUs/ContactUs.jsx): `Frontend/src/Components/ContactUs/ContactUs.jsx`

### Restaurant management

- [Admin dashboard](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Admin/Admin.jsx): `Frontend/src/Components/Admin/Admin.jsx`
- [Restaurant registration](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Admin/Restaurant/Register_Restaurant.jsx): `Frontend/src/Components/Admin/Restaurant/Register_Restaurant.jsx`
- [Menu management](https://github.com/arjung352/tastebudstreat/blob/main/Frontend/src/Components/Admin/Restaurant/Menu.jsx): `Frontend/src/Components/Admin/Restaurant/Menu.jsx`

### API and persistence

- [Express server](https://github.com/arjung352/tastebudstreat/blob/main/Backend/backend.js): `Backend/backend.js`
- [Restaurant API](https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/restaurant.js): `Backend/routes/restaurant.js`
- [Menu API](https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/menu.js): `Backend/routes/menu.js`
- [Cart API](https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/cart.js): `Backend/routes/cart.js`
- [User API](https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/user.js): `Backend/routes/user.js`
- [Dashboard API](https://github.com/arjung352/tastebudstreat/blob/main/Backend/routes/dashboard.js): `Backend/routes/dashboard.js`
- [Restaurant records](https://github.com/arjung352/tastebudstreat/blob/main/Backend/Models/Restaurant.js): `Backend/Models/Restaurant.js`
- [Menu records](https://github.com/arjung352/tastebudstreat/blob/main/Backend/Models/Menu.js): `Backend/Models/Menu.js`
- [Cart records](https://github.com/arjung352/tastebudstreat/blob/main/Backend/Models/Cart.js): `Backend/Models/Cart.js`
- [User and order history](https://github.com/arjung352/tastebudstreat/blob/main/Backend/Models/User.js): `Backend/Models/User.js`

### External services

- **Clerk identity**
- **Gemini API**
- **Razorpay**
- **Cloudinary media**
- **Gmail delivery**
- **MongoDB**

### Other components

- **Visitor**

## Connections

- Visitor → Route entry: opens (evidence: `Frontend/src/Components/Main/App.jsx`)
- Route entry → Home discovery: routes to (evidence: `Frontend/src/Components/Main/App.jsx`)
- Route entry → Menu browsing: routes to (evidence: `Frontend/src/Components/Main/App.jsx`)
- Route entry → Cart and checkout: routes to (evidence: `Frontend/src/Components/Main/App.jsx`)
- Route entry → Admin dashboard: routes to (evidence: `Frontend/src/Components/Main/App.jsx`)
- Route entry → Restaurant registration: routes to (evidence: `Frontend/src/Components/Main/App.jsx`)
- Route entry → Menu management: routes to (evidence: `Frontend/src/Components/Main/App.jsx`)
- Route entry → About and team: routes to (evidence: `Frontend/src/Components/Main/App.jsx`)
- Route entry → Contact and FAQ: routes to (evidence: `Frontend/src/Components/Main/App.jsx`)
- Home discovery → AI chatbot: renders (evidence: `Frontend/src/Components/Home/Home.jsx`)
- Menu browsing → AI chatbot: renders (evidence: `Frontend/src/Components/Menu/Menu.jsx`)
- Menu browsing → Restaurant API: fetches restaurants (evidence: `Frontend/src/Components/Menu/Menu.jsx`)
- Menu browsing → Menu API: fetches dishes (evidence: `Frontend/src/Components/Menu/Menu.jsx`)
- Menu browsing → Cart API: adds items (evidence: `Frontend/src/Components/Menu/Menu.jsx`)
- Menu browsing → Cart count state: updates count (evidence: `Frontend/src/Components/Menu/Menu.jsx`)
- Navigation and sign-in → Cart count state: updates count (evidence: `Frontend/src/Components/Navbar/Navbar.jsx`)
- Cart and checkout → Cart count state: uses state (evidence: `Frontend/src/Components/Cart/Cart.jsx`)
- Cart and checkout → Payment confirmation: renders confirmation (evidence: `Frontend/src/Components/Cart/Cart.jsx`)
- Cart and checkout → Razorpay: processes checkout (evidence: `README.md`)
- Express server → Restaurant API: mounts routes (evidence: `Backend/backend.js`)
- Express server → Menu API: mounts routes (evidence: `Backend/backend.js`)
- Express server → Cart API: mounts routes (evidence: `Backend/backend.js`)
- Express server → User API: mounts routes (evidence: `Backend/backend.js`)
- Express server → Dashboard API: mounts routes (evidence: `Backend/backend.js`)
- Restaurant API → Restaurant records: reads and writes (evidence: `Backend/routes/restaurant.js`)
- Menu API → Menu records: reads and writes (evidence: `Backend/routes/menu.js`)
- Menu API → Restaurant records: updates restaurant (evidence: `Backend/routes/menu.js`)
- Cart API → Cart records: reads and writes (evidence: `Backend/routes/cart.js`)
- User API → User and order history: reads and writes (evidence: `Backend/routes/user.js`)
- Dashboard API → User and order history: reads (evidence: `Backend/routes/dashboard.js`)
- Express server → Razorpay: creates payment orders (evidence: `Backend/backend.js`)
- Express server → User and order history: saves order history (evidence: `Backend/backend.js`)
- Express server → Cart records: reads cart (evidence: `Backend/backend.js`)
- Express server → Gmail delivery: sends email (evidence: `Backend/backend.js`)
- Restaurant API → Cloudinary media: uploads images (evidence: `Backend/routes/restaurant.js`)
- Menu API → Cloudinary media: uploads images (evidence: `Backend/routes/menu.js`)
- Express server → MongoDB: connects (evidence: `Backend/backend.js`)
- AI chatbot → Gemini API: sends prompts (evidence: `Frontend/src/Components/ChatBot/Chatbot.jsx`)
- Navigation and sign-in → Clerk identity: uses sign-in (evidence: `Frontend/src/Components/Navbar/Navbar.jsx`)
- Route entry → Clerk identity: provides identity
