# deep-chan-45/clenc architecture

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

- Interactive diagram: https://gitdiagram.com/deep-chan-45/clenc
- Repository: https://github.com/deep-chan-45/clenc

## Overview

ClenC is a civic waste-management app for Kanpur, with citizen, field-worker, and municipal-admin views. Its principal workflow is citizen sign-in, reporting a complaint or requesting a pickup, municipal/worker handling, and citizen tracking or resolution confirmation. The app also provides waste-awareness material, maps, ward analytics, and civic points/leaderboards. The excerpts show Firebase authentication and persistence, but not every page’s callbacks or data wiring; uncertain links are omitted. The README is empty, so capability coverage relies on the source index and shown excerpts.

Main entry points: [`src/App.tsx`](https://github.com/deep-chan-45/clenc/blob/main/src/App.tsx) (App and Routing), [`src/components/LeafletMap.tsx`](https://github.com/deep-chan-45/clenc/blob/main/src/components/LeafletMap.tsx) (Maps and Locations), [`src/firebase.ts`](https://github.com/deep-chan-45/clenc/blob/main/src/firebase.ts) (Firebase Services), [`src/pages/CitizenViews.tsx`](https://github.com/deep-chan-45/clenc/blob/main/src/pages/CitizenViews.tsx) (Citizen Workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_app_shell["App and Routing<br/>[App.tsx]"]
  node_landing["Landing Page<br/>[LandingPage.tsx]"]
  node_auth["Authentication<br/>[AuthPage.tsx]"]
  node_navigation["Navigation and Modals"]
end

subgraph group_citizen["Citizen Services"]
  node_citizen_views["Citizen Workflows<br/>[CitizenViews.tsx]"]
  node_awareness["Waste Awareness<br/>[AwarenessPage.tsx]"]
  node_leaderboard["Civic Leaderboard<br/>[Leaderboard.tsx]"]
end

subgraph group_operations["Municipal Operations"]
  node_worker_admin["Worker and Admin Views"]
end

subgraph group_shared["Shared Services"]
  node_map["Maps and Locations<br/>[LeafletMap.tsx]"]
  node_firebase["Firebase Services<br/>[firebase.ts]"]
  node_firestore[("Firestore")]
  node_mock_data["Sample Civic Data<br/>[mockData.ts]"]
  node_domain_types["Domain Types<br/>[types.ts]"]
  node_logo["Branding<br/>[ClenCLogo.tsx]"]
  node_icons["Icon Set<br/>[Icons.tsx]"]
end

node_citizen_actor(("Citizen"))

node_citizen_actor -->|"uses app"| node_app_shell
node_auth -->|"authenticates"| node_firebase
node_app_shell -->|"saves reports"| node_firebase
node_app_shell -->|"saves profiles"| node_firebase
node_leaderboard -->|"reads citizens"| node_firestore
node_firebase -->|"reads and writes"| node_firestore
node_map --> node_firestore
node_map --> node_citizen_actor
node_landing -->|"renders"| node_logo
node_auth -->|"renders"| node_logo
node_navigation -->|"renders"| node_logo
node_navigation -->|"renders"| node_icons
node_leaderboard -->|"renders"| node_icons
node_app_shell -.-> node_landing
node_app_shell -.-> node_auth
node_app_shell -.-> node_citizen_views
node_app_shell -.-> node_awareness
node_app_shell -.-> node_worker_admin
node_citizen_views -.-> node_map
node_worker_admin -.-> node_map
node_citizen_views -.-> node_leaderboard
node_app_shell -.-> node_navigation

click node_app_shell "https://github.com/deep-chan-45/clenc/blob/main/src/App.tsx"
click node_landing "https://github.com/deep-chan-45/clenc/blob/main/src/pages/LandingPage.tsx"
click node_auth "https://github.com/deep-chan-45/clenc/blob/main/src/pages/AuthPage.tsx"
click node_citizen_views "https://github.com/deep-chan-45/clenc/blob/main/src/pages/CitizenViews.tsx"
click node_awareness "https://github.com/deep-chan-45/clenc/blob/main/src/pages/AwarenessPage.tsx"
click node_worker_admin "https://github.com/deep-chan-45/clenc/blob/main/src/pages/WorkerAndAdminViews.tsx"
click node_map "https://github.com/deep-chan-45/clenc/blob/main/src/components/LeafletMap.tsx"
click node_leaderboard "https://github.com/deep-chan-45/clenc/blob/main/src/components/Leaderboard.tsx"
click node_navigation "https://github.com/deep-chan-45/clenc/blob/main/src/components/NavbarAndModals.tsx"
click node_firebase "https://github.com/deep-chan-45/clenc/blob/main/src/firebase.ts"
click node_mock_data "https://github.com/deep-chan-45/clenc/blob/main/src/data/mockData.ts"
click node_domain_types "https://github.com/deep-chan-45/clenc/blob/main/src/types.ts"
click node_logo "https://github.com/deep-chan-45/clenc/blob/main/src/components/ClenCLogo.tsx"
click node_icons "https://github.com/deep-chan-45/clenc/blob/main/src/components/Icons.tsx"

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_shell,node_landing,node_auth,node_navigation toneBlue
class node_citizen_views,node_awareness,node_leaderboard toneAmber
class node_worker_admin toneMint
class node_map,node_firebase,node_firestore,node_mock_data,node_domain_types,node_logo,node_icons toneRose
class node_citizen_actor toneIndigo
```

## Components

### App Shell

- [App and Routing](https://github.com/deep-chan-45/clenc/blob/main/src/App.tsx): `src/App.tsx`
- [Landing Page](https://github.com/deep-chan-45/clenc/blob/main/src/pages/LandingPage.tsx): `src/pages/LandingPage.tsx`
- [Authentication](https://github.com/deep-chan-45/clenc/blob/main/src/pages/AuthPage.tsx): `src/pages/AuthPage.tsx`
- [Navigation and Modals](https://github.com/deep-chan-45/clenc/blob/main/src/components/NavbarAndModals.tsx): `src/components/NavbarAndModals.tsx`

### Citizen Services

- [Citizen Workflows](https://github.com/deep-chan-45/clenc/blob/main/src/pages/CitizenViews.tsx): `src/pages/CitizenViews.tsx`
- [Waste Awareness](https://github.com/deep-chan-45/clenc/blob/main/src/pages/AwarenessPage.tsx): `src/pages/AwarenessPage.tsx`
- [Civic Leaderboard](https://github.com/deep-chan-45/clenc/blob/main/src/components/Leaderboard.tsx): `src/components/Leaderboard.tsx`

### Municipal Operations

- [Worker and Admin Views](https://github.com/deep-chan-45/clenc/blob/main/src/pages/WorkerAndAdminViews.tsx): `src/pages/WorkerAndAdminViews.tsx`

### Shared Services

- [Maps and Locations](https://github.com/deep-chan-45/clenc/blob/main/src/components/LeafletMap.tsx): `src/components/LeafletMap.tsx`
- [Firebase Services](https://github.com/deep-chan-45/clenc/blob/main/src/firebase.ts): `src/firebase.ts`
- **Firestore**
- [Sample Civic Data](https://github.com/deep-chan-45/clenc/blob/main/src/data/mockData.ts): `src/data/mockData.ts`
- [Domain Types](https://github.com/deep-chan-45/clenc/blob/main/src/types.ts): `src/types.ts`
- [Branding](https://github.com/deep-chan-45/clenc/blob/main/src/components/ClenCLogo.tsx): `src/components/ClenCLogo.tsx`
- [Icon Set](https://github.com/deep-chan-45/clenc/blob/main/src/components/Icons.tsx): `src/components/Icons.tsx`

### Other components

- **Citizen**

## Connections

- Citizen → App and Routing: uses app
- Authentication → Firebase Services: authenticates (evidence: `src/pages/AuthPage.tsx`)
- App and Routing → Firebase Services: saves reports (evidence: `src/App.tsx`)
- App and Routing → Firebase Services: saves profiles (evidence: `src/App.tsx`)
- Civic Leaderboard → Firestore: reads citizens (evidence: `src/components/Leaderboard.tsx`)
- Firebase Services → Firestore: reads and writes (evidence: `src/firebase.ts`)
- Maps and Locations → Firestore
- Maps and Locations → Citizen
- Landing Page → Branding: renders (evidence: `src/pages/LandingPage.tsx`)
- Authentication → Branding: renders (evidence: `src/pages/AuthPage.tsx`)
- Navigation and Modals → Branding: renders (evidence: `src/components/NavbarAndModals.tsx`)
- Navigation and Modals → Icon Set: renders (evidence: `src/components/NavbarAndModals.tsx`)
- Civic Leaderboard → Icon Set: renders (evidence: `src/components/Leaderboard.tsx`)
- App and Routing → Landing Page (evidence: `src/App.tsx`)
- App and Routing → Authentication (evidence: `src/App.tsx`)
- App and Routing → Citizen Workflows (evidence: `src/App.tsx`)
- App and Routing → Waste Awareness (evidence: `src/App.tsx`)
- App and Routing → Worker and Admin Views (evidence: `src/App.tsx`)
- Citizen Workflows → Maps and Locations (evidence: `src/pages/CitizenViews.tsx`)
- Worker and Admin Views → Maps and Locations (evidence: `src/pages/WorkerAndAdminViews.tsx`)
- Citizen Workflows → Civic Leaderboard (evidence: `src/pages/CitizenViews.tsx`)
- App and Routing → Navigation and Modals (evidence: `src/App.tsx`)
