# kathir-23/erp-slp architecture

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

- Interactive diagram: https://gitdiagram.com/kathir-23/erp-slp
- Repository: https://github.com/kathir-23/erp-slp

## Overview

Minimal College ERP is a Flask application for administering college records and providing staff and students with role-specific academic views. The main workflow is login and role-based routing, followed by management or viewing of courses, people, attendance, grades, reports, and announcements; records are stored in JSON files. The sampled code shows authentication, role checks, student dashboard calculations, and attendance writes in a single application module. Other feature-to-storage links are documented at the product level, but their route implementations were not sampled.

Main entry points: [`app.py`](https://github.com/kathir-23/erp-slp/blob/main/app.py) (Admin Management), [`data/courses.json`](https://github.com/kathir-23/erp-slp/blob/main/data/courses.json) (Courses), [`data/attendance.json`](https://github.com/kathir-23/erp-slp/blob/main/data/attendance.json) (Attendance), [`data/grades.json`](https://github.com/kathir-23/erp-slp/blob/main/data/grades.json) (Grades)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Routing"]
  node_app["Flask Application<br/>[app.py]"]
  node_auth["Login and Roles<br/>[app.py]"]
end

subgraph group_admin["Administration"]
  node_admin_ops["Admin Management<br/>[app.py]"]
  node_reports["Reports and Dashboard<br/>[app.py]"]
end

subgraph group_academic["Academic Activity"]
  node_staff_ops["Staff Workspace<br/>[app.py]"]
  node_student_ops["Student Workspace<br/>[app.py]"]
end

subgraph group_records["JSON Records"]
  node_users[("User Accounts<br/>[users.json]")]
  node_students[("Student Records<br/>[students.json]")]
  node_staff[("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

node_browser(("College User"))

node_browser -->|"uses"| node_app
node_app -->|"routes through"| node_auth
node_auth -.->|"checks accounts"| node_users
node_auth -->|"role routes"| node_admin_ops
node_auth -->|"role routes"| node_staff_ops
node_auth -->|"role routes"| node_student_ops
node_admin_ops -->|"manages accounts"| node_users
node_admin_ops -->|"manages records"| node_students
node_admin_ops -->|"manages records"| node_staff
node_admin_ops -->|"manages courses"| node_courses
node_admin_ops -->|"posts notices"| node_announcements
node_reports -->|"reports on"| node_attendance
node_reports -->|"reports on"| node_grades
node_staff_ops -->|"views assignments"| node_courses
node_staff_ops -->|"records attendance"| node_attendance
node_staff_ops -->|"enters grades"| node_grades
node_staff_ops -->|"views notices"| node_announcements
node_student_ops -->|"loads profile"| node_students
node_student_ops -->|"views enrollment"| node_courses
node_student_ops -->|"summarizes attendance"| node_attendance
node_student_ops -->|"views grades"| node_grades
node_student_ops -->|"views notices"| node_announcements

click node_app "https://github.com/kathir-23/erp-slp/blob/main/app.py"
click node_auth "https://github.com/kathir-23/erp-slp/blob/main/app.py"
click node_admin_ops "https://github.com/kathir-23/erp-slp/blob/main/app.py"
click node_reports "https://github.com/kathir-23/erp-slp/blob/main/app.py"
click node_staff_ops "https://github.com/kathir-23/erp-slp/blob/main/app.py"
click node_student_ops "https://github.com/kathir-23/erp-slp/blob/main/app.py"
click node_users "https://github.com/kathir-23/erp-slp/blob/main/data/users.json"
click node_students "https://github.com/kathir-23/erp-slp/blob/main/data/students.json"
click node_staff "https://github.com/kathir-23/erp-slp/blob/main/data/staff.json"
click node_courses "https://github.com/kathir-23/erp-slp/blob/main/data/courses.json"
click node_attendance "https://github.com/kathir-23/erp-slp/blob/main/data/attendance.json"
click node_grades "https://github.com/kathir-23/erp-slp/blob/main/data/grades.json"
click node_announcements "https://github.com/kathir-23/erp-slp/blob/main/data/announcements.json"

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,node_auth,node_browser toneBlue
class node_admin_ops,node_reports toneAmber
class node_staff_ops,node_student_ops toneMint
class node_users,node_students,node_staff,node_courses,node_attendance,node_grades,node_announcements toneRose
```

## Components

### Access and Routing

- [Flask Application](https://github.com/kathir-23/erp-slp/blob/main/app.py): `app.py`
- [Login and Roles](https://github.com/kathir-23/erp-slp/blob/main/app.py): `app.py`

### Administration

- [Admin Management](https://github.com/kathir-23/erp-slp/blob/main/app.py): `app.py`
- [Reports and Dashboard](https://github.com/kathir-23/erp-slp/blob/main/app.py): `app.py`

### Academic Activity

- [Staff Workspace](https://github.com/kathir-23/erp-slp/blob/main/app.py): `app.py`
- [Student Workspace](https://github.com/kathir-23/erp-slp/blob/main/app.py): `app.py`

### JSON Records

- [User Accounts](https://github.com/kathir-23/erp-slp/blob/main/data/users.json): `data/users.json`
- [Student Records](https://github.com/kathir-23/erp-slp/blob/main/data/students.json): `data/students.json`
- [Staff Records](https://github.com/kathir-23/erp-slp/blob/main/data/staff.json): `data/staff.json`
- [Courses](https://github.com/kathir-23/erp-slp/blob/main/data/courses.json): `data/courses.json`
- [Attendance](https://github.com/kathir-23/erp-slp/blob/main/data/attendance.json): `data/attendance.json`
- [Grades](https://github.com/kathir-23/erp-slp/blob/main/data/grades.json): `data/grades.json`
- [Announcements](https://github.com/kathir-23/erp-slp/blob/main/data/announcements.json): `data/announcements.json`

### Other components

- **College User**

## Connections

- College User → Flask Application: uses (evidence: `README.md`)
- Flask Application → Login and Roles: routes through (evidence: `app.py`)
- Login and Roles → User Accounts: checks accounts
- Login and Roles → Admin Management: role routes (evidence: `app.py`)
- Login and Roles → Staff Workspace: role routes (evidence: `app.py`)
- Login and Roles → Student Workspace: role routes (evidence: `app.py`)
- Admin Management → User Accounts: manages accounts (evidence: `README.md`)
- Admin Management → Student Records: manages records (evidence: `README.md`)
- Admin Management → Staff Records: manages records (evidence: `README.md`)
- Admin Management → Courses: manages courses (evidence: `README.md`)
- Admin Management → Announcements: posts notices (evidence: `README.md`)
- Reports and Dashboard → Attendance: reports on (evidence: `README.md`)
- Reports and Dashboard → Grades: reports on (evidence: `README.md`)
- Staff Workspace → Courses: views assignments (evidence: `README.md`)
- Staff Workspace → Attendance: records attendance (evidence: `app.py`)
- Staff Workspace → Grades: enters grades (evidence: `README.md`)
- Staff Workspace → Announcements: views notices (evidence: `README.md`)
- Student Workspace → Student Records: loads profile (evidence: `app.py`)
- Student Workspace → Courses: views enrollment (evidence: `app.py`)
- Student Workspace → Attendance: summarizes attendance (evidence: `app.py`)
- Student Workspace → Grades: views grades (evidence: `README.md`)
- Student Workspace → Announcements: views notices (evidence: `README.md`)
