# kathir-23/demo architecture

> Architecture diagram of the GitHub repository kathir-23/demo, 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/kathir-23/demo
- Repository: https://github.com/kathir-23/demo

## Overview

This is a Flask-based college ERP: users sign in under admin, staff, or student roles, then use role-specific pages to manage or view college records. The central Flask application owns authentication, role checks, route handling, calculations, and page rendering; JSON files provide persistence. README capabilities include administration, course enrollment, attendance, grades, reports, and announcements. The sampled application excerpt is partial, so detailed route-to-store wiring is represented only at the application level.

Main entry points: [`app.py`](https://github.com/kathir-23/demo/blob/main/app.py) (Flask routes), [`data/users.json`](https://github.com/kathir-23/demo/blob/main/data/users.json) (Accounts), [`data/students.json`](https://github.com/kathir-23/demo/blob/main/data/students.json) (Students), [`data/staff.json`](https://github.com/kathir-23/demo/blob/main/data/staff.json) (Staff records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Flask routes<br/>[app.py]"]
end

subgraph group_records["JSON records"]
  node_users[("Accounts<br/>[users.json]")]
  node_students[("Students<br/>[students.json]")]
  node_staffrecords[("Staff records<br/>[staff.json]")]
  node_courses[("Courses<br/>[courses.json]")]
  node_attendance[("Attendance<br/>[attendance.json]")]
  node_grades[("Grades<br/>[grades.json]")]
  node_announcements[("Announcements<br/>[announcements.json]")]
end

subgraph group_adminui["Admin pages"]
  node_loginui["Login page<br/>[login.html]"]
  node_adminui["Admin pages"]
end

subgraph group_portals["Staff and student pages"]
  node_staffui["Staff pages"]
  node_studentui["Student pages"]
end

node_admin(("Admin"))
node_staff(("Staff"))
node_student(("Student"))

node_admin -->|"submits requests"| node_app
node_staff -->|"submits requests"| node_app
node_student -->|"submits requests"| node_app
node_app -->|"reads and writes"| node_users
node_app -->|"reads and writes"| node_students
node_app -->|"reads and writes"| node_staffrecords
node_app -->|"reads and writes"| node_courses
node_app -->|"reads and writes"| node_attendance
node_app -->|"reads and writes"| node_grades
node_app -->|"reads and writes"| node_announcements
node_app -->|"renders"| node_loginui
node_app -->|"renders"| node_adminui
node_app -->|"renders"| node_staffui
node_app -->|"renders"| node_studentui

click node_app "https://github.com/kathir-23/demo/blob/main/app.py"
click node_users "https://github.com/kathir-23/demo/blob/main/data/users.json"
click node_students "https://github.com/kathir-23/demo/blob/main/data/students.json"
click node_staffrecords "https://github.com/kathir-23/demo/blob/main/data/staff.json"
click node_courses "https://github.com/kathir-23/demo/blob/main/data/courses.json"
click node_attendance "https://github.com/kathir-23/demo/blob/main/data/attendance.json"
click node_grades "https://github.com/kathir-23/demo/blob/main/data/grades.json"
click node_announcements "https://github.com/kathir-23/demo/blob/main/data/announcements.json"
click node_loginui "https://github.com/kathir-23/demo/blob/main/templates/login.html"
click node_adminui "https://github.com/kathir-23/demo/tree/main/templates"
click node_staffui "https://github.com/kathir-23/demo/tree/main/templates"
click node_studentui "https://github.com/kathir-23/demo/tree/main/templates"

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_app toneBlue
class node_users,node_students,node_staffrecords,node_courses,node_attendance,node_grades,node_announcements toneAmber
class node_loginui,node_adminui toneMint
class node_staffui,node_studentui toneRose
class node_admin,node_staff,node_student toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/kathir-23/demo/blob/main/app.py): `app.py`

### JSON records

- [Accounts](https://github.com/kathir-23/demo/blob/main/data/users.json): `data/users.json`
- [Students](https://github.com/kathir-23/demo/blob/main/data/students.json): `data/students.json`
- [Staff records](https://github.com/kathir-23/demo/blob/main/data/staff.json): `data/staff.json`
- [Courses](https://github.com/kathir-23/demo/blob/main/data/courses.json): `data/courses.json`
- [Attendance](https://github.com/kathir-23/demo/blob/main/data/attendance.json): `data/attendance.json`
- [Grades](https://github.com/kathir-23/demo/blob/main/data/grades.json): `data/grades.json`
- [Announcements](https://github.com/kathir-23/demo/blob/main/data/announcements.json): `data/announcements.json`

### Admin pages

- [Login page](https://github.com/kathir-23/demo/blob/main/templates/login.html): `templates/login.html`
- [Admin pages](https://github.com/kathir-23/demo/tree/main/templates): `templates`

### Staff and student pages

- [Staff pages](https://github.com/kathir-23/demo/tree/main/templates): `templates`
- [Student pages](https://github.com/kathir-23/demo/tree/main/templates): `templates`

### Other components

- **Admin**
- **Staff**
- **Student**

## Connections

- Admin → Flask routes: submits requests
- Staff → Flask routes: submits requests
- Student → Flask routes: submits requests
- Flask routes → Accounts: reads and writes
- Flask routes → Students: reads and writes
- Flask routes → Staff records: reads and writes
- Flask routes → Courses: reads and writes
- Flask routes → Attendance: reads and writes
- Flask routes → Grades: reads and writes
- Flask routes → Announcements: reads and writes
- Flask routes → Login page: renders
- Flask routes → Admin pages: renders
- Flask routes → Staff pages: renders
- Flask routes → Student pages: renders
