# xolane3/amanzi_mpilo architecture

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

- Interactive diagram: https://gitdiagram.com/xolane3/amanzi_mpilo
- Repository: https://github.com/xolane3/amanzi_mpilo

## Overview

Amanzi Mpilo is a frontend for monitoring University of Johannesburg greywater systems. The main workflow is to view campus summaries, open a branch dashboard for tank and water-safety status, then navigate to branch reports. Separate routes provide login/signup and an administrative purchaser/system view. The README describes a backend in the original full-stack app, but this repository tree contains no backend implementation; the map therefore shows only the available frontend. Some route details are represented from documented capabilities and route registration, not inspected implementation.

Main entry points: [`src/routes/dashboard.tsx`](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/dashboard.tsx) (Branch dashboard), [`src/components/ui`](https://github.com/xolane3/amanzi_mpilo/tree/main/src/components/ui) (UI primitives), [`src/routeTree.gen.ts`](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routeTree.gen.ts) (Route registry), [`src/routes/index.tsx`](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/index.tsx) (Campus overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation and access"]
  node_router["Router setup<br/>[router.tsx]"]
  node_route_tree["Route registry<br/>[routeTree.gen.ts]"]
  node_site_list["Campus overview<br/>[index.tsx]"]
  node_login["Login<br/>[login.tsx]"]
  node_signup["Signup<br/>[signup.tsx]"]
  node_admin["Admin dashboard"]
end

subgraph group_monitoring["Water monitoring"]
  node_dashboard["Branch dashboard<br/>[dashboard.tsx]"]
  node_reports["Branch reports<br/>[reports.tsx]"]
  node_branch_data["Branch data<br/>[branches.ts]"]
  node_tank_icon["Tank visualization<br/>[TankIcon.tsx]"]
  node_sensor_card["Sensor display<br/>[SensorCard.tsx]"]
  node_reuse["Reuse destinations"]
end

subgraph group_shared["Shared frontend"]
  node_notifications["Notifications"]
  node_profile["Profile and settings<br/>[ProfileMenu.tsx]"]
  node_root["Application shell<br/>[__root.tsx]"]
  node_ui["UI primitives"]
  node_utils["Class utilities<br/>[utils.ts]"]
end

node_operator(("Operator"))

node_operator -->|"opens overview"| node_site_list
node_operator -.->|"opens login"| node_login
node_operator -.->|"opens signup"| node_signup
node_router -->|"configures routes"| node_route_tree
node_route_tree -->|"registers route"| node_site_list
node_route_tree -->|"registers route"| node_dashboard
node_route_tree -->|"registers route"| node_reports
node_route_tree -->|"registers route"| node_login
node_route_tree -->|"registers route"| node_signup
node_route_tree -->|"registers route"| node_admin
node_site_list -->|"links to"| node_dashboard
node_site_list -->|"links to"| node_reports
node_site_list -->|"reads branch list"| node_branch_data
node_dashboard -->|"loads branch"| node_branch_data
node_dashboard -->|"links to"| node_reports
node_reports -->|"uses branch data"| node_branch_data
node_dashboard -->|"renders"| node_tank_icon
node_dashboard -->|"renders"| node_sensor_card
node_dashboard -->|"renders"| node_reuse
node_dashboard -->|"renders"| node_notifications
node_dashboard -->|"renders"| node_profile
node_site_list -->|"renders"| node_profile
node_admin -->|"renders"| node_notifications
node_admin -->|"renders"| node_profile
node_site_list -->|"uses controls"| node_ui
node_dashboard -->|"uses controls"| node_ui
node_login -->|"uses controls"| node_ui
node_signup -->|"uses controls"| node_ui
node_reports -->|"uses controls"| node_ui
node_notifications -->|"uses controls"| node_ui
node_profile -->|"uses controls"| node_ui
node_root -->|"uses notifications UI"| node_ui
node_ui -->|"uses class helper"| node_utils

click node_router "https://github.com/xolane3/amanzi_mpilo/blob/main/src/router.tsx"
click node_route_tree "https://github.com/xolane3/amanzi_mpilo/blob/main/src/routeTree.gen.ts"
click node_site_list "https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/index.tsx"
click node_login "https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/login.tsx"
click node_signup "https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/signup.tsx"
click node_admin "https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/admin-dashboard.tsx"
click node_dashboard "https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/dashboard.tsx"
click node_reports "https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/reports.tsx"
click node_branch_data "https://github.com/xolane3/amanzi_mpilo/blob/main/src/lib/branches.ts"
click node_tank_icon "https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/TankIcon.tsx"
click node_sensor_card "https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/SensorCard.tsx"
click node_reuse "https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/ReuseDestinations.tsx"
click node_notifications "https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/NotificationsPanel.tsx"
click node_profile "https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/ProfileMenu.tsx"
click node_root "https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/__root.tsx"
click node_ui "https://github.com/xolane3/amanzi_mpilo/tree/main/src/components/ui"
click node_utils "https://github.com/xolane3/amanzi_mpilo/blob/main/src/lib/utils.ts"

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_router,node_route_tree,node_site_list,node_login,node_signup,node_admin toneBlue
class node_dashboard,node_reports,node_branch_data,node_tank_icon,node_sensor_card,node_reuse toneAmber
class node_notifications,node_profile,node_root,node_ui,node_utils toneMint
class node_operator toneIndigo
```

## Components

### Navigation and access

- [Router setup](https://github.com/xolane3/amanzi_mpilo/blob/main/src/router.tsx): `src/router.tsx`
- [Route registry](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`
- [Campus overview](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Login](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/login.tsx): `src/routes/login.tsx`
- [Signup](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/signup.tsx): `src/routes/signup.tsx`
- [Admin dashboard](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/admin-dashboard.tsx): `src/routes/admin-dashboard.tsx`

### Water monitoring

- [Branch dashboard](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/dashboard.tsx): `src/routes/dashboard.tsx`
- [Branch reports](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/reports.tsx): `src/routes/reports.tsx`
- [Branch data](https://github.com/xolane3/amanzi_mpilo/blob/main/src/lib/branches.ts): `src/lib/branches.ts`
- [Tank visualization](https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/TankIcon.tsx): `src/components/TankIcon.tsx`
- [Sensor display](https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/SensorCard.tsx): `src/components/SensorCard.tsx`
- [Reuse destinations](https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/ReuseDestinations.tsx): `src/components/ReuseDestinations.tsx`

### Shared frontend

- [Notifications](https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/NotificationsPanel.tsx): `src/components/NotificationsPanel.tsx`
- [Profile and settings](https://github.com/xolane3/amanzi_mpilo/blob/main/src/components/ProfileMenu.tsx): `src/components/ProfileMenu.tsx`
- [Application shell](https://github.com/xolane3/amanzi_mpilo/blob/main/src/routes/__root.tsx): `src/routes/__root.tsx`
- [UI primitives](https://github.com/xolane3/amanzi_mpilo/tree/main/src/components/ui): `src/components/ui`
- [Class utilities](https://github.com/xolane3/amanzi_mpilo/blob/main/src/lib/utils.ts): `src/lib/utils.ts`

### Other components

- **Operator**

## Connections

- Operator → Campus overview: opens overview (evidence: `src/routes/index.tsx`)
- Operator → Login: opens login
- Operator → Signup: opens signup
- Router setup → Route registry: configures routes (evidence: `src/router.tsx`)
- Route registry → Campus overview: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Branch dashboard: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Branch reports: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Login: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Signup: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Admin dashboard: registers route (evidence: `src/routeTree.gen.ts`)
- Campus overview → Branch dashboard: links to (evidence: `src/routes/index.tsx`)
- Campus overview → Branch reports: links to (evidence: `src/routes/index.tsx`)
- Campus overview → Branch data: reads branch list (evidence: `src/routes/index.tsx`)
- Branch dashboard → Branch data: loads branch (evidence: `src/routes/dashboard.tsx`)
- Branch dashboard → Branch reports: links to (evidence: `src/routes/dashboard.tsx`)
- Branch reports → Branch data: uses branch data (evidence: `src/routes/reports.tsx`)
- Branch dashboard → Tank visualization: renders (evidence: `src/routes/dashboard.tsx`)
- Branch dashboard → Sensor display: renders (evidence: `src/routes/dashboard.tsx`)
- Branch dashboard → Reuse destinations: renders (evidence: `src/routes/dashboard.tsx`)
- Branch dashboard → Notifications: renders (evidence: `src/routes/dashboard.tsx`)
- Branch dashboard → Profile and settings: renders (evidence: `src/routes/dashboard.tsx`)
- Campus overview → Profile and settings: renders (evidence: `src/routes/index.tsx`)
- Admin dashboard → Notifications: renders (evidence: `src/routes/admin-dashboard.tsx`)
- Admin dashboard → Profile and settings: renders (evidence: `src/routes/admin-dashboard.tsx`)
- Campus overview → UI primitives: uses controls (evidence: `src/routes/index.tsx`)
- Branch dashboard → UI primitives: uses controls (evidence: `src/routes/dashboard.tsx`)
- Login → UI primitives: uses controls (evidence: `src/routes/login.tsx`)
- Signup → UI primitives: uses controls (evidence: `src/routes/signup.tsx`)
- Branch reports → UI primitives: uses controls (evidence: `src/routes/reports.tsx`)
- Notifications → UI primitives: uses controls (evidence: `src/components/NotificationsPanel.tsx`)
- Profile and settings → UI primitives: uses controls (evidence: `src/components/ProfileMenu.tsx`)
- Application shell → UI primitives: uses notifications UI (evidence: `src/routes/__root.tsx`)
- UI primitives → Class utilities: uses class helper (evidence: `src/components/ui/button.tsx`)
