# devmakibul/attendance architecture

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

- Interactive diagram: https://gitdiagram.com/devmakibul/attendance
- Repository: https://github.com/devmakibul/attendance

## Overview

This is a browser-based student attendance and timetable application. The main workflow is account sign-in, loading a selected class and its timetable, recording attendance or notes in the calendar, and reviewing attendance statistics; schedules provide timetable setup and management. Firebase supplies authentication and cloud data, while browser storage retains selected-class state. The page scripts are heavily obfuscated and excerpts are partial, so the graph includes only relationships visible in the excerpts; additional page capabilities are represented without guessed connections.

Main entry points: [`login/script.js`](https://github.com/devmakibul/attendance/blob/main/login/script.js) (Sign in and signup), [`stats/script.js`](https://github.com/devmakibul/attendance/blob/main/stats/script.js) (Attendance statistics), [`schedules/script.js`](https://github.com/devmakibul/attendance/blob/main/schedules/script.js) (Schedule management), [`calendar/script.js`](https://github.com/devmakibul/attendance/blob/main/calendar/script.js) (Timetable calendar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Account"]
  node_login["Sign in and signup<br/>[script.js]"]
  node_settings["Account settings<br/>[script.js]"]
  node_firebase[("Firebase auth and data")]
end

subgraph group_timetable["Timetable"]
  node_schedules["Schedule management<br/>[script.js]"]
  node_calendar["Timetable calendar<br/>[script.js]"]
  node_classswitch["Class selection<br/>[class-manager.js]"]
end

subgraph group_attendance["Attendance"]
  node_stats["Attendance statistics<br/>[script.js]"]
end

subgraph group_shared["Shared web app"]
  node_home["Landing page interactions<br/>[script.js]"]
  node_nav["Navigation and class switching<br/>[class-switcher.js]"]
  node_pwa["Static asset cache<br/>[sw.js]"]
  node_pages["Informational pages<br/>[index.html]"]
end

node_student(("Student"))

node_student -->|"signs in"| node_login
node_login -->|"authenticates"| node_firebase
node_login -->|"redirects"| node_calendar
node_settings -->|"updates account"| node_firebase
node_schedules -->|"loads and saves"| node_firebase
node_calendar -->|"loads and saves"| node_firebase
node_stats -->|"loads and saves"| node_firebase
node_stats -->|"links to"| node_schedules
node_student -.->|"creates schedules"| node_schedules
node_student -.->|"reviews attendance"| node_stats

click node_login "https://github.com/devmakibul/attendance/blob/main/login/script.js"
click node_settings "https://github.com/devmakibul/attendance/blob/main/settings/script.js"
click node_schedules "https://github.com/devmakibul/attendance/blob/main/schedules/script.js"
click node_calendar "https://github.com/devmakibul/attendance/blob/main/calendar/script.js"
click node_classswitch "https://github.com/devmakibul/attendance/blob/main/assets/class-manager.js"
click node_stats "https://github.com/devmakibul/attendance/blob/main/stats/script.js"
click node_home "https://github.com/devmakibul/attendance/blob/main/script.js"
click node_nav "https://github.com/devmakibul/attendance/blob/main/assets/class-switcher.js"
click node_pwa "https://github.com/devmakibul/attendance/blob/main/sw.js"
click node_pages "https://github.com/devmakibul/attendance/blob/main/pages/about/index.html"

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_login,node_settings,node_firebase toneBlue
class node_schedules,node_calendar,node_classswitch toneAmber
class node_stats toneMint
class node_home,node_nav,node_pwa,node_pages toneRose
class node_student toneIndigo
```

## Components

### Account

- [Sign in and signup](https://github.com/devmakibul/attendance/blob/main/login/script.js): `login/script.js`
- [Account settings](https://github.com/devmakibul/attendance/blob/main/settings/script.js): `settings/script.js`
- **Firebase auth and data**

### Timetable

- [Schedule management](https://github.com/devmakibul/attendance/blob/main/schedules/script.js): `schedules/script.js`
- [Timetable calendar](https://github.com/devmakibul/attendance/blob/main/calendar/script.js): `calendar/script.js`
- [Class selection](https://github.com/devmakibul/attendance/blob/main/assets/class-manager.js): `assets/class-manager.js`

### Attendance

- [Attendance statistics](https://github.com/devmakibul/attendance/blob/main/stats/script.js): `stats/script.js`

### Shared web app

- [Landing page interactions](https://github.com/devmakibul/attendance/blob/main/script.js): `script.js`
- [Navigation and class switching](https://github.com/devmakibul/attendance/blob/main/assets/class-switcher.js): `assets/class-switcher.js`
- [Static asset cache](https://github.com/devmakibul/attendance/blob/main/sw.js): `sw.js`
- [Informational pages](https://github.com/devmakibul/attendance/blob/main/pages/about/index.html): `pages/about/index.html`

### Other components

- **Student**

## Connections

- Student → Sign in and signup: signs in (evidence: `login/script.js`)
- Sign in and signup → Firebase auth and data: authenticates (evidence: `login/script.js`)
- Sign in and signup → Timetable calendar: redirects (evidence: `login/script.js`)
- Account settings → Firebase auth and data: updates account (evidence: `settings/script.js`)
- Schedule management → Firebase auth and data: loads and saves (evidence: `schedules/script.js`)
- Timetable calendar → Firebase auth and data: loads and saves (evidence: `calendar/script.js`)
- Attendance statistics → Firebase auth and data: loads and saves (evidence: `stats/script.js`)
- Attendance statistics → Schedule management: links to (evidence: `stats/script.js`)
- Student → Schedule management: creates schedules
- Student → Attendance statistics: reviews attendance
