# ragulgandhi-s/renova architecture

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

- Interactive diagram: https://gitdiagram.com/ragulgandhi-s/renova
- Repository: https://github.com/ragulgandhi-s/renova

## Overview

RENOVA-AI is a circular-economy waste-management platform presented through a React web application. Users enter through public pages or sign-in, then use role-specific dashboards and operational features such as waste detection, reports, and a recycled-material marketplace. The sampled AI service simulates classification rather than demonstrating a deployed YOLO inference backend; the README also describes IoT telemetry, but the available excerpts do not establish its implementation or runtime connections. Dashboard variants are preserved as distinct stakeholder experiences.

Main entry points: [`src/routes/AppRoutes.jsx`](https://github.com/ragulgandhi-s/renova/blob/main/src/routes/AppRoutes.jsx) (Route dispatcher), [`src/components/layout/DashboardLayout.jsx`](https://github.com/ragulgandhi-s/renova/blob/main/src/components/layout/DashboardLayout.jsx) (Dashboard shell), [`src/components/detection/DetectionDemo.jsx`](https://github.com/ragulgandhi-s/renova/blob/main/src/components/detection/DetectionDemo.jsx) (Detection demo), [`src/pages/Marketplace.jsx`](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/Marketplace.jsx) (Material marketplace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and Access"]
  node_app_routes["Route dispatcher<br/>[AppRoutes.jsx]"]
  node_public_pages["Public pages"]
  node_auth["Authentication state<br/>[AuthContext.tsx]"]
  node_auth_service["Auth service<br/>[authService.js]"]
  node_role_access["Protected access<br/>[ProtectedRoute.jsx]"]
end

subgraph group_operations["Waste Operations"]
  node_ai_detection["Waste detection UI"]
  node_detection_demo["Detection demo<br/>[DetectionDemo.jsx]"]
  node_ai_context["AI state<br/>[AIContext.jsx]"]
  node_ai_service["Simulated classification<br/>[aiService.js]"]
  node_telemetry["IoT telemetry"]
  node_reports["Operational reports<br/>[Reports.jsx]"]
end

subgraph group_commerce["Circular Commerce"]
  node_marketplace["Material marketplace<br/>[Marketplace.jsx]"]
  node_products["Marketplace catalog data<br/>[constants.js]"]
end

subgraph group_portals["Stakeholder Portals"]
  node_admin_portal["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_hotel_portal["Hotel dashboard<br/>[HotelDashboard.jsx]"]
  node_restaurant_portal["Restaurant dashboard"]
  node_vendor_portal["Vendor dashboard"]
  node_farmer_portal["Farmer dashboard"]
  node_delivery_portal["Delivery dashboard"]
end

subgraph group_platform["Shared Platform"]
  node_dashboard_layout["Dashboard shell"]
  node_localization["English and Tamil<br/>[i18n.ts]"]
  node_hero_earth["3D Earth visualizer<br/>[Earth.jsx]"]
end

node_user(("Platform users"))

node_user -->|"opens routes"| node_app_routes
node_app_routes -->|"routes to"| node_public_pages
node_app_routes -->|"routes to"| node_ai_detection
node_app_routes -->|"routes to"| node_marketplace
node_app_routes -->|"routes to"| node_reports
node_app_routes -->|"guards routes"| node_role_access
node_role_access -->|"checks state"| node_auth
node_auth -->|"uses service"| node_auth_service
node_ai_detection -->|"includes demo"| node_detection_demo
node_detection_demo -.->|"uses context"| node_ai_context
node_ai_context -->|"calls service"| node_ai_service
node_detection_demo -->|"reads constants"| node_products
node_marketplace -->|"reads catalog"| node_products
node_marketplace -->|"renders within"| node_dashboard_layout
node_admin_portal -->|"renders within"| node_dashboard_layout
node_hotel_portal -.->|"renders within"| node_dashboard_layout
node_restaurant_portal -.->|"renders within"| node_dashboard_layout
node_vendor_portal -.->|"renders within"| node_dashboard_layout
node_farmer_portal -.->|"renders within"| node_dashboard_layout
node_delivery_portal -.->|"renders within"| node_dashboard_layout
node_app_routes -->|"routes to"| node_admin_portal
node_app_routes -->|"routes to"| node_hotel_portal
node_app_routes -->|"routes to"| node_restaurant_portal
node_app_routes -->|"routes to"| node_vendor_portal
node_app_routes -->|"routes to"| node_farmer_portal
node_app_routes -->|"routes to"| node_delivery_portal
node_user -.->|"views capability"| node_telemetry
node_user -.->|"views capability"| node_hero_earth
node_user -.->|"switches language"| node_localization

click node_app_routes "https://github.com/ragulgandhi-s/renova/blob/main/src/routes/AppRoutes.jsx"
click node_public_pages "https://github.com/ragulgandhi-s/renova/tree/main/src/pages"
click node_auth "https://github.com/ragulgandhi-s/renova/blob/main/src/context/AuthContext.tsx"
click node_auth_service "https://github.com/ragulgandhi-s/renova/blob/main/src/services/authService.js"
click node_role_access "https://github.com/ragulgandhi-s/renova/blob/main/src/routes/ProtectedRoute.jsx"
click node_ai_detection "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/WasteManagement.jsx"
click node_detection_demo "https://github.com/ragulgandhi-s/renova/blob/main/src/components/detection/DetectionDemo.jsx"
click node_ai_context "https://github.com/ragulgandhi-s/renova/blob/main/src/context/AIContext.jsx"
click node_ai_service "https://github.com/ragulgandhi-s/renova/blob/main/src/services/aiService.js"
click node_reports "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/Reports.jsx"
click node_marketplace "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/Marketplace.jsx"
click node_products "https://github.com/ragulgandhi-s/renova/blob/main/src/utils/constants.js"
click node_admin_portal "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/AdminDashboard.jsx"
click node_hotel_portal "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/HotelDashboard.jsx"
click node_restaurant_portal "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/RestaurantDashboard.jsx"
click node_vendor_portal "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/VendorDashboard.jsx"
click node_farmer_portal "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/FarmerDashboard.jsx"
click node_delivery_portal "https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/DeliveryDashboard.jsx"
click node_dashboard_layout "https://github.com/ragulgandhi-s/renova/blob/main/src/components/layout/DashboardLayout.jsx"
click node_localization "https://github.com/ragulgandhi-s/renova/blob/main/src/localization/i18n.ts"
click node_hero_earth "https://github.com/ragulgandhi-s/renova/blob/main/src/components/three/Earth.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_app_routes,node_public_pages,node_auth,node_auth_service,node_role_access,node_user toneBlue
class node_ai_detection,node_detection_demo,node_ai_context,node_ai_service,node_telemetry,node_reports toneAmber
class node_marketplace,node_products toneMint
class node_admin_portal,node_hotel_portal,node_restaurant_portal,node_vendor_portal,node_farmer_portal,node_delivery_portal toneRose
class node_dashboard_layout,node_localization,node_hero_earth toneIndigo
```

## Components

### Application and Access

- [Route dispatcher](https://github.com/ragulgandhi-s/renova/blob/main/src/routes/AppRoutes.jsx): `src/routes/AppRoutes.jsx`
- [Public pages](https://github.com/ragulgandhi-s/renova/tree/main/src/pages): `src/pages`
- [Authentication state](https://github.com/ragulgandhi-s/renova/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Auth service](https://github.com/ragulgandhi-s/renova/blob/main/src/services/authService.js): `src/services/authService.js`
- [Protected access](https://github.com/ragulgandhi-s/renova/blob/main/src/routes/ProtectedRoute.jsx): `src/routes/ProtectedRoute.jsx`

### Waste Operations

- [Waste detection UI](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/WasteManagement.jsx): `src/pages/WasteManagement.jsx`
- [Detection demo](https://github.com/ragulgandhi-s/renova/blob/main/src/components/detection/DetectionDemo.jsx): `src/components/detection/DetectionDemo.jsx`
- [AI state](https://github.com/ragulgandhi-s/renova/blob/main/src/context/AIContext.jsx): `src/context/AIContext.jsx`
- [Simulated classification](https://github.com/ragulgandhi-s/renova/blob/main/src/services/aiService.js): `src/services/aiService.js`
- **IoT telemetry**
- [Operational reports](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/Reports.jsx): `src/pages/Reports.jsx`

### Circular Commerce

- [Material marketplace](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/Marketplace.jsx): `src/pages/Marketplace.jsx`
- [Marketplace catalog data](https://github.com/ragulgandhi-s/renova/blob/main/src/utils/constants.js): `src/utils/constants.js`

### Stakeholder Portals

- [Admin dashboard](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/AdminDashboard.jsx): `src/pages/dashboards/AdminDashboard.jsx`
- [Hotel dashboard](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/HotelDashboard.jsx): `src/pages/dashboards/HotelDashboard.jsx`
- [Restaurant dashboard](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/RestaurantDashboard.jsx): `src/pages/dashboards/RestaurantDashboard.jsx`
- [Vendor dashboard](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/VendorDashboard.jsx): `src/pages/dashboards/VendorDashboard.jsx`
- [Farmer dashboard](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/FarmerDashboard.jsx): `src/pages/dashboards/FarmerDashboard.jsx`
- [Delivery dashboard](https://github.com/ragulgandhi-s/renova/blob/main/src/pages/dashboards/DeliveryDashboard.jsx): `src/pages/dashboards/DeliveryDashboard.jsx`

### Shared Platform

- [Dashboard shell](https://github.com/ragulgandhi-s/renova/blob/main/src/components/layout/DashboardLayout.jsx): `src/components/layout/DashboardLayout.jsx`
- [English and Tamil](https://github.com/ragulgandhi-s/renova/blob/main/src/localization/i18n.ts): `src/localization/i18n.ts`
- [3D Earth visualizer](https://github.com/ragulgandhi-s/renova/blob/main/src/components/three/Earth.jsx): `src/components/three/Earth.jsx`

### Other components

- **Platform users**

## Connections

- Platform users → Route dispatcher: opens routes (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Public pages: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Waste detection UI: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Material marketplace: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Operational reports: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Protected access: guards routes (evidence: `src/routes/AppRoutes.jsx`)
- Protected access → Authentication state: checks state (evidence: `src/routes/ProtectedRoute.jsx`)
- Authentication state → Auth service: uses service
- Waste detection UI → Detection demo: includes demo (evidence: `src/pages/WasteManagement.jsx`)
- Detection demo → AI state: uses context
- AI state → Simulated classification: calls service (evidence: `src/context/AIContext.jsx`)
- Detection demo → Marketplace catalog data: reads constants (evidence: `src/components/detection/DetectionDemo.jsx`)
- Material marketplace → Marketplace catalog data: reads catalog (evidence: `src/pages/Marketplace.jsx`)
- Material marketplace → Dashboard shell: renders within (evidence: `src/pages/Marketplace.jsx`)
- Admin dashboard → Dashboard shell: renders within (evidence: `src/pages/dashboards/AdminDashboard.jsx`)
- Hotel dashboard → Dashboard shell: renders within
- Restaurant dashboard → Dashboard shell: renders within
- Vendor dashboard → Dashboard shell: renders within
- Farmer dashboard → Dashboard shell: renders within
- Delivery dashboard → Dashboard shell: renders within
- Route dispatcher → Admin dashboard: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Hotel dashboard: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Restaurant dashboard: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Vendor dashboard: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Farmer dashboard: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route dispatcher → Delivery dashboard: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Platform users → IoT telemetry: views capability (evidence: `README.md`)
- Platform users → 3D Earth visualizer: views capability (evidence: `README.md`)
- Platform users → English and Tamil: switches language (evidence: `README.md`)
