# 0978114331/psbu-sms architecture

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

- Interactive diagram: https://gitdiagram.com/0978114331/psbu-sms
- Repository: https://github.com/0978114331/psbu-sms

## Overview

This is a school-management web app: users sign in, then use a dashboard for student, attendance, score, and school operations; administrators also manage shared content. The frontend uses Supabase for authentication and data access, and can send attendance reports to Telegram. The sampled App excerpt shows dashboard routing and report dispatch, while several feature components were not sampled in full; those branches are represented at their source paths without inferring internal call sequences.

Main entry points: [`src/App.tsx`](https://github.com/0978114331/psbu-sms/blob/main/src/App.tsx) (Dashboard app), [`src/lib/supabase.ts`](https://github.com/0978114331/psbu-sms/blob/main/src/lib/supabase.ts) (Supabase client), [`src/main.tsx`](https://github.com/0978114331/psbu-sms/blob/main/src/main.tsx) (React bootstrap), [`src/context/AuthContext.tsx`](https://github.com/0978114331/psbu-sms/blob/main/src/context/AuthContext.tsx) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_bootstrap["React bootstrap<br/>[main.tsx]"]
  node_app["Dashboard app<br/>[App.tsx]"]
  node_nav["Navigation<br/>[Navbar.tsx]"]
end

subgraph group_school["School operations"]
  node_attendance["Attendance records"]
  node_students["Student records"]
  node_scores["Score results<br/>[ScoreResults.tsx]"]
  node_cleaning["Cleaning schedule"]
  node_schoolops["Other school operations<br/>[App.tsx]"]
end

subgraph group_content["Content tools"]
  node_posts["Admin posts"]
  node_library["E-library<br/>[LibraryPanel.tsx]"]
  node_homefeed["Home feed<br/>[HomeFeed.tsx]"]
  node_support["Support tools<br/>[SupportPanel.tsx]"]
  node_vault["Vault modal<br/>[VaultModal.tsx]"]
  node_festival["Festival popup<br/>[FestivalPopup.tsx]"]
  node_about["About school<br/>[AboutUs.tsx]"]
end

subgraph group_platform["Services"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_supabaseclient["Supabase client<br/>[supabase.ts]"]
  node_supabase[("Supabase backend")]
  node_telegramhelper["Telegram reporter<br/>[telegram.ts]"]
end

node_user(("School user"))
node_telegram["Telegram API"]

node_user -->|"opens app"| node_bootstrap
node_bootstrap -->|"provides auth"| node_auth
node_bootstrap -->|"renders"| node_app
node_app -->|"uses auth"| node_auth
node_app -->|"renders"| node_nav
node_app -->|"routes to"| node_attendance
node_app -->|"routes to"| node_students
node_app -->|"routes to"| node_scores
node_app -.->|"routes to"| node_cleaning
node_app -->|"coordinates"| node_schoolops
node_app -->|"renders"| node_festival
node_app -->|"sends report via"| node_telegramhelper
node_attendance -->|"reads and writes"| node_supabaseclient
node_students -->|"reads and writes"| node_supabaseclient
node_scores -->|"uses client"| node_supabaseclient
node_cleaning -->|"uses client"| node_supabaseclient
node_posts -->|"uses client"| node_supabaseclient
node_library -->|"reads data"| node_supabaseclient
node_homefeed -->|"uses client"| node_supabaseclient
node_support -->|"uses client"| node_supabaseclient
node_auth -->|"authenticates with"| node_supabaseclient
node_supabaseclient -->|"connects to"| node_supabase
node_telegramhelper -->|"posts report"| node_telegram

click node_bootstrap "https://github.com/0978114331/psbu-sms/blob/main/src/main.tsx"
click node_auth "https://github.com/0978114331/psbu-sms/blob/main/src/context/AuthContext.tsx"
click node_app "https://github.com/0978114331/psbu-sms/blob/main/src/App.tsx"
click node_nav "https://github.com/0978114331/psbu-sms/blob/main/src/components/Navbar.tsx"
click node_attendance "https://github.com/0978114331/psbu-sms/blob/main/src/components/data/AttendanceHistory.tsx"
click node_students "https://github.com/0978114331/psbu-sms/blob/main/src/components/data/MasterStudentList.tsx"
click node_scores "https://github.com/0978114331/psbu-sms/blob/main/src/components/data/ScoreResults.tsx"
click node_cleaning "https://github.com/0978114331/psbu-sms/blob/main/src/components/data/CleaningSchedule.tsx"
click node_schoolops "https://github.com/0978114331/psbu-sms/blob/main/src/App.tsx"
click node_posts "https://github.com/0978114331/psbu-sms/blob/main/src/components/AdminPostDashboard.tsx"
click node_library "https://github.com/0978114331/psbu-sms/blob/main/src/components/LibraryPanel.tsx"
click node_homefeed "https://github.com/0978114331/psbu-sms/blob/main/src/components/HomeFeed.tsx"
click node_support "https://github.com/0978114331/psbu-sms/blob/main/src/components/SupportPanel.tsx"
click node_vault "https://github.com/0978114331/psbu-sms/blob/main/src/components/VaultModal.tsx"
click node_festival "https://github.com/0978114331/psbu-sms/blob/main/src/components/FestivalPopup.tsx"
click node_about "https://github.com/0978114331/psbu-sms/blob/main/src/components/AboutUs.tsx"
click node_supabaseclient "https://github.com/0978114331/psbu-sms/blob/main/src/lib/supabase.ts"
click node_telegramhelper "https://github.com/0978114331/psbu-sms/blob/main/src/lib/telegram.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_bootstrap,node_app,node_nav,node_user toneBlue
class node_attendance,node_students,node_scores,node_cleaning,node_schoolops toneAmber
class node_posts,node_library,node_homefeed,node_support,node_vault,node_festival,node_about,node_telegram toneMint
class node_auth,node_supabaseclient,node_supabase,node_telegramhelper toneRose
```

## Components

### App entry

- [React bootstrap](https://github.com/0978114331/psbu-sms/blob/main/src/main.tsx): `src/main.tsx`
- [Dashboard app](https://github.com/0978114331/psbu-sms/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation](https://github.com/0978114331/psbu-sms/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`

### School operations

- [Attendance records](https://github.com/0978114331/psbu-sms/blob/main/src/components/data/AttendanceHistory.tsx): `src/components/data/AttendanceHistory.tsx`
- [Student records](https://github.com/0978114331/psbu-sms/blob/main/src/components/data/MasterStudentList.tsx): `src/components/data/MasterStudentList.tsx`
- [Score results](https://github.com/0978114331/psbu-sms/blob/main/src/components/data/ScoreResults.tsx): `src/components/data/ScoreResults.tsx`
- [Cleaning schedule](https://github.com/0978114331/psbu-sms/blob/main/src/components/data/CleaningSchedule.tsx): `src/components/data/CleaningSchedule.tsx`
- [Other school operations](https://github.com/0978114331/psbu-sms/blob/main/src/App.tsx): `src/App.tsx`

### Content tools

- [Admin posts](https://github.com/0978114331/psbu-sms/blob/main/src/components/AdminPostDashboard.tsx): `src/components/AdminPostDashboard.tsx`
- [E-library](https://github.com/0978114331/psbu-sms/blob/main/src/components/LibraryPanel.tsx): `src/components/LibraryPanel.tsx`
- [Home feed](https://github.com/0978114331/psbu-sms/blob/main/src/components/HomeFeed.tsx): `src/components/HomeFeed.tsx`
- [Support tools](https://github.com/0978114331/psbu-sms/blob/main/src/components/SupportPanel.tsx): `src/components/SupportPanel.tsx`
- [Vault modal](https://github.com/0978114331/psbu-sms/blob/main/src/components/VaultModal.tsx): `src/components/VaultModal.tsx`
- [Festival popup](https://github.com/0978114331/psbu-sms/blob/main/src/components/FestivalPopup.tsx): `src/components/FestivalPopup.tsx`
- [About school](https://github.com/0978114331/psbu-sms/blob/main/src/components/AboutUs.tsx): `src/components/AboutUs.tsx`

### Services

- [Authentication](https://github.com/0978114331/psbu-sms/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Supabase client](https://github.com/0978114331/psbu-sms/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase backend**
- [Telegram reporter](https://github.com/0978114331/psbu-sms/blob/main/src/lib/telegram.ts): `src/lib/telegram.ts`

### Other components

- **School user**
- **Telegram API**

## Connections

- School user → React bootstrap: opens app (evidence: `src/main.tsx`)
- React bootstrap → Authentication: provides auth (evidence: `src/main.tsx`)
- React bootstrap → Dashboard app: renders (evidence: `src/main.tsx`)
- Dashboard app → Authentication: uses auth (evidence: `src/App.tsx`)
- Dashboard app → Navigation: renders (evidence: `src/App.tsx`)
- Dashboard app → Attendance records: routes to (evidence: `src/App.tsx`)
- Dashboard app → Student records: routes to (evidence: `src/App.tsx`)
- Dashboard app → Score results: routes to (evidence: `src/App.tsx`)
- Dashboard app → Cleaning schedule: routes to
- Dashboard app → Other school operations: coordinates (evidence: `src/App.tsx`)
- Dashboard app → Festival popup: renders (evidence: `src/App.tsx`)
- Dashboard app → Telegram reporter: sends report via (evidence: `src/App.tsx`)
- Attendance records → Supabase client: reads and writes (evidence: `src/components/data/AttendanceHistory.tsx`)
- Student records → Supabase client: reads and writes (evidence: `src/components/data/MasterStudentList.tsx`)
- Score results → Supabase client: uses client (evidence: `src/components/data/ScoreResults.tsx`)
- Cleaning schedule → Supabase client: uses client (evidence: `src/components/data/CleaningSchedule.tsx`)
- Admin posts → Supabase client: uses client (evidence: `src/components/AdminPostDashboard.tsx`)
- E-library → Supabase client: reads data (evidence: `src/components/LibraryPanel.tsx`)
- Home feed → Supabase client: uses client (evidence: `src/components/HomeFeed.tsx`)
- Support tools → Supabase client: uses client (evidence: `src/components/SupportPanel.tsx`)
- Authentication → Supabase client: authenticates with (evidence: `src/context/AuthContext.tsx`)
- Supabase client → Supabase backend: connects to (evidence: `src/lib/supabase.ts`)
- Telegram reporter → Telegram API: posts report (evidence: `src/lib/telegram.ts`)
