# rahulmavani666/adora_food architecture

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

- Interactive diagram: https://gitdiagram.com/rahulmavani666/adora_food
- Repository: https://github.com/rahulmavani666/adora_food

## Overview

Food-surplus-listing-platform is a Next.js marketplace connecting diners with restaurant surplus food. The principal flow is browsing available listings, claiming quantities into restaurant-specific orders, then monitoring order status and reviewing completed purchases; restaurant-facing dashboards manage listings and orders. Firebase provides application data services, while separate API routes handle email OTP verification and payment operations. The README gives no capability detail, so broader feature coverage is inferred from the application tree; edges are limited to relationships visible in excerpts or the source index.

Main entry points: [`fullstack/components/clientDashboardComp/ClientOrders.tsx`](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/clientDashboardComp/ClientOrders.tsx) (Client orders), [`fullstack/components/ClientDashboard.tsx`](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/ClientDashboard.tsx) (Client marketplace), [`fullstack/lib/firebase-services.ts`](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/lib/firebase-services.ts) (Marketplace services), [`fullstack/app/dashboard/page.tsx`](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/dashboard/page.tsx) (Dashboard router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Web application"]
  node_landing["Marketplace home<br/>[page.tsx]"]
  node_admin["Admin dashboard<br/>[page.tsx]"]
  node_dashboard_route["Dashboard router<br/>[page.tsx]"]
  node_offline["Offline support<br/>[ClientWrapper.tsx]"]
  node_service_worker["Service worker<br/>[sw.js]"]
end

subgraph group_client["Client marketplace"]
  node_client_page["Client dashboard route<br/>[page.tsx]"]
  node_client_dashboard["Client marketplace"]
  node_client_orders["Client orders<br/>[ClientOrders.tsx]"]
  node_tracking["Order tracking<br/>[OrderTracker.tsx]"]
  node_review["Order reviews<br/>[ReviewModal.tsx]"]
end

subgraph group_restaurant["Restaurant operations"]
  node_restaurant_page["Restaurant dashboard route<br/>[page.tsx]"]
  node_restaurant_dashboard["Restaurant operations"]
  node_restaurant_orders["Order management"]
end

subgraph group_services["Platform services"]
  node_firebase_services["Marketplace services"]
  node_firebase["Firebase client<br/>[firebase.ts]"]
  node_firestore[("Firestore")]
end

subgraph group_identity["Identity and payments"]
  node_login["Sign in<br/>[page.tsx]"]
  node_signup["Sign up<br/>[page.tsx]"]
  node_otp_send["Send email OTP<br/>[route.ts]"]
  node_otp_verify["Verify email OTP<br/>[route.ts]"]
  node_otp_store[("OTP store<br/>[_otpStore.ts]")]
  node_auth_provider["Auth provider<br/>[route.tsx]"]
  node_payment_create["Create payment order<br/>[route.ts]"]
  node_payment_verify["Verify payment<br/>[route.ts]"]
end

node_visitor(("Visitor"))

node_visitor -.->|"visits"| node_landing
node_visitor -.->|"signs in"| node_login
node_visitor -.->|"registers"| node_signup
node_otp_send -->|"stores code"| node_otp_store
node_otp_verify -->|"checks code"| node_otp_store
node_dashboard_route -->|"renders"| node_client_dashboard
node_dashboard_route -->|"renders"| node_restaurant_dashboard
node_client_dashboard -->|"calls services"| node_firebase_services
node_client_dashboard -->|"opens tracker"| node_tracking
node_client_orders -->|"calls services"| node_firebase_services
node_client_orders -->|"renders tracking"| node_tracking
node_client_orders -->|"renders review"| node_review
node_firebase_services -->|"uses client"| node_firebase
node_firebase -->|"initializes"| node_firestore
node_restaurant_dashboard -.->|"uses manager"| node_restaurant_orders
node_offline -.->|"registers"| node_service_worker

click node_landing "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/page.tsx"
click node_login "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/(auth)/login/page.tsx"
click node_signup "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/(auth)/signup/page.tsx"
click node_otp_send "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/auth/send-email-otp/route.ts"
click node_otp_verify "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/auth/verify-email-otp/route.ts"
click node_otp_store "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/auth/_otpStore.ts"
click node_auth_provider "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/auth/%5B...nextauth%5D/route.tsx"
click node_client_page "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/Clientdashboard/page.tsx"
click node_client_dashboard "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/ClientDashboard.tsx"
click node_client_orders "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/clientDashboardComp/ClientOrders.tsx"
click node_tracking "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/OrderTracker.tsx"
click node_review "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/clientDashboardComp/ReviewModal.tsx"
click node_restaurant_page "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/restaurantdashboard/page.tsx"
click node_restaurant_dashboard "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/RestaurantDashboard.tsx"
click node_restaurant_orders "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/restuarantDashboardComp/RestaurantOrderManager.tsx"
click node_admin "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/admin/page.tsx"
click node_dashboard_route "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/dashboard/page.tsx"
click node_firebase_services "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/lib/firebase-services.ts"
click node_firebase "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/lib/firebase.ts"
click node_payment_create "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/payment/create-order/route.ts"
click node_payment_verify "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/payment/verify/route.ts"
click node_offline "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/ClientWrapper.tsx"
click node_service_worker "https://github.com/rahulmavani666/adora_food/blob/main/fullstack/public/sw.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_landing,node_admin,node_dashboard_route,node_offline,node_service_worker toneBlue
class node_client_page,node_client_dashboard,node_client_orders,node_tracking,node_review toneAmber
class node_restaurant_page,node_restaurant_dashboard,node_restaurant_orders toneMint
class node_firebase_services,node_firebase,node_firestore toneRose
class node_login,node_signup,node_otp_send,node_otp_verify,node_otp_store,node_auth_provider,node_payment_create,node_payment_verify,node_visitor toneIndigo
```

## Components

### Web application

- [Marketplace home](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/page.tsx): `fullstack/app/page.tsx`
- [Admin dashboard](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/admin/page.tsx): `fullstack/app/admin/page.tsx`
- [Dashboard router](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/dashboard/page.tsx): `fullstack/app/dashboard/page.tsx`
- [Offline support](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/ClientWrapper.tsx): `fullstack/components/ClientWrapper.tsx`
- [Service worker](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/public/sw.js): `fullstack/public/sw.js`

### Client marketplace

- [Client dashboard route](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/Clientdashboard/page.tsx): `fullstack/app/Clientdashboard/page.tsx`
- [Client marketplace](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/ClientDashboard.tsx): `fullstack/components/ClientDashboard.tsx`
- [Client orders](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/clientDashboardComp/ClientOrders.tsx): `fullstack/components/clientDashboardComp/ClientOrders.tsx`
- [Order tracking](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/OrderTracker.tsx): `fullstack/components/OrderTracker.tsx`
- [Order reviews](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/clientDashboardComp/ReviewModal.tsx): `fullstack/components/clientDashboardComp/ReviewModal.tsx`

### Restaurant operations

- [Restaurant dashboard route](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/restaurantdashboard/page.tsx): `fullstack/app/restaurantdashboard/page.tsx`
- [Restaurant operations](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/RestaurantDashboard.tsx): `fullstack/components/RestaurantDashboard.tsx`
- [Order management](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/components/restuarantDashboardComp/RestaurantOrderManager.tsx): `fullstack/components/restuarantDashboardComp/RestaurantOrderManager.tsx`

### Platform services

- [Marketplace services](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/lib/firebase-services.ts): `fullstack/lib/firebase-services.ts`
- [Firebase client](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/lib/firebase.ts): `fullstack/lib/firebase.ts`
- **Firestore**

### Identity and payments

- [Sign in](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/(auth)/login/page.tsx): `fullstack/app/(auth)/login/page.tsx`
- [Sign up](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/(auth)/signup/page.tsx): `fullstack/app/(auth)/signup/page.tsx`
- [Send email OTP](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/auth/send-email-otp/route.ts): `fullstack/app/api/auth/send-email-otp/route.ts`
- [Verify email OTP](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/auth/verify-email-otp/route.ts): `fullstack/app/api/auth/verify-email-otp/route.ts`
- [OTP store](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/auth/_otpStore.ts): `fullstack/app/api/auth/_otpStore.ts`
- [Auth provider](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/auth/%5B...nextauth%5D/route.tsx): `fullstack/app/api/auth/[...nextauth]/route.tsx`
- [Create payment order](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/payment/create-order/route.ts): `fullstack/app/api/payment/create-order/route.ts`
- [Verify payment](https://github.com/rahulmavani666/adora_food/blob/main/fullstack/app/api/payment/verify/route.ts): `fullstack/app/api/payment/verify/route.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Marketplace home: visits
- Visitor → Sign in: signs in
- Visitor → Sign up: registers
- Send email OTP → OTP store: stores code (evidence: `fullstack/app/api/auth/send-email-otp/route.ts`)
- Verify email OTP → OTP store: checks code (evidence: `fullstack/app/api/auth/verify-email-otp/route.ts`)
- Dashboard router → Client marketplace: renders (evidence: `fullstack/app/dashboard/page.tsx`)
- Dashboard router → Restaurant operations: renders (evidence: `fullstack/app/dashboard/page.tsx`)
- Client marketplace → Marketplace services: calls services (evidence: `fullstack/components/ClientDashboard.tsx`)
- Client marketplace → Order tracking: opens tracker (evidence: `fullstack/components/ClientDashboard.tsx`)
- Client orders → Marketplace services: calls services (evidence: `fullstack/components/clientDashboardComp/ClientOrders.tsx`)
- Client orders → Order tracking: renders tracking (evidence: `fullstack/components/clientDashboardComp/ClientOrders.tsx`)
- Client orders → Order reviews: renders review (evidence: `fullstack/components/clientDashboardComp/ClientOrders.tsx`)
- Marketplace services → Firebase client: uses client (evidence: `fullstack/lib/firebase-services.ts`)
- Firebase client → Firestore: initializes (evidence: `fullstack/lib/firebase.ts`)
- Restaurant operations → Order management: uses manager
- Offline support → Service worker: registers
