# tihou74/attendnce- architecture

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

- Interactive diagram: https://gitdiagram.com/tihou74/attendnce-
- Repository: https://github.com/tihou74/attendnce-

## Overview

This is a browser-based attendance, payroll and staff-training system for the Al-Sheikha restaurant group. Employees use the kiosk to record attendance, submit requests and access training; managers use the admin console to manage staff operations and training. Training content has a separate source-and-import workflow into Firestore. The service worker provides PWA and offline support. The README documents these capabilities, but the main HTML pages were not sampled, so internal call relationships among their features are not shown.

Main entry points: [`admin.html`](https://github.com/tihou74/attendnce-/blob/main/admin.html) (Admin Console), [`index.html`](https://github.com/tihou74/attendnce-/blob/main/index.html) (Staff Kiosk), [`import-training.html`](https://github.com/tihou74/attendnce-/blob/main/import-training.html) (Training Importer), [`training-content`](https://github.com/tihou74/attendnce-/tree/main/training-content) (Training Sources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_employee["Employee Kiosk"]
  node_kiosk["Staff Kiosk<br/>[index.html]"]
  node_attendance["Attendance<br/>[index.html]"]
  node_staff_requests["Staff Requests<br/>[index.html]"]
  node_training_view["Training Tab<br/>[index.html]"]
end

subgraph group_admin["Management"]
  node_admin_console["Admin Console<br/>[admin.html]"]
  node_staff_payroll["Staff &amp; Payroll<br/>[admin.html]"]
  node_attendance_ops["Attendance &amp; Shifts<br/>[admin.html]"]
  node_admin_requests["Requests &amp; Hiring<br/>[admin.html]"]
  node_people_ops["Leave &amp; Warnings<br/>[admin.html]"]
  node_training_editor["Training Editor<br/>[admin.html]"]
  node_admin_tools["Audit &amp; Settings<br/>[admin.html]"]
end

subgraph group_training["Training Content"]
  node_importer["Training Importer"]
  node_content_sources["Training Sources"]
end

subgraph group_platform["Cloud Platform"]
  node_firebase_auth["Firebase Auth"]
  node_firestore[("Firestore")]
  node_security_rules["Firestore Rules<br/>[firestore.rules]"]
end

subgraph group_offline["PWA Support"]
  node_service_worker["Service Worker<br/>[sw.js]"]
end

node_staff(("Employee"))
node_manager(("Administrator"))
node_browser(("Employee Browser"))

node_staff -->|"uses"| node_kiosk
node_kiosk -->|"records"| node_attendance
node_kiosk -->|"submits"| node_staff_requests
node_kiosk -->|"accesses"| node_training_view
node_manager -->|"uses"| node_admin_console
node_admin_console -->|"manages"| node_staff_payroll
node_admin_console -->|"manages"| node_attendance_ops
node_admin_console -->|"manages"| node_admin_requests
node_admin_console -->|"manages"| node_people_ops
node_admin_console -->|"edits"| node_training_editor
node_admin_console -->|"configures"| node_admin_tools
node_manager -->|"runs"| node_importer
node_content_sources -->|"provides content"| node_importer
node_importer -->|"uploads training"| node_firestore
node_kiosk -->|"reads and writes"| node_firestore
node_admin_console -->|"manages data"| node_firestore
node_admin_console -->|"authenticates"| node_firebase_auth
node_security_rules -->|"restricts access"| node_firestore
node_browser -->|"runs"| node_service_worker

click node_kiosk "https://github.com/tihou74/attendnce-/blob/main/index.html"
click node_attendance "https://github.com/tihou74/attendnce-/blob/main/index.html"
click node_staff_requests "https://github.com/tihou74/attendnce-/blob/main/index.html"
click node_training_view "https://github.com/tihou74/attendnce-/blob/main/index.html"
click node_admin_console "https://github.com/tihou74/attendnce-/blob/main/admin.html"
click node_staff_payroll "https://github.com/tihou74/attendnce-/blob/main/admin.html"
click node_attendance_ops "https://github.com/tihou74/attendnce-/blob/main/admin.html"
click node_admin_requests "https://github.com/tihou74/attendnce-/blob/main/admin.html"
click node_people_ops "https://github.com/tihou74/attendnce-/blob/main/admin.html"
click node_training_editor "https://github.com/tihou74/attendnce-/blob/main/admin.html"
click node_admin_tools "https://github.com/tihou74/attendnce-/blob/main/admin.html"
click node_importer "https://github.com/tihou74/attendnce-/blob/main/import-training.html"
click node_content_sources "https://github.com/tihou74/attendnce-/tree/main/training-content"
click node_security_rules "https://github.com/tihou74/attendnce-/blob/main/firestore.rules"
click node_service_worker "https://github.com/tihou74/attendnce-/blob/main/sw.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_kiosk,node_attendance,node_staff_requests,node_training_view,node_browser toneBlue
class node_admin_console,node_staff_payroll,node_attendance_ops,node_admin_requests,node_people_ops,node_training_editor,node_admin_tools toneAmber
class node_importer,node_content_sources toneMint
class node_firebase_auth,node_firestore,node_security_rules toneRose
class node_service_worker,node_staff,node_manager toneIndigo
```

## Components

### Employee Kiosk

- [Staff Kiosk](https://github.com/tihou74/attendnce-/blob/main/index.html): `index.html`
- [Attendance](https://github.com/tihou74/attendnce-/blob/main/index.html): `index.html`
- [Staff Requests](https://github.com/tihou74/attendnce-/blob/main/index.html): `index.html`
- [Training Tab](https://github.com/tihou74/attendnce-/blob/main/index.html): `index.html`

### Management

- [Admin Console](https://github.com/tihou74/attendnce-/blob/main/admin.html): `admin.html`
- [Staff & Payroll](https://github.com/tihou74/attendnce-/blob/main/admin.html): `admin.html`
- [Attendance & Shifts](https://github.com/tihou74/attendnce-/blob/main/admin.html): `admin.html`
- [Requests & Hiring](https://github.com/tihou74/attendnce-/blob/main/admin.html): `admin.html`
- [Leave & Warnings](https://github.com/tihou74/attendnce-/blob/main/admin.html): `admin.html`
- [Training Editor](https://github.com/tihou74/attendnce-/blob/main/admin.html): `admin.html`
- [Audit & Settings](https://github.com/tihou74/attendnce-/blob/main/admin.html): `admin.html`

### Training Content

- [Training Importer](https://github.com/tihou74/attendnce-/blob/main/import-training.html): `import-training.html`
- [Training Sources](https://github.com/tihou74/attendnce-/tree/main/training-content): `training-content`

### Cloud Platform

- **Firebase Auth**
- **Firestore**
- [Firestore Rules](https://github.com/tihou74/attendnce-/blob/main/firestore.rules): `firestore.rules`

### PWA Support

- [Service Worker](https://github.com/tihou74/attendnce-/blob/main/sw.js): `sw.js`

### Other components

- **Employee**
- **Administrator**
- **Employee Browser**

## Connections

- Employee → Staff Kiosk: uses (evidence: `README.md`)
- Staff Kiosk → Attendance: records (evidence: `README.md`)
- Staff Kiosk → Staff Requests: submits (evidence: `README.md`)
- Staff Kiosk → Training Tab: accesses (evidence: `README.md`)
- Administrator → Admin Console: uses (evidence: `README.md`)
- Admin Console → Staff & Payroll: manages (evidence: `README.md`)
- Admin Console → Attendance & Shifts: manages (evidence: `README.md`)
- Admin Console → Requests & Hiring: manages (evidence: `README.md`)
- Admin Console → Leave & Warnings: manages (evidence: `README.md`)
- Admin Console → Training Editor: edits (evidence: `README.md`)
- Admin Console → Audit & Settings: configures (evidence: `README.md`)
- Administrator → Training Importer: runs (evidence: `README.md`)
- Training Sources → Training Importer: provides content (evidence: `README.md`)
- Training Importer → Firestore: uploads training (evidence: `README.md`)
- Staff Kiosk → Firestore: reads and writes (evidence: `README.md`)
- Admin Console → Firestore: manages data (evidence: `README.md`)
- Admin Console → Firebase Auth: authenticates (evidence: `README.md`)
- Firestore Rules → Firestore: restricts access (evidence: `README.md`)
- Employee Browser → Service Worker: runs (evidence: `sw.js`)
