# anandkumar01/erp architecture

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

- Interactive diagram: https://gitdiagram.com/anandkumar01/erp
- Repository: https://github.com/anandkumar01/erp

## Overview

This is a Django academic ERP for managing courses, branches, students, teachers, attendance, and assessment. The visible workflows include teacher attendance recording and review, teacher marks and question-paper entry, and student-record management; the domain models hold the underlying academic data. Supporting capabilities include timetable and subject assignment, spreadsheet import/export, and password email. The sampled source shows some direct calls and model relationships; unsampled routes and screens are represented only where the source index or tree supports them.

Main entry points: [`teacher/views.py`](https://github.com/anandkumar01/erp/blob/master/teacher/views.py) (Teacher portal), [`attendance/views.py`](https://github.com/anandkumar01/erp/blob/master/attendance/views.py) (Attendance workflows), [`student/views.py`](https://github.com/anandkumar01/erp/blob/master/student/views.py) (Student portal), [`branch/models.py`](https://github.com/anandkumar01/erp/blob/master/branch/models.py) (Branches and timetable)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_academic["Academic setup"]
  node_branch_data[("Branches and timetable<br/>[models.py]")]
  node_branch_services["Branch queries<br/>[services.py]"]
  node_course_data[("Courses and subjects<br/>[models.py]")]
end

subgraph group_people["People management"]
  node_student_views["Student portal<br/>[views.py]"]
  node_student_data[("Student records and marks<br/>[models.py]")]
  node_student_services["Student lookups<br/>[services.py]"]
  node_teacher_data[("Teacher records<br/>[models.py]")]
  node_teacher_services["Teacher lookups<br/>[services.py]"]
  node_student_resources["Student data import/export<br/>[resources.py]"]
end

subgraph group_teaching["Teaching operations"]
  node_teacher_views["Teacher portal<br/>[views.py]"]
  node_attendance_views["Attendance workflows<br/>[views.py]"]
  node_attendance_form["Attendance form<br/>[forms.py]"]
  node_attendance_data[("Attendance records<br/>[models.py]")]
end

subgraph group_assessment["Assessment"]
  node_assessment_data[("Question papers<br/>[models.py]")]
end

subgraph group_platform["Shared services"]
  node_erp_services["Password and mail service<br/>[services.py]"]
end

node_teacher_actor(("Teacher"))
node_student_actor(("Student"))
node_smtp["SMTP mail service"]

node_teacher_actor -->|"uses portal"| node_teacher_views
node_teacher_actor -->|"records attendance"| node_attendance_views
node_teacher_views -->|"reads teacher"| node_teacher_data
node_teacher_views -->|"reads and updates"| node_branch_data
node_teacher_views -->|"reads subjects"| node_course_data
node_teacher_views -->|"updates marks"| node_student_data
node_teacher_views -->|"uses form"| node_attendance_form
node_teacher_views -->|"resets password"| node_erp_services
node_attendance_views -->|"renders form"| node_attendance_form
node_attendance_views -->|"records and queries"| node_attendance_data
node_attendance_views -->|"queries branch"| node_branch_data
node_attendance_views -->|"queries subjects"| node_course_data
node_attendance_views -->|"queries students"| node_student_data
node_attendance_views -->|"looks up teacher"| node_teacher_services
node_student_actor -.->|"uses portal"| node_student_views
node_student_views -->|"manages records"| node_student_data
node_student_views -->|"uses lookups"| node_student_services
node_student_views -->|"queries branches"| node_branch_services
node_student_views -->|"queries attendance"| node_attendance_data
node_student_views -->|"uses data resource"| node_student_resources
node_student_data -->|"creates password"| node_erp_services
node_student_data -->|"references branch"| node_branch_data
node_branch_data -->|"references course"| node_course_data
node_branch_data -->|"assigns teachers"| node_teacher_data
node_branch_services -->|"filters subjects"| node_branch_data
node_teacher_services -->|"queries teachers"| node_teacher_data
node_erp_services -->|"queries defaults"| node_course_data
node_erp_services -->|"sends email"| node_smtp
node_student_resources -->|"imports and exports"| node_student_data

click node_teacher_views "https://github.com/anandkumar01/erp/blob/master/teacher/views.py"
click node_attendance_views "https://github.com/anandkumar01/erp/blob/master/attendance/views.py"
click node_attendance_form "https://github.com/anandkumar01/erp/blob/master/attendance/forms.py"
click node_attendance_data "https://github.com/anandkumar01/erp/blob/master/attendance/models.py"
click node_branch_data "https://github.com/anandkumar01/erp/blob/master/branch/models.py"
click node_branch_services "https://github.com/anandkumar01/erp/blob/master/branch/services.py"
click node_course_data "https://github.com/anandkumar01/erp/blob/master/erp/models.py"
click node_student_views "https://github.com/anandkumar01/erp/blob/master/student/views.py"
click node_student_data "https://github.com/anandkumar01/erp/blob/master/student/models.py"
click node_student_services "https://github.com/anandkumar01/erp/blob/master/student/services.py"
click node_teacher_data "https://github.com/anandkumar01/erp/blob/master/teacher/models.py"
click node_teacher_services "https://github.com/anandkumar01/erp/blob/master/teacher/services.py"
click node_student_resources "https://github.com/anandkumar01/erp/blob/master/student/resources.py"
click node_assessment_data "https://github.com/anandkumar01/erp/blob/master/erp/models.py"
click node_erp_services "https://github.com/anandkumar01/erp/blob/master/erp/services.py"

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_branch_data,node_branch_services,node_course_data toneBlue
class node_student_views,node_student_data,node_student_services,node_teacher_data,node_teacher_services,node_student_resources toneAmber
class node_teacher_views,node_attendance_views,node_attendance_form,node_attendance_data toneMint
class node_assessment_data toneRose
class node_erp_services,node_teacher_actor,node_student_actor,node_smtp toneIndigo
```

## Components

### Academic setup

- [Branches and timetable](https://github.com/anandkumar01/erp/blob/master/branch/models.py): `branch/models.py`
- [Branch queries](https://github.com/anandkumar01/erp/blob/master/branch/services.py): `branch/services.py`
- [Courses and subjects](https://github.com/anandkumar01/erp/blob/master/erp/models.py): `erp/models.py`

### People management

- [Student portal](https://github.com/anandkumar01/erp/blob/master/student/views.py): `student/views.py`
- [Student records and marks](https://github.com/anandkumar01/erp/blob/master/student/models.py): `student/models.py`
- [Student lookups](https://github.com/anandkumar01/erp/blob/master/student/services.py): `student/services.py`
- [Teacher records](https://github.com/anandkumar01/erp/blob/master/teacher/models.py): `teacher/models.py`
- [Teacher lookups](https://github.com/anandkumar01/erp/blob/master/teacher/services.py): `teacher/services.py`
- [Student data import/export](https://github.com/anandkumar01/erp/blob/master/student/resources.py): `student/resources.py`

### Teaching operations

- [Teacher portal](https://github.com/anandkumar01/erp/blob/master/teacher/views.py): `teacher/views.py`
- [Attendance workflows](https://github.com/anandkumar01/erp/blob/master/attendance/views.py): `attendance/views.py`
- [Attendance form](https://github.com/anandkumar01/erp/blob/master/attendance/forms.py): `attendance/forms.py`
- [Attendance records](https://github.com/anandkumar01/erp/blob/master/attendance/models.py): `attendance/models.py`

### Assessment

- [Question papers](https://github.com/anandkumar01/erp/blob/master/erp/models.py): `erp/models.py`

### Shared services

- [Password and mail service](https://github.com/anandkumar01/erp/blob/master/erp/services.py): `erp/services.py`

### Other components

- **Teacher**
- **Student**
- **SMTP mail service**

## Connections

- Teacher → Teacher portal: uses portal
- Teacher → Attendance workflows: records attendance
- Teacher portal → Teacher records: reads teacher (evidence: `teacher/views.py`)
- Teacher portal → Branches and timetable: reads and updates (evidence: `teacher/views.py`)
- Teacher portal → Courses and subjects: reads subjects (evidence: `teacher/views.py`)
- Teacher portal → Student records and marks: updates marks (evidence: `teacher/views.py`)
- Teacher portal → Attendance form: uses form (evidence: `teacher/views.py`)
- Teacher portal → Password and mail service: resets password (evidence: `teacher/views.py`)
- Attendance workflows → Attendance form: renders form (evidence: `attendance/views.py`)
- Attendance workflows → Attendance records: records and queries (evidence: `attendance/views.py`)
- Attendance workflows → Branches and timetable: queries branch (evidence: `attendance/views.py`)
- Attendance workflows → Courses and subjects: queries subjects (evidence: `attendance/views.py`)
- Attendance workflows → Student records and marks: queries students (evidence: `attendance/views.py`)
- Attendance workflows → Teacher lookups: looks up teacher (evidence: `attendance/views.py`)
- Student → Student portal: uses portal
- Student portal → Student records and marks: manages records (evidence: `student/views.py`)
- Student portal → Student lookups: uses lookups (evidence: `student/views.py`)
- Student portal → Branch queries: queries branches (evidence: `student/views.py`)
- Student portal → Attendance records: queries attendance (evidence: `student/views.py`)
- Student portal → Student data import/export: uses data resource (evidence: `student/views.py`)
- Student records and marks → Password and mail service: creates password (evidence: `student/models.py`)
- Student records and marks → Branches and timetable: references branch (evidence: `student/models.py`)
- Branches and timetable → Courses and subjects: references course (evidence: `branch/models.py`)
- Branches and timetable → Teacher records: assigns teachers (evidence: `branch/models.py`)
- Branch queries → Branches and timetable: filters subjects (evidence: `branch/services.py`)
- Teacher lookups → Teacher records: queries teachers (evidence: `teacher/services.py`)
- Password and mail service → Courses and subjects: queries defaults (evidence: `erp/services.py`)
- Password and mail service → SMTP mail service: sends email (evidence: `erp/services.py`)
- Student data import/export → Student records and marks: imports and exports (evidence: `student/resources.py`)
