# sataumong2569/school-waste-bank architecture

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

- Interactive diagram: https://gitdiagram.com/sataumong2569/school-waste-bank
- Repository: https://github.com/sataumong2569/school-waste-bank

## Overview

This is a school waste-bank management web app: users view the dashboard and member records, while authorized staff manage settings and system configuration. The available excerpts show shared context loading and updating Firebase records, including member balances, deposit transactions, rewards, and system statistics; member administration also includes inactive-member lookup and image handling. The README is only a Vite template and does not document product capabilities, so some page-level wiring and feature details cannot be confirmed from the sampled source.

Main entry points: [`src/App.jsx`](https://github.com/sataumong2569/school-waste-bank/blob/main/src/App.jsx) (App routing), [`src/components/ProtectedRoute.jsx`](https://github.com/sataumong2569/school-waste-bank/blob/main/src/components/ProtectedRoute.jsx) (Route protection), [`src/pages/Settings.jsx`](https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Settings.jsx) (Member settings), [`src/firebase.js`](https://github.com/sataumong2569/school-waste-bank/blob/main/src/firebase.js) (Firebase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App routing<br/>[App.jsx]"]
  node_home["Dashboard<br/>[Home.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_guard["Route protection<br/>[ProtectedRoute.jsx]"]
end

subgraph group_member["Member Operations"]
  node_members["Member records<br/>[Members.jsx]"]
  node_inactive["Inactive members"]
  node_export["Excel export<br/>[exportExcel.js]"]
end

subgraph group_data["Data Services"]
  node_context["Shared data actions<br/>[AppContext.jsx]"]
  node_firebase["Firebase client<br/>[firebase.js]"]
  node_firestore[("Firestore")]
end

subgraph group_admin["Administration"]
  node_settings["Member settings<br/>[Settings.jsx]"]
  node_config["System config<br/>[SystemConfig.jsx]"]
  node_imagecrop["Image cropping<br/>[cropImage.js]"]
  node_imageupload["Image upload<br/>[uploadImage.js]"]
end

node_user(("Staff and visitors"))
node_cloudinary["Cloudinary"]
node_xlsx["XLSX library"]

node_user -->|"opens"| node_app
node_app -->|"routes"| node_home
node_app -->|"routes"| node_members
node_app -->|"routes"| node_login
node_app -->|"protects"| node_guard
node_guard -->|"allows"| node_settings
node_guard -->|"allows"| node_config
node_inactive -->|"uses"| node_firebase
node_inactive -->|"queries"| node_firestore
node_settings -->|"crops"| node_imagecrop
node_settings -->|"uploads"| node_imageupload
node_imageupload -->|"sends image"| node_cloudinary
node_context -->|"uses"| node_firebase
node_context -->|"reads and writes"| node_firestore
node_firebase -->|"connects"| node_firestore
node_export -->|"creates workbook"| node_xlsx

click node_app "https://github.com/sataumong2569/school-waste-bank/blob/main/src/App.jsx"
click node_home "https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Home.jsx"
click node_login "https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Login.jsx"
click node_guard "https://github.com/sataumong2569/school-waste-bank/blob/main/src/components/ProtectedRoute.jsx"
click node_members "https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Members.jsx"
click node_inactive "https://github.com/sataumong2569/school-waste-bank/blob/main/src/components/InactiveMembersModal.jsx"
click node_settings "https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Settings.jsx"
click node_config "https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/SystemConfig.jsx"
click node_context "https://github.com/sataumong2569/school-waste-bank/blob/main/src/AppContext.jsx"
click node_firebase "https://github.com/sataumong2569/school-waste-bank/blob/main/src/firebase.js"
click node_imagecrop "https://github.com/sataumong2569/school-waste-bank/blob/main/src/utils/cropImage.js"
click node_imageupload "https://github.com/sataumong2569/school-waste-bank/blob/main/src/utils/uploadImage.js"
click node_export "https://github.com/sataumong2569/school-waste-bank/blob/main/src/utils/exportExcel.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_app,node_home,node_login,node_guard toneBlue
class node_members,node_inactive,node_export toneAmber
class node_context,node_firebase,node_firestore toneMint
class node_settings,node_config,node_imagecrop,node_imageupload toneRose
class node_user,node_cloudinary,node_xlsx toneIndigo
```

## Components

### Application

- [App routing](https://github.com/sataumong2569/school-waste-bank/blob/main/src/App.jsx): `src/App.jsx`
- [Dashboard](https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Login](https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`
- [Route protection](https://github.com/sataumong2569/school-waste-bank/blob/main/src/components/ProtectedRoute.jsx): `src/components/ProtectedRoute.jsx`

### Member Operations

- [Member records](https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Members.jsx): `src/pages/Members.jsx`
- [Inactive members](https://github.com/sataumong2569/school-waste-bank/blob/main/src/components/InactiveMembersModal.jsx): `src/components/InactiveMembersModal.jsx`
- [Excel export](https://github.com/sataumong2569/school-waste-bank/blob/main/src/utils/exportExcel.js): `src/utils/exportExcel.js`

### Data Services

- [Shared data actions](https://github.com/sataumong2569/school-waste-bank/blob/main/src/AppContext.jsx): `src/AppContext.jsx`
- [Firebase client](https://github.com/sataumong2569/school-waste-bank/blob/main/src/firebase.js): `src/firebase.js`
- **Firestore**

### Administration

- [Member settings](https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/Settings.jsx): `src/pages/Settings.jsx`
- [System config](https://github.com/sataumong2569/school-waste-bank/blob/main/src/pages/SystemConfig.jsx): `src/pages/SystemConfig.jsx`
- [Image cropping](https://github.com/sataumong2569/school-waste-bank/blob/main/src/utils/cropImage.js): `src/utils/cropImage.js`
- [Image upload](https://github.com/sataumong2569/school-waste-bank/blob/main/src/utils/uploadImage.js): `src/utils/uploadImage.js`

### Other components

- **Staff and visitors**
- **Cloudinary**
- **XLSX library**

## Connections

- Staff and visitors → App routing: opens
- App routing → Dashboard: routes
- App routing → Member records: routes
- App routing → Login: routes
- App routing → Route protection: protects
- Route protection → Member settings: allows
- Route protection → System config: allows
- Inactive members → Firebase client: uses
- Inactive members → Firestore: queries
- Member settings → Image cropping: crops
- Member settings → Image upload: uploads
- Image upload → Cloudinary: sends image
- Shared data actions → Firebase client: uses
- Shared data actions → Firestore: reads and writes
- Firebase client → Firestore: connects
- Excel export → XLSX library: creates workbook
