# naseer7399/ikhlasschool architecture

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

- Interactive diagram: https://gitdiagram.com/naseer7399/ikhlasschool
- Repository: https://github.com/naseer7399/ikhlasschool

## Overview

Ikhlas School Manager is a static school-administration app for staff, usable offline or hosted on a web server. The principal workflow is staff sign-in, student and fee management, payment recording, and resulting receipts, accounts, reports, and alerts. Messaging prepares parent-directed WhatsApp or SMS messages for a person to send; optional Firebase provides shared data and supports the separately described Parent Portal. Most application behavior is concentrated in app.js; the excerpts do not expose every internal call, so links between domain features rely on README statements.

Main entry points: [`app.js`](https://github.com/naseer7399/ikhlasschool/blob/main/app.js) (Roles and access), [`index.html`](https://github.com/naseer7399/ikhlasschool/blob/main/index.html) (App shell), [`sw.js`](https://github.com/naseer7399/ikhlasschool/blob/main/sw.js) (Offline app shell), [`firebase-config.js`](https://github.com/naseer7399/ikhlasschool/blob/main/firebase-config.js) (Firebase setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and app shell"]
  node_shell["App shell<br/>[index.html]"]
  node_access_control["Roles and access<br/>[app.js]"]
  node_settings["School settings<br/>[app.js]"]
end

subgraph group_records["School records"]
  node_students["Student records<br/>[app.js]"]
  node_fees["Fee records<br/>[app.js]"]
end

subgraph group_operations["Finance and communication"]
  node_payments["Payments and receipts<br/>[app.js]"]
  node_accounts["Accounts ledger<br/>[app.js]"]
  node_reports["Reports and print<br/>[app.js]"]
  node_messaging["Parent messaging<br/>[app.js]"]
  node_alerts["Management alerts<br/>[app.js]"]
end

subgraph group_platform["Persistence and device"]
  node_local_data[("Browser data<br/>[app.js]")]
  node_cloud_sync["Firebase sync<br/>[app.js]"]
  node_firestore[("Cloud database")]
  node_service_worker["Offline app shell<br/>[sw.js]"]
  node_firebase_settings["Firebase setup<br/>[firebase-config.js]"]
end

node_staff(("School staff"))
node_parent_portal["Parent Portal"]

node_staff -->|"opens"| node_shell
node_shell -->|"loads"| node_access_control
node_access_control -->|"grants access"| node_students
node_access_control -->|"grants access"| node_fees
node_access_control -->|"grants access"| node_payments
node_access_control -->|"grants access"| node_accounts
node_access_control -->|"grants access"| node_reports
node_access_control -->|"grants access"| node_settings
node_payments -->|"updates balance"| node_fees
node_payments -->|"adds income"| node_accounts
node_payments -->|"offers confirmation"| node_messaging
node_students -->|"selects recipients"| node_messaging
node_students -->|"supplies class list"| node_reports
node_fees -->|"supplies fee data"| node_reports
node_payments -->|"supplies collection data"| node_reports
node_students -->|"logs enrollment"| node_alerts
node_fees -->|"logs billing"| node_alerts
node_payments -->|"logs collection"| node_alerts
node_students -->|"persists records"| node_local_data
node_fees -->|"persists records"| node_local_data
node_payments -->|"persists records"| node_local_data
node_settings -->|"backs up and restores"| node_local_data
node_firebase_settings -->|"configures"| node_cloud_sync
node_cloud_sync -->|"reads and writes"| node_firestore
node_cloud_sync -.->|"enables shared data"| node_parent_portal
node_shell -->|"caches app files"| node_service_worker
node_service_worker -->|"serves offline fallback"| node_shell

click node_shell "https://github.com/naseer7399/ikhlasschool/blob/main/index.html"
click node_access_control "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_students "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_fees "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_payments "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_accounts "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_reports "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_messaging "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_alerts "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_settings "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_local_data "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_cloud_sync "https://github.com/naseer7399/ikhlasschool/blob/main/app.js"
click node_service_worker "https://github.com/naseer7399/ikhlasschool/blob/main/sw.js"
click node_firebase_settings "https://github.com/naseer7399/ikhlasschool/blob/main/firebase-config.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_shell,node_access_control,node_settings toneBlue
class node_students,node_fees toneAmber
class node_payments,node_accounts,node_reports,node_messaging,node_alerts toneMint
class node_local_data,node_cloud_sync,node_firestore,node_service_worker,node_firebase_settings toneRose
class node_staff,node_parent_portal toneIndigo
```

## Components

### Access and app shell

- [App shell](https://github.com/naseer7399/ikhlasschool/blob/main/index.html): `index.html`
- [Roles and access](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`
- [School settings](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`

### School records

- [Student records](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`
- [Fee records](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`

### Finance and communication

- [Payments and receipts](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`
- [Accounts ledger](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`
- [Reports and print](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`
- [Parent messaging](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`
- [Management alerts](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`

### Persistence and device

- [Browser data](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`
- [Firebase sync](https://github.com/naseer7399/ikhlasschool/blob/main/app.js): `app.js`
- **Cloud database**
- [Offline app shell](https://github.com/naseer7399/ikhlasschool/blob/main/sw.js): `sw.js`
- [Firebase setup](https://github.com/naseer7399/ikhlasschool/blob/main/firebase-config.js): `firebase-config.js`

### Other components

- **School staff**
- **Parent Portal**

## Connections

- School staff → App shell: opens (evidence: `README.md`)
- App shell → Roles and access: loads (evidence: `README.md`)
- Roles and access → Student records: grants access (evidence: `README.md`)
- Roles and access → Fee records: grants access (evidence: `README.md`)
- Roles and access → Payments and receipts: grants access (evidence: `README.md`)
- Roles and access → Accounts ledger: grants access (evidence: `README.md`)
- Roles and access → Reports and print: grants access (evidence: `README.md`)
- Roles and access → School settings: grants access (evidence: `README.md`)
- Payments and receipts → Fee records: updates balance (evidence: `README.md`)
- Payments and receipts → Accounts ledger: adds income (evidence: `README.md`)
- Payments and receipts → Parent messaging: offers confirmation (evidence: `README.md`)
- Student records → Parent messaging: selects recipients (evidence: `README.md`)
- Student records → Reports and print: supplies class list (evidence: `README.md`)
- Fee records → Reports and print: supplies fee data (evidence: `README.md`)
- Payments and receipts → Reports and print: supplies collection data (evidence: `README.md`)
- Student records → Management alerts: logs enrollment (evidence: `README.md`)
- Fee records → Management alerts: logs billing (evidence: `README.md`)
- Payments and receipts → Management alerts: logs collection (evidence: `README.md`)
- Student records → Browser data: persists records (evidence: `README.md`)
- Fee records → Browser data: persists records (evidence: `README.md`)
- Payments and receipts → Browser data: persists records (evidence: `README.md`)
- School settings → Browser data: backs up and restores (evidence: `README.md`)
- Firebase setup → Firebase sync: configures (evidence: `firebase-config.js`)
- Firebase sync → Cloud database: reads and writes (evidence: `app.js`)
- Firebase sync → Parent Portal: enables shared data
- App shell → Offline app shell: caches app files (evidence: `sw.js`)
- Offline app shell → App shell: serves offline fallback (evidence: `sw.js`)
