# boongssam/dashboard-boongssam architecture

> Architecture diagram of the GitHub repository boongssam/dashboard-boongssam, 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/boongssam/dashboard-boongssam
- Repository: https://github.com/boongssam/dashboard-boongssam

## Overview

This is a classroom-management dashboard for teachers and students, with student records, attendance, weekly plans, learning activities, calendars, classroom tools, and announcements. The principal workflow is navigating a classroom view, reading shared app state, and—when permitted—editing records that the context layer persists through Firebase Data Connect. Student behavior summaries can also be requested through a server API backed by an AI helper. The tree and excerpts show a mixed Next.js/Vite setup; edges reflect only documented or excerpted relationships, not an assumed single runtime entry point.

Main entry points: [`src/context/AppContext.jsx`](https://github.com/boongssam/dashboard-boongssam/blob/main/src/context/AppContext.jsx) (App state and actions), [`src/views/DashboardPage.jsx`](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/DashboardPage.jsx) (Dashboard), [`src/components/layout/Layout.jsx`](https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/layout/Layout.jsx) (Classroom layout), [`src/App.jsx`](https://github.com/boongssam/dashboard-boongssam/blob/main/src/App.jsx) (App router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App router<br/>[App.jsx]"]
  node_layout["Classroom layout<br/>[Layout.jsx]"]
end

subgraph group_classroom["Classroom workflows"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
  node_students["Student management<br/>[StudentsPage.jsx]"]
  node_attendance["Attendance<br/>[AttendancePage.jsx]"]
  node_weekly["Weekly plans<br/>[WeeklyPlanPage.jsx]"]
  node_learning["Learning activities<br/>[LearningPage.jsx]"]
  node_calendar["Calendar<br/>[CalendarPage.jsx]"]
  node_tools["Classroom tools<br/>[ToolsPage.jsx]"]
  node_links["Class links<br/>[LinksPage.jsx]"]
  node_thermometer["Points thermometer<br/>[Thermometer.jsx]"]
end

subgraph group_state["Shared state and data"]
  node_context["App state and actions<br/>[AppContext.jsx]"]
  node_admin["Admin mode<br/>[useAdminMode.js]"]
  node_settings["Admin settings"]
  node_toast["Toast notifications<br/>[Toast.jsx]"]
end

subgraph group_integrations["External integrations"]
  node_firebase["Firebase setup<br/>[firebase.js]"]
  node_dataconnect["Data Connect operations"]
  node_neis["School meal service"]
  node_neisclient["Meal API client<br/>[neisApi.js]"]
  node_geminiroute["Behavior summary API<br/>[route.ts]"]
  node_ai["AI summary helper<br/>[ai.ts]"]
  node_geminiservice["Gemini AI service"]
end

node_teacher(("Teacher or student"))

node_teacher -->|"opens dashboard"| node_app
node_app -->|"renders shell"| node_layout
node_layout -->|"uses admin mode"| node_admin
node_layout -->|"opens settings"| node_settings
node_app -->|"renders notifications"| node_toast
node_layout -.->|"routes to"| node_dashboard
node_teacher -.->|"views classroom"| node_dashboard
node_dashboard -->|"reads and updates"| node_context
node_dashboard -->|"renders widget"| node_thermometer
node_dashboard -->|"requests lunch"| node_neisclient
node_neisclient -.->|"fetches meal data"| node_neis
node_students -->|"reads and updates"| node_context
node_students -->|"requests summary"| node_geminiroute
node_geminiroute -->|"calls helper"| node_ai
node_ai -.->|"generates summary"| node_geminiservice
node_attendance -->|"uses app data"| node_context
node_weekly -->|"uses app data"| node_context
node_learning -->|"uses app data"| node_context
node_calendar -->|"uses app data"| node_context
node_tools -->|"uses app data"| node_context
node_links -->|"uses app data"| node_context
node_context -->|"loads and persists"| node_dataconnect
node_context -->|"uses auth"| node_firebase
node_admin -->|"dispatches mode"| node_context
node_admin -->|"authenticates"| node_firebase
node_firebase -->|"configures connector"| node_dataconnect

click node_app "https://github.com/boongssam/dashboard-boongssam/blob/main/src/App.jsx"
click node_layout "https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/layout/Layout.jsx"
click node_dashboard "https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/DashboardPage.jsx"
click node_students "https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/StudentsPage.jsx"
click node_attendance "https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/AttendancePage.jsx"
click node_weekly "https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/WeeklyPlanPage.jsx"
click node_learning "https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/LearningPage.jsx"
click node_calendar "https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/CalendarPage.jsx"
click node_tools "https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/ToolsPage.jsx"
click node_links "https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/LinksPage.jsx"
click node_thermometer "https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/common/Thermometer.jsx"
click node_context "https://github.com/boongssam/dashboard-boongssam/blob/main/src/context/AppContext.jsx"
click node_admin "https://github.com/boongssam/dashboard-boongssam/blob/main/src/hooks/useAdminMode.js"
click node_settings "https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/common/AdminSettingsModal.jsx"
click node_toast "https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/common/Toast.jsx"
click node_firebase "https://github.com/boongssam/dashboard-boongssam/blob/main/src/utils/firebase.js"
click node_dataconnect "https://github.com/boongssam/dashboard-boongssam/tree/main/src/lib/dataconnect"
click node_neisclient "https://github.com/boongssam/dashboard-boongssam/blob/main/src/utils/neisApi.js"
click node_geminiroute "https://github.com/boongssam/dashboard-boongssam/blob/main/src/app/api/gemini/route.ts"
click node_ai "https://github.com/boongssam/dashboard-boongssam/blob/main/src/lib/ai.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_app,node_layout toneBlue
class node_dashboard,node_students,node_attendance,node_weekly,node_learning,node_calendar,node_tools,node_links,node_thermometer toneAmber
class node_context,node_admin,node_settings,node_toast toneMint
class node_firebase,node_dataconnect,node_neis,node_neisclient,node_geminiroute,node_ai,node_geminiservice toneRose
class node_teacher toneIndigo
```

## Components

### App navigation

- [App router](https://github.com/boongssam/dashboard-boongssam/blob/main/src/App.jsx): `src/App.jsx`
- [Classroom layout](https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/layout/Layout.jsx): `src/components/layout/Layout.jsx`

### Classroom workflows

- [Dashboard](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/DashboardPage.jsx): `src/views/DashboardPage.jsx`
- [Student management](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/StudentsPage.jsx): `src/views/StudentsPage.jsx`
- [Attendance](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/AttendancePage.jsx): `src/views/AttendancePage.jsx`
- [Weekly plans](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/WeeklyPlanPage.jsx): `src/views/WeeklyPlanPage.jsx`
- [Learning activities](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/LearningPage.jsx): `src/views/LearningPage.jsx`
- [Calendar](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/CalendarPage.jsx): `src/views/CalendarPage.jsx`
- [Classroom tools](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/ToolsPage.jsx): `src/views/ToolsPage.jsx`
- [Class links](https://github.com/boongssam/dashboard-boongssam/blob/main/src/views/LinksPage.jsx): `src/views/LinksPage.jsx`
- [Points thermometer](https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/common/Thermometer.jsx): `src/components/common/Thermometer.jsx`

### Shared state and data

- [App state and actions](https://github.com/boongssam/dashboard-boongssam/blob/main/src/context/AppContext.jsx): `src/context/AppContext.jsx`
- [Admin mode](https://github.com/boongssam/dashboard-boongssam/blob/main/src/hooks/useAdminMode.js): `src/hooks/useAdminMode.js`
- [Admin settings](https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/common/AdminSettingsModal.jsx): `src/components/common/AdminSettingsModal.jsx`
- [Toast notifications](https://github.com/boongssam/dashboard-boongssam/blob/main/src/components/common/Toast.jsx): `src/components/common/Toast.jsx`

### External integrations

- [Firebase setup](https://github.com/boongssam/dashboard-boongssam/blob/main/src/utils/firebase.js): `src/utils/firebase.js`
- [Data Connect operations](https://github.com/boongssam/dashboard-boongssam/tree/main/src/lib/dataconnect): `src/lib/dataconnect`
- **School meal service**
- [Meal API client](https://github.com/boongssam/dashboard-boongssam/blob/main/src/utils/neisApi.js): `src/utils/neisApi.js`
- [Behavior summary API](https://github.com/boongssam/dashboard-boongssam/blob/main/src/app/api/gemini/route.ts): `src/app/api/gemini/route.ts`
- [AI summary helper](https://github.com/boongssam/dashboard-boongssam/blob/main/src/lib/ai.ts): `src/lib/ai.ts`
- **Gemini AI service**

### Other components

- **Teacher or student**

## Connections

- Teacher or student → App router: opens dashboard (evidence: `src/App.jsx`)
- App router → Classroom layout: renders shell (evidence: `src/App.jsx`)
- Classroom layout → Admin mode: uses admin mode (evidence: `src/components/layout/Layout.jsx`)
- Classroom layout → Admin settings: opens settings (evidence: `src/components/layout/Layout.jsx`)
- App router → Toast notifications: renders notifications (evidence: `src/App.jsx`)
- Classroom layout → Dashboard: routes to
- Teacher or student → Dashboard: views classroom
- Dashboard → App state and actions: reads and updates (evidence: `src/views/DashboardPage.jsx`)
- Dashboard → Points thermometer: renders widget (evidence: `src/views/DashboardPage.jsx`)
- Dashboard → Meal API client: requests lunch (evidence: `src/views/DashboardPage.jsx`)
- Meal API client → School meal service: fetches meal data
- Student management → App state and actions: reads and updates (evidence: `src/views/StudentsPage.jsx`)
- Student management → Behavior summary API: requests summary (evidence: `src/views/StudentsPage.jsx`)
- Behavior summary API → AI summary helper: calls helper (evidence: `src/app/api/gemini/route.ts`)
- AI summary helper → Gemini AI service: generates summary
- Attendance → App state and actions: uses app data (evidence: `src/views/AttendancePage.jsx`)
- Weekly plans → App state and actions: uses app data (evidence: `src/views/WeeklyPlanPage.jsx`)
- Learning activities → App state and actions: uses app data (evidence: `src/views/LearningPage.jsx`)
- Calendar → App state and actions: uses app data (evidence: `src/views/CalendarPage.jsx`)
- Classroom tools → App state and actions: uses app data (evidence: `src/views/ToolsPage.jsx`)
- Class links → App state and actions: uses app data (evidence: `src/views/LinksPage.jsx`)
- App state and actions → Data Connect operations: loads and persists (evidence: `src/context/AppContext.jsx`)
- App state and actions → Firebase setup: uses auth (evidence: `src/context/AppContext.jsx`)
- Admin mode → App state and actions: dispatches mode (evidence: `src/hooks/useAdminMode.js`)
- Admin mode → Firebase setup: authenticates (evidence: `src/hooks/useAdminMode.js`)
- Firebase setup → Data Connect operations: configures connector (evidence: `src/utils/firebase.js`)
