# sandeepreddy2147/tvarit architecture

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

- Interactive diagram: https://gitdiagram.com/sandeepreddy2147/tvarit
- Repository: https://github.com/sandeepreddy2147/tvarit

## Overview

TRAVIT is a role-based ingredient-kit shopping and delivery application. Customers browse products or recipes, add items to a cart, check out, and follow order progress; admins manage catalog and operations, while delivery partners handle assigned orders. Firebase provides authentication and persistent application data. The README documents AI assistance, payment, recipe, and map capabilities; some of those implementations were not sampled, so their wiring is shown only where the documentation supports it.

Main entry points: [`src/App.jsx`](https://github.com/sandeepreddy2147/tvarit/blob/main/src/App.jsx) (Route and Role Router), [`src/services/db.js`](https://github.com/sandeepreddy2147/tvarit/blob/main/src/services/db.js) (Firestore Operations), [`src/hooks/useCart.js`](https://github.com/sandeepreddy2147/tvarit/blob/main/src/hooks/useCart.js) (Cart State), [`src/pages/Checkout/Checkout.jsx`](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Checkout/Checkout.jsx) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Customer Experience"]
  node_catalog["Product Catalog<br/>[ProductListing.jsx]"]
  node_home["Customer Home<br/>[HomeDashboard.jsx]"]
  node_recipes["Recipe Browser<br/>[RecipeListing.jsx]"]
  node_recipe_detail["Recipe Details<br/>[RecipeDetail.jsx]"]
  node_chatbot["AI Assistant<br/>[AIChatbot.jsx]"]
  node_nvidia["NVIDIA AI"]
end

subgraph group_commerce["Shopping and Orders"]
  node_cartpage["Cart Review<br/>[Cart.jsx]"]
  node_carthook["Cart State<br/>[useCart.js]"]
  node_wishlist["Wishlist<br/>[Wishlist.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_orders["Order History<br/>[Orders.jsx]"]
  node_tracking["Order Tracking<br/>[OrderTracking.jsx]"]
  node_razorpay["Razorpay"]
end

subgraph group_operations["Platform Operations"]
  node_admin["Admin Console<br/>[AdminDashboard.jsx]"]
  node_delivery["Delivery Dashboard"]
  node_logistics["Location Updates<br/>[logistics.js]"]
  node_map["Map Service"]
end

subgraph group_platform["Application Platform"]
  node_app["Route and Role Router<br/>[App.jsx]"]
  node_authhook["Authentication State<br/>[useAuth.js]"]
  node_firebase["Firebase Services<br/>[config.js]"]
  node_firestore[("Firestore")]
  node_dbservice["Firestore Operations<br/>[db.js]"]
end

node_customer(("Customer"))
node_partner(("Delivery Partner"))

node_customer -->|"opens app"| node_app
node_partner -->|"opens app"| node_app
node_app -->|"checks identity"| node_authhook
node_authhook -->|"uses auth"| node_firebase
node_firebase -->|"connects"| node_firestore
node_app -->|"routes customer"| node_home
node_app -->|"routes browsing"| node_catalog
node_app -->|"routes recipes"| node_recipes
node_app -->|"routes details"| node_recipe_detail
node_app -->|"routes cart"| node_cartpage
node_app -->|"routes checkout"| node_checkout
node_app -->|"routes history"| node_orders
node_app -->|"routes tracking"| node_tracking
node_app -->|"routes wishlist"| node_wishlist
node_app -->|"routes admin"| node_admin
node_app -->|"routes delivery"| node_delivery
node_app -->|"renders assistant"| node_chatbot
node_catalog -->|"adds items"| node_carthook
node_home -->|"adds items"| node_carthook
node_recipe_detail -->|"adds kit"| node_carthook
node_cartpage -->|"updates cart"| node_carthook
node_carthook -->|"reads and writes cart"| node_dbservice
node_wishlist -->|"manages saved items"| node_dbservice
node_checkout -->|"checks and places order"| node_dbservice
node_checkout -.->|"requests payment"| node_razorpay
node_dbservice -->|"reads and writes records"| node_firestore
node_dbservice -->|"streams order history"| node_orders
node_dbservice -->|"provides order status"| node_tracking
node_admin -->|"manages catalog and records"| node_dbservice
node_delivery -->|"reads delivery orders"| node_dbservice
node_delivery -->|"sends location"| node_logistics
node_logistics -->|"updates map"| node_map
node_chatbot -.->|"requests AI responses"| node_nvidia

click node_app "https://github.com/sandeepreddy2147/tvarit/blob/main/src/App.jsx"
click node_authhook "https://github.com/sandeepreddy2147/tvarit/blob/main/src/hooks/useAuth.js"
click node_firebase "https://github.com/sandeepreddy2147/tvarit/blob/main/src/firebase/config.js"
click node_catalog "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/ProductListing/ProductListing.jsx"
click node_home "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/HomeDashboard/HomeDashboard.jsx"
click node_recipes "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Recipes/RecipeListing.jsx"
click node_recipe_detail "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Recipes/RecipeDetail.jsx"
click node_chatbot "https://github.com/sandeepreddy2147/tvarit/blob/main/src/components/AIChatbot/AIChatbot.jsx"
click node_cartpage "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Cart/Cart.jsx"
click node_carthook "https://github.com/sandeepreddy2147/tvarit/blob/main/src/hooks/useCart.js"
click node_wishlist "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Wishlist/Wishlist.jsx"
click node_checkout "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Checkout/Checkout.jsx"
click node_orders "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Orders/Orders.jsx"
click node_tracking "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/OrderTracking/OrderTracking.jsx"
click node_admin "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/AdminDashboard/AdminDashboard.jsx"
click node_delivery "https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/DeliveryDashboard/DeliveryDashboard.jsx"
click node_logistics "https://github.com/sandeepreddy2147/tvarit/blob/main/src/services/logistics.js"
click node_dbservice "https://github.com/sandeepreddy2147/tvarit/blob/main/src/services/db.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_catalog,node_home,node_recipes,node_recipe_detail,node_chatbot,node_nvidia toneBlue
class node_cartpage,node_carthook,node_wishlist,node_checkout,node_orders,node_tracking,node_razorpay toneAmber
class node_admin,node_delivery,node_logistics,node_map toneMint
class node_app,node_authhook,node_firebase,node_firestore,node_dbservice toneRose
class node_customer,node_partner toneIndigo
```

## Components

### Customer Experience

- [Product Catalog](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/ProductListing/ProductListing.jsx): `src/pages/ProductListing/ProductListing.jsx`
- [Customer Home](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/HomeDashboard/HomeDashboard.jsx): `src/pages/HomeDashboard/HomeDashboard.jsx`
- [Recipe Browser](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Recipes/RecipeListing.jsx): `src/pages/Recipes/RecipeListing.jsx`
- [Recipe Details](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Recipes/RecipeDetail.jsx): `src/pages/Recipes/RecipeDetail.jsx`
- [AI Assistant](https://github.com/sandeepreddy2147/tvarit/blob/main/src/components/AIChatbot/AIChatbot.jsx): `src/components/AIChatbot/AIChatbot.jsx`
- **NVIDIA AI**

### Shopping and Orders

- [Cart Review](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Cart/Cart.jsx): `src/pages/Cart/Cart.jsx`
- [Cart State](https://github.com/sandeepreddy2147/tvarit/blob/main/src/hooks/useCart.js): `src/hooks/useCart.js`
- [Wishlist](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Wishlist/Wishlist.jsx): `src/pages/Wishlist/Wishlist.jsx`
- [Checkout](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Checkout/Checkout.jsx): `src/pages/Checkout/Checkout.jsx`
- [Order History](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/Orders/Orders.jsx): `src/pages/Orders/Orders.jsx`
- [Order Tracking](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/OrderTracking/OrderTracking.jsx): `src/pages/OrderTracking/OrderTracking.jsx`
- **Razorpay**

### Platform Operations

- [Admin Console](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/AdminDashboard/AdminDashboard.jsx): `src/pages/AdminDashboard/AdminDashboard.jsx`
- [Delivery Dashboard](https://github.com/sandeepreddy2147/tvarit/blob/main/src/pages/DeliveryDashboard/DeliveryDashboard.jsx): `src/pages/DeliveryDashboard/DeliveryDashboard.jsx`
- [Location Updates](https://github.com/sandeepreddy2147/tvarit/blob/main/src/services/logistics.js): `src/services/logistics.js`
- **Map Service**

### Application Platform

- [Route and Role Router](https://github.com/sandeepreddy2147/tvarit/blob/main/src/App.jsx): `src/App.jsx`
- [Authentication State](https://github.com/sandeepreddy2147/tvarit/blob/main/src/hooks/useAuth.js): `src/hooks/useAuth.js`
- [Firebase Services](https://github.com/sandeepreddy2147/tvarit/blob/main/src/firebase/config.js): `src/firebase/config.js`
- **Firestore**
- [Firestore Operations](https://github.com/sandeepreddy2147/tvarit/blob/main/src/services/db.js): `src/services/db.js`

### Other components

- **Customer**
- **Delivery Partner**

## Connections

- Customer → Route and Role Router: opens app
- Delivery Partner → Route and Role Router: opens app
- Route and Role Router → Authentication State: checks identity
- Authentication State → Firebase Services: uses auth
- Firebase Services → Firestore: connects
- Route and Role Router → Customer Home: routes customer
- Route and Role Router → Product Catalog: routes browsing
- Route and Role Router → Recipe Browser: routes recipes
- Route and Role Router → Recipe Details: routes details
- Route and Role Router → Cart Review: routes cart
- Route and Role Router → Checkout: routes checkout
- Route and Role Router → Order History: routes history
- Route and Role Router → Order Tracking: routes tracking
- Route and Role Router → Wishlist: routes wishlist
- Route and Role Router → Admin Console: routes admin
- Route and Role Router → Delivery Dashboard: routes delivery
- Route and Role Router → AI Assistant: renders assistant
- Product Catalog → Cart State: adds items
- Customer Home → Cart State: adds items
- Recipe Details → Cart State: adds kit
- Cart Review → Cart State: updates cart
- Cart State → Firestore Operations: reads and writes cart
- Wishlist → Firestore Operations: manages saved items
- Checkout → Firestore Operations: checks and places order
- Checkout → Razorpay: requests payment
- Firestore Operations → Firestore: reads and writes records
- Firestore Operations → Order History: streams order history
- Firestore Operations → Order Tracking: provides order status
- Admin Console → Firestore Operations: manages catalog and records
- Delivery Dashboard → Firestore Operations: reads delivery orders
- Delivery Dashboard → Location Updates: sends location
- Location Updates → Map Service: updates map
- AI Assistant → NVIDIA AI: requests AI responses
