# yeewei09101/library-system architecture

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

- Interactive diagram: https://gitdiagram.com/yeewei09101/library-system
- Repository: https://github.com/yeewei09101/library-system

## Overview

The repository appears to be a Malay-language library-system web app, with pages for duty scheduling, attendance, reports, and administration. The README provides no workflow details, and the sampled source covers only Firebase setup and generic Firestore helpers; page-to-page navigation and page-to-data calls therefore cannot be confirmed. The diagram preserves the distinct capabilities named by the page files without asserting those connections.

Main entry points: [`src/firebase.js`](https://github.com/yeewei09101/library-system/blob/main/src/firebase.js) (Firebase setup), [`src/db-helper.js`](https://github.com/yeewei09101/library-system/blob/main/src/db-helper.js) (Firestore helpers), [`src/index.html`](https://github.com/yeewei09101/library-system/blob/main/src/index.html) (Sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["Application screens"]
  node_index["Sign-in<br/>[index.html]"]
  node_home["Main page<br/>[utama.html]"]
  node_duty["Duty schedule"]
  node_manage_duty["Manage schedules"]
  node_submit_report["Submit report"]
  node_reports["Report records<br/>[rekod_laporan.html]"]
  node_admin_reports["Admin reports<br/>[admin_laporan.html]"]
  node_attendance["Attendance records"]
  node_admin_attendance["Review attendance"]
  node_admin["Admin page<br/>[admin.html]"]
  node_delete_user["Delete users"]
  node_logout["Sign out<br/>[logout.html]"]
end

subgraph group_data["Data access"]
  node_db_helper["Firestore helpers<br/>[db-helper.js]"]
end

subgraph group_services["Firebase services"]
  node_firebase["Firebase setup<br/>[firebase.js]"]
  node_firestore[("Cloud Firestore")]
  node_firebase_auth["Firebase Auth"]
end

node_visitor(("User"))

node_visitor -->|"uses"| node_index
node_db_helper -->|"imports database"| node_firebase
node_firebase -->|"initializes"| node_firestore
node_firebase -->|"initializes"| node_firebase_auth
node_db_helper -->|"reads and writes"| node_firestore

click node_index "https://github.com/yeewei09101/library-system/blob/main/src/index.html"
click node_home "https://github.com/yeewei09101/library-system/blob/main/src/utama.html"
click node_duty "https://github.com/yeewei09101/library-system/blob/main/src/jadual_bertugas.html"
click node_manage_duty "https://github.com/yeewei09101/library-system/blob/main/src/Urus_Jadual_Tugas.html"
click node_submit_report "https://github.com/yeewei09101/library-system/blob/main/src/hantar_laporan.html"
click node_reports "https://github.com/yeewei09101/library-system/blob/main/src/rekod_laporan.html"
click node_admin_reports "https://github.com/yeewei09101/library-system/blob/main/src/admin_laporan.html"
click node_attendance "https://github.com/yeewei09101/library-system/blob/main/src/rekod_kehadiran.html"
click node_admin_attendance "https://github.com/yeewei09101/library-system/blob/main/src/admin_semak_kehadiran.html"
click node_admin "https://github.com/yeewei09101/library-system/blob/main/src/admin.html"
click node_delete_user "https://github.com/yeewei09101/library-system/blob/main/src/padam_pengguna.html"
click node_logout "https://github.com/yeewei09101/library-system/blob/main/src/logout.html"
click node_db_helper "https://github.com/yeewei09101/library-system/blob/main/src/db-helper.js"
click node_firebase "https://github.com/yeewei09101/library-system/blob/main/src/firebase.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_index,node_home,node_duty,node_manage_duty,node_submit_report,node_reports,node_admin_reports,node_attendance,node_admin_attendance,node_admin,node_delete_user,node_logout,node_visitor toneBlue
class node_db_helper toneAmber
class node_firebase,node_firestore,node_firebase_auth toneMint
```

## Components

### Application screens

- [Sign-in](https://github.com/yeewei09101/library-system/blob/main/src/index.html): `src/index.html`
- [Main page](https://github.com/yeewei09101/library-system/blob/main/src/utama.html): `src/utama.html`
- [Duty schedule](https://github.com/yeewei09101/library-system/blob/main/src/jadual_bertugas.html): `src/jadual_bertugas.html`
- [Manage schedules](https://github.com/yeewei09101/library-system/blob/main/src/Urus_Jadual_Tugas.html): `src/Urus_Jadual_Tugas.html`
- [Submit report](https://github.com/yeewei09101/library-system/blob/main/src/hantar_laporan.html): `src/hantar_laporan.html`
- [Report records](https://github.com/yeewei09101/library-system/blob/main/src/rekod_laporan.html): `src/rekod_laporan.html`
- [Admin reports](https://github.com/yeewei09101/library-system/blob/main/src/admin_laporan.html): `src/admin_laporan.html`
- [Attendance records](https://github.com/yeewei09101/library-system/blob/main/src/rekod_kehadiran.html): `src/rekod_kehadiran.html`
- [Review attendance](https://github.com/yeewei09101/library-system/blob/main/src/admin_semak_kehadiran.html): `src/admin_semak_kehadiran.html`
- [Admin page](https://github.com/yeewei09101/library-system/blob/main/src/admin.html): `src/admin.html`
- [Delete users](https://github.com/yeewei09101/library-system/blob/main/src/padam_pengguna.html): `src/padam_pengguna.html`
- [Sign out](https://github.com/yeewei09101/library-system/blob/main/src/logout.html): `src/logout.html`

### Data access

- [Firestore helpers](https://github.com/yeewei09101/library-system/blob/main/src/db-helper.js): `src/db-helper.js`

### Firebase services

- [Firebase setup](https://github.com/yeewei09101/library-system/blob/main/src/firebase.js): `src/firebase.js`
- **Cloud Firestore**
- **Firebase Auth**

### Other components

- **User**

## Connections

- User → Sign-in: uses
- Firestore helpers → Firebase setup: imports database
- Firebase setup → Cloud Firestore: initializes
- Firebase setup → Firebase Auth: initializes
- Firestore helpers → Cloud Firestore: reads and writes
