# harsh0259/smart-attendence-system architecture

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

- Interactive diagram: https://gitdiagram.com/harsh0259/smart-attendence-system
- Repository: https://github.com/harsh0259/smart-attendence-system

## Overview

Synapse is a static, client-side attendance app. Teachers configure and run geofenced QR sessions; students scan a QR, provide identity and location, and receive a verification result. The README also describes a design-system showcase. The single core JavaScript file contains the portal logic, but excerpts omit much of its implementation, so edges are limited to relationships visible in excerpts or documented in the README. No backend or persistent attendance database is shown.

Main entry points: [`app.js`](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js) (Session controller), [`index.html`](https://github.com/harsh0259/smart-attendence-system/blob/main/index.html) (Landing showcase), [`teacher.html`](https://github.com/harsh0259/smart-attendence-system/blob/main/teacher.html) (Teacher portal UI), [`student.html`](https://github.com/harsh0259/smart-attendence-system/blob/main/student.html) (Student portal UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_teacher["Teacher portal"]
  node_teacher_page["Teacher portal UI<br/>[teacher.html]"]
  node_teacher_engine["Session controller<br/>[app.js]"]
  node_teacher_gps["Teacher GPS<br/>[app.js]"]
  node_qr_generation["Dynamic QR generation<br/>[app.js]"]
  node_session_state["Session state<br/>[app.js]"]
end

subgraph group_student["Student verification"]
  node_student_page["Student portal UI<br/>[student.html]"]
  node_qr_scanner["QR scanner<br/>[app.js]"]
  node_student_gps["Student GPS<br/>[app.js]"]
  node_attendance_check["Attendance verification<br/>[app.js]"]
  node_receipt["Verification result<br/>[app.js]"]
  node_shared_qr[("Latest QR payload<br/>[app.js]")]
end

subgraph group_showcase["Design showcase"]
  node_landing_page["Landing showcase<br/>[index.html]"]
  node_showcase_engine["Ambient interactions<br/>[app.js]"]
  node_design_system["Visual design system<br/>[styles.css]"]
end

node_teacher_actor(("Teacher"))
node_student_actor(("Student"))

node_teacher_actor -.->|"configures session"| node_teacher_page
node_teacher_page -.->|"starts portal"| node_teacher_engine
node_teacher_engine -->|"requests location"| node_teacher_gps
node_teacher_engine -->|"renders QR"| node_qr_generation
node_teacher_engine -->|"updates timer"| node_session_state
node_qr_generation -.->|"publishes payload"| node_shared_qr
node_student_actor -.->|"scans attendance"| node_student_page
node_student_page -.->|"starts scanning"| node_qr_scanner
node_qr_scanner -.->|"submits QR data"| node_attendance_check
node_shared_qr -->|"provides latest QR"| node_attendance_check
node_attendance_check -.->|"requests location"| node_student_gps
node_attendance_check -->|"displays decision"| node_receipt
node_landing_page -->|"runs interactions"| node_showcase_engine
node_landing_page -.->|"uses styles"| node_design_system

click node_teacher_page "https://github.com/harsh0259/smart-attendence-system/blob/main/teacher.html"
click node_teacher_engine "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_teacher_gps "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_qr_generation "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_session_state "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_student_page "https://github.com/harsh0259/smart-attendence-system/blob/main/student.html"
click node_qr_scanner "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_student_gps "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_attendance_check "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_receipt "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_shared_qr "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_landing_page "https://github.com/harsh0259/smart-attendence-system/blob/main/index.html"
click node_showcase_engine "https://github.com/harsh0259/smart-attendence-system/blob/main/app.js"
click node_design_system "https://github.com/harsh0259/smart-attendence-system/blob/main/styles.css"

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_teacher_page,node_teacher_engine,node_teacher_gps,node_qr_generation,node_session_state toneBlue
class node_student_page,node_qr_scanner,node_student_gps,node_attendance_check,node_receipt,node_shared_qr toneAmber
class node_landing_page,node_showcase_engine,node_design_system toneMint
class node_teacher_actor,node_student_actor toneIndigo
```

## Components

### Teacher portal

- [Teacher portal UI](https://github.com/harsh0259/smart-attendence-system/blob/main/teacher.html): `teacher.html`
- [Session controller](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`
- [Teacher GPS](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`
- [Dynamic QR generation](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`
- [Session state](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`

### Student verification

- [Student portal UI](https://github.com/harsh0259/smart-attendence-system/blob/main/student.html): `student.html`
- [QR scanner](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`
- [Student GPS](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`
- [Attendance verification](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`
- [Verification result](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`
- [Latest QR payload](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`

### Design showcase

- [Landing showcase](https://github.com/harsh0259/smart-attendence-system/blob/main/index.html): `index.html`
- [Ambient interactions](https://github.com/harsh0259/smart-attendence-system/blob/main/app.js): `app.js`
- [Visual design system](https://github.com/harsh0259/smart-attendence-system/blob/main/styles.css): `styles.css`

### Other components

- **Teacher**
- **Student**

## Connections

- Teacher → Teacher portal UI: configures session (evidence: `README.md`)
- Teacher portal UI → Session controller: starts portal
- Session controller → Teacher GPS: requests location (evidence: `app.js`)
- Session controller → Dynamic QR generation: renders QR (evidence: `app.js`)
- Session controller → Session state: updates timer (evidence: `app.js`)
- Dynamic QR generation → Latest QR payload: publishes payload (evidence: `app.js`)
- Student → Student portal UI: scans attendance (evidence: `README.md`)
- Student portal UI → QR scanner: starts scanning
- QR scanner → Attendance verification: submits QR data (evidence: `app.js`)
- Latest QR payload → Attendance verification: provides latest QR (evidence: `app.js`)
- Attendance verification → Student GPS: requests location (evidence: `README.md`)
- Attendance verification → Verification result: displays decision (evidence: `app.js`)
- Landing showcase → Ambient interactions: runs interactions (evidence: `app.js`)
- Landing showcase → Visual design system: uses styles (evidence: `README.md`)
