# sekharb04/scms-project architecture

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

- Interactive diagram: https://gitdiagram.com/sekharb04/scms-project
- Repository: https://github.com/sekharb04/scms-project

## Overview

SCMS is a Django student complaint management system. Students register or sign in, submit and track complaints; staff manage assigned cases, while administrators review, resolve, and escalate them. Complaint records carry status, priority, SLA, comments, and escalation history. Background tasks check SLA breaches, auto-escalate overdue cases, assign pending work, and report statistics. The README documents role-based access and centralized history; the sampled views, models, and tasks clarify the core implementation. Some routing, signal behavior, and database wiring are not shown in excerpts, so those links are omitted.

Main entry points: [`complaint_system/complaints/views.py`](https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/views.py) (Complaint Views), [`complaint_system/accounts/views.py`](https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/views.py) (Account Views), [`complaint_system/complaints/models.py`](https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/models.py) (Complaint Records), [`complaint_system/accounts/models.py`](https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/models.py) (User Roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and Access"]
  node_account_views["Account Views<br/>[views.py]"]
  node_account_forms["Auth Forms<br/>[forms.py]"]
  node_user_model[("User Roles<br/>[models.py]")]
  node_accounts_admin["Account Admin<br/>[admin.py]"]
end

subgraph group_complaint_flow["Complaint Workflow"]
  node_complaint_views["Complaint Views<br/>[views.py]"]
  node_complaint_forms["Complaint Forms<br/>[forms.py]"]
  node_complaint_records[("Complaint Records<br/>[models.py]")]
  node_workflow_signals["Workflow Signals<br/>[signals.py]"]
  node_admin_console["Django Admin<br/>[admin.py]"]
end

subgraph group_oversight["SLA and Oversight"]
  node_sla_tasks["SLA and Assignment Tasks<br/>[tasks.py]"]
  node_sqlite[("SQLite")]
end

subgraph group_presentation["Web Interface"]
  node_account_pages["Account Pages"]
  node_complaint_pages["Complaint Pages"]
  node_shared_pages["Shared Pages"]
  node_browser_helpers["Browser Helpers<br/>[main.js]"]
end

node_student(("Student"))
node_staff_user(("Staff"))
node_admin_user(("Administrator"))

node_student -->|"registers or signs in"| node_account_views
node_staff_user -->|"signs in"| node_account_views
node_admin_user -->|"signs in"| node_account_views
node_account_views -->|"validates credentials"| node_account_forms
node_account_views -->|"creates users"| node_user_model
node_account_views -->|"redirects by role"| node_complaint_views
node_account_views -->|"renders"| node_account_pages
node_student -->|"submits and tracks"| node_complaint_views
node_staff_user -->|"updates assigned cases"| node_complaint_views
node_admin_user -->|"reviews and escalates"| node_complaint_views
node_complaint_views -->|"validates input"| node_complaint_forms
node_complaint_views -->|"reads and updates"| node_complaint_records
node_complaint_views -->|"checks user roles"| node_user_model
node_complaint_views -->|"renders"| node_complaint_pages
node_complaint_records -->|"stores comments and escalations"| node_complaint_records
node_sla_tasks -->|"checks and updates"| node_complaint_records
node_sla_tasks -->|"assigns staff"| node_user_model
node_workflow_signals -.->|"handles model events"| node_complaint_records
node_admin_console -->|"manages records"| node_complaint_records
node_accounts_admin -->|"manages accounts"| node_user_model
node_shared_pages -.->|"loads scripts"| node_browser_helpers
node_complaint_views -.->|"persists records"| node_sqlite

click node_account_views "https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/views.py"
click node_account_forms "https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/forms.py"
click node_user_model "https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/models.py"
click node_complaint_views "https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/views.py"
click node_complaint_forms "https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/forms.py"
click node_complaint_records "https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/models.py"
click node_workflow_signals "https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/signals.py"
click node_admin_console "https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/admin.py"
click node_sla_tasks "https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/tasks.py"
click node_accounts_admin "https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/admin.py"
click node_account_pages "https://github.com/sekharb04/scms-project/tree/main/complaint_system/accounts/templates/accounts"
click node_complaint_pages "https://github.com/sekharb04/scms-project/tree/main/complaint_system/complaints/templates/complaints"
click node_shared_pages "https://github.com/sekharb04/scms-project/tree/main/complaint_system/templates"
click node_browser_helpers "https://github.com/sekharb04/scms-project/blob/main/complaint_system/static/js/main.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_account_views,node_account_forms,node_user_model,node_accounts_admin toneBlue
class node_complaint_views,node_complaint_forms,node_complaint_records,node_workflow_signals,node_admin_console toneAmber
class node_sla_tasks,node_sqlite toneMint
class node_account_pages,node_complaint_pages,node_shared_pages,node_browser_helpers toneRose
class node_student,node_staff_user,node_admin_user toneIndigo
```

## Components

### Accounts and Access

- [Account Views](https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/views.py): `complaint_system/accounts/views.py`
- [Auth Forms](https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/forms.py): `complaint_system/accounts/forms.py`
- [User Roles](https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/models.py): `complaint_system/accounts/models.py`
- [Account Admin](https://github.com/sekharb04/scms-project/blob/main/complaint_system/accounts/admin.py): `complaint_system/accounts/admin.py`

### Complaint Workflow

- [Complaint Views](https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/views.py): `complaint_system/complaints/views.py`
- [Complaint Forms](https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/forms.py): `complaint_system/complaints/forms.py`
- [Complaint Records](https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/models.py): `complaint_system/complaints/models.py`
- [Workflow Signals](https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/signals.py): `complaint_system/complaints/signals.py`
- [Django Admin](https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/admin.py): `complaint_system/complaints/admin.py`

### SLA and Oversight

- [SLA and Assignment Tasks](https://github.com/sekharb04/scms-project/blob/main/complaint_system/complaints/tasks.py): `complaint_system/complaints/tasks.py`
- **SQLite**

### Web Interface

- [Account Pages](https://github.com/sekharb04/scms-project/tree/main/complaint_system/accounts/templates/accounts): `complaint_system/accounts/templates/accounts`
- [Complaint Pages](https://github.com/sekharb04/scms-project/tree/main/complaint_system/complaints/templates/complaints): `complaint_system/complaints/templates/complaints`
- [Shared Pages](https://github.com/sekharb04/scms-project/tree/main/complaint_system/templates): `complaint_system/templates`
- [Browser Helpers](https://github.com/sekharb04/scms-project/blob/main/complaint_system/static/js/main.js): `complaint_system/static/js/main.js`

### Other components

- **Student**
- **Staff**
- **Administrator**

## Connections

- Student → Account Views: registers or signs in (evidence: `complaint_system/accounts/views.py`)
- Staff → Account Views: signs in (evidence: `complaint_system/accounts/views.py`)
- Administrator → Account Views: signs in (evidence: `complaint_system/accounts/views.py`)
- Account Views → Auth Forms: validates credentials (evidence: `complaint_system/accounts/views.py`)
- Account Views → User Roles: creates users (evidence: `complaint_system/accounts/views.py`)
- Account Views → Complaint Views: redirects by role (evidence: `complaint_system/accounts/views.py`)
- Account Views → Account Pages: renders (evidence: `complaint_system/accounts/views.py`)
- Student → Complaint Views: submits and tracks (evidence: `README.md`)
- Staff → Complaint Views: updates assigned cases (evidence: `README.md`)
- Administrator → Complaint Views: reviews and escalates (evidence: `README.md`)
- Complaint Views → Complaint Forms: validates input (evidence: `complaint_system/complaints/views.py`)
- Complaint Views → Complaint Records: reads and updates (evidence: `complaint_system/complaints/views.py`)
- Complaint Views → User Roles: checks user roles (evidence: `complaint_system/complaints/views.py`)
- Complaint Views → Complaint Pages: renders (evidence: `complaint_system/complaints/views.py`)
- Complaint Records → Complaint Records: stores comments and escalations (evidence: `complaint_system/complaints/models.py`)
- SLA and Assignment Tasks → Complaint Records: checks and updates (evidence: `complaint_system/complaints/tasks.py`)
- SLA and Assignment Tasks → User Roles: assigns staff (evidence: `complaint_system/complaints/tasks.py`)
- Workflow Signals → Complaint Records: handles model events
- Django Admin → Complaint Records: manages records (evidence: `complaint_system/complaints/admin.py`)
- Account Admin → User Roles: manages accounts (evidence: `complaint_system/accounts/admin.py`)
- Shared Pages → Browser Helpers: loads scripts
- Complaint Views → SQLite: persists records
