# eswar488/smartexamz architecture

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

- Interactive diagram: https://gitdiagram.com/eswar488/smartexamz
- Repository: https://github.com/eswar488/smartexamz

## Overview

SmartExamz is a browser-based university exam-management demo backed by a small Node server and SQLite for authoritative attendance, seating, and student data. The main workflows are role sign-in, administrator exam/room and seating management, in-charge attendance recording and submission, and student access to a private profile and published schedule. The general administration screens remain localStorage-backed. Server excerpts and the source index establish service wiring; README statements support documented capabilities whose implementation was not sampled.

Main entry points: [`server.js`](https://github.com/eswar488/smartexamz/blob/main/server.js) (HTTP server), [`app.js`](https://github.com/eswar488/smartexamz/blob/main/app.js) (Role portal), [`student-api.js`](https://github.com/eswar488/smartexamz/blob/main/student-api.js) (Student API client), [`student-service.js`](https://github.com/eswar488/smartexamz/blob/main/student-service.js) (Student accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser application"]
  node_portal["Role portal<br/>[app.js]"]
  node_adminscreens["Admin screens<br/>[app.js]"]
  node_analytics["Dashboard analytics<br/>[analytics.js]"]
end

subgraph group_auth["Identity and sessions"]
  node_loginutils["Login validation<br/>[login-utils.js]"]
  node_studentapi["Student API client<br/>[student-api.js]"]
  node_studentservice["Student accounts<br/>[student-service.js]"]
end

subgraph group_seating["Seating management"]
  node_seatingui["Seating workflow<br/>[app.js]"]
  node_seatingapi["Seating API client<br/>[seating-api.js]"]
  node_seatingservice["Allocation service<br/>[seating-service.js]"]
end

subgraph group_attendance["Attendance"]
  node_attendanceui["Attendance workflow<br/>[app.js]"]
  node_attendanceapi["Attendance API client<br/>[attendance-api.js]"]
  node_attendanceservice["Attendance service"]
end

subgraph group_data["Server and records"]
  node_seed["Sample data seed<br/>[attendance-seed.js]"]
  node_server["HTTP server<br/>[server.js]"]
  node_sqlite[("SQLite database")]
end

node_admin(("Administrator"))
node_incharge(("In-charge"))
node_student(("Student"))

node_admin -->|"signs in"| node_portal
node_incharge -->|"signs in"| node_portal
node_student -->|"signs in"| node_portal
node_portal -.->|"validates credentials"| node_loginutils
node_portal -->|"authenticates via"| node_server
node_portal -->|"requests dashboard"| node_studentapi
node_studentapi -->|"calls student routes"| node_server
node_admin -->|"manages records"| node_adminscreens
node_adminscreens -.->|"derives metrics"| node_analytics
node_admin -->|"reviews proposals"| node_seatingui
node_seatingui -->|"requests allocation"| node_seatingapi
node_seatingapi -->|"calls admin routes"| node_server
node_server -->|"dispatches seating"| node_seatingservice
node_seatingservice -->|"reads and writes"| node_sqlite
node_incharge -->|"records attendance"| node_attendanceui
node_attendanceui -->|"sends updates"| node_attendanceapi
node_attendanceapi -->|"calls attendance routes"| node_server
node_server -->|"dispatches attendance"| node_attendanceservice
node_attendanceservice -->|"reads and writes"| node_sqlite
node_student -->|"fetches dashboard"| node_studentapi
node_server -->|"dispatches student routes"| node_studentservice
node_studentservice -->|"reads and writes"| node_sqlite
node_server -->|"loads sample records"| node_seed
node_seed -->|"populates records"| node_sqlite

click node_portal "https://github.com/eswar488/smartexamz/blob/main/app.js"
click node_adminscreens "https://github.com/eswar488/smartexamz/blob/main/app.js"
click node_analytics "https://github.com/eswar488/smartexamz/blob/main/analytics.js"
click node_loginutils "https://github.com/eswar488/smartexamz/blob/main/login-utils.js"
click node_studentapi "https://github.com/eswar488/smartexamz/blob/main/student-api.js"
click node_studentservice "https://github.com/eswar488/smartexamz/blob/main/student-service.js"
click node_seatingui "https://github.com/eswar488/smartexamz/blob/main/app.js"
click node_seatingapi "https://github.com/eswar488/smartexamz/blob/main/seating-api.js"
click node_seatingservice "https://github.com/eswar488/smartexamz/blob/main/seating-service.js"
click node_attendanceui "https://github.com/eswar488/smartexamz/blob/main/app.js"
click node_attendanceapi "https://github.com/eswar488/smartexamz/blob/main/attendance-api.js"
click node_attendanceservice "https://github.com/eswar488/smartexamz/blob/main/attendance-service.js"
click node_seed "https://github.com/eswar488/smartexamz/blob/main/attendance-seed.js"
click node_server "https://github.com/eswar488/smartexamz/blob/main/server.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_portal,node_adminscreens,node_analytics toneBlue
class node_loginutils,node_studentapi,node_studentservice toneAmber
class node_seatingui,node_seatingapi,node_seatingservice toneMint
class node_attendanceui,node_attendanceapi,node_attendanceservice toneRose
class node_seed,node_server,node_sqlite,node_admin,node_incharge,node_student toneIndigo
```

## Components

### Browser application

- [Role portal](https://github.com/eswar488/smartexamz/blob/main/app.js): `app.js`
- [Admin screens](https://github.com/eswar488/smartexamz/blob/main/app.js): `app.js`
- [Dashboard analytics](https://github.com/eswar488/smartexamz/blob/main/analytics.js): `analytics.js`

### Identity and sessions

- [Login validation](https://github.com/eswar488/smartexamz/blob/main/login-utils.js): `login-utils.js`
- [Student API client](https://github.com/eswar488/smartexamz/blob/main/student-api.js): `student-api.js`
- [Student accounts](https://github.com/eswar488/smartexamz/blob/main/student-service.js): `student-service.js`

### Seating management

- [Seating workflow](https://github.com/eswar488/smartexamz/blob/main/app.js): `app.js`
- [Seating API client](https://github.com/eswar488/smartexamz/blob/main/seating-api.js): `seating-api.js`
- [Allocation service](https://github.com/eswar488/smartexamz/blob/main/seating-service.js): `seating-service.js`

### Attendance

- [Attendance workflow](https://github.com/eswar488/smartexamz/blob/main/app.js): `app.js`
- [Attendance API client](https://github.com/eswar488/smartexamz/blob/main/attendance-api.js): `attendance-api.js`
- [Attendance service](https://github.com/eswar488/smartexamz/blob/main/attendance-service.js): `attendance-service.js`

### Server and records

- [Sample data seed](https://github.com/eswar488/smartexamz/blob/main/attendance-seed.js): `attendance-seed.js`
- [HTTP server](https://github.com/eswar488/smartexamz/blob/main/server.js): `server.js`
- **SQLite database**

### Other components

- **Administrator**
- **In-charge**
- **Student**

## Connections

- Administrator → Role portal: signs in (evidence: `README.md`)
- In-charge → Role portal: signs in (evidence: `README.md`)
- Student → Role portal: signs in (evidence: `README.md`)
- Role portal → Login validation: validates credentials
- Role portal → HTTP server: authenticates via (evidence: `README.md`)
- Role portal → Student API client: requests dashboard (evidence: `README.md`)
- Student API client → HTTP server: calls student routes (evidence: `student-api.js`)
- Administrator → Admin screens: manages records (evidence: `README.md`)
- Admin screens → Dashboard analytics: derives metrics
- Administrator → Seating workflow: reviews proposals (evidence: `README.md`)
- Seating workflow → Seating API client: requests allocation (evidence: `seating-api.js`)
- Seating API client → HTTP server: calls admin routes (evidence: `seating-api.js`)
- HTTP server → Allocation service: dispatches seating (evidence: `server.js`)
- Allocation service → SQLite database: reads and writes (evidence: `seating-service.js`)
- In-charge → Attendance workflow: records attendance (evidence: `README.md`)
- Attendance workflow → Attendance API client: sends updates (evidence: `app.js`)
- Attendance API client → HTTP server: calls attendance routes (evidence: `attendance-api.js`)
- HTTP server → Attendance service: dispatches attendance (evidence: `server.js`)
- Attendance service → SQLite database: reads and writes (evidence: `attendance-service.js`)
- Student → Student API client: fetches dashboard (evidence: `README.md`)
- HTTP server → Student accounts: dispatches student routes (evidence: `server.js`)
- Student accounts → SQLite database: reads and writes (evidence: `student-service.js`)
- HTTP server → Sample data seed: loads sample records (evidence: `server.js`)
- Sample data seed → SQLite database: populates records (evidence: `attendance-seed.js`)
