# sabiha-islam-liza/cms architecture

> Architecture diagram of the GitHub repository sabiha-islam-liza/cms, 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/sabiha-islam-liza/cms
- Repository: https://github.com/sabiha-islam-liza/cms

## Overview

This is a console-based complaint management system. Users register or log in, file complaints or grievances, and can track outcomes, rate admins, and view notifications or punishments; admins and resolution teams review, assign, update, and decide complaint outcomes, while registrars inspect admin ratings. The graph captures the menu dispatches and source-visible calls. Resolution-team subworkflows are represented from their declared capabilities, but their internal call relationships are not inferred from partial excerpts.

Main entry points: [`main.c`](https://github.com/sabiha-islam-liza/cms/blob/main/main.c) (Portal selector), [`user.c`](https://github.com/sabiha-islam-liza/cms/blob/main/user.c) (User portal), [`resolution.c`](https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c) (Discipline decisions), [`registrar.c`](https://github.com/sabiha-islam-liza/cms/blob/main/registrar.c) (Registrar portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_main["Portal selector<br/>[main.c]"]
end

subgraph group_accounts["User and admin portals"]
  node_user_portal["User portal<br/>[user.c]"]
  node_admin_portal["Admin portal<br/>[admin.c]"]
  node_registrar["Registrar portal<br/>[registrar.c]"]
end

subgraph group_casework["Complaint resolution"]
  node_team_access["Team access<br/>[resolution.c]"]
  node_complaint_intake["Complaint intake<br/>[user.c]"]
  node_admin_assignment["Admin assignment<br/>[admin.c]"]
  node_team_review["Team review<br/>[resolution.c]"]
  node_grievance_review["Grievance review<br/>[resolution.c]"]
  node_discipline["Discipline decisions<br/>[resolution.c]"]
end

subgraph group_records["Shared records and security"]
  node_complaint_records[("Complaint records<br/>[user.c]")]
  node_notifications[("Notifications<br/>[user.c]")]
  node_ratings[("Admin ratings<br/>[user.c]")]
  node_punishments[("Punishment records<br/>[resolution.c]")]
  node_password_hash["MD5 hashing<br/>[MD5.c]"]
end

node_operator(("Console user"))

node_operator -->|"chooses portal"| node_main
node_main -->|"opens"| node_user_portal
node_main -->|"opens"| node_admin_portal
node_main -->|"opens"| node_team_access
node_main -->|"opens"| node_registrar
node_user_portal -->|"files cases"| node_complaint_intake
node_complaint_intake -->|"saves cases"| node_complaint_records
node_complaint_intake -->|"sends alerts"| node_notifications
node_admin_portal -->|"notifies teams"| node_notifications
node_team_access -.->|"provides review"| node_team_review
node_team_review -->|"loads cases"| node_complaint_records
node_team_review -.->|"offers grievance review"| node_grievance_review
node_grievance_review -.->|"forwards decisions"| node_discipline
node_discipline -->|"updates outcomes"| node_complaint_records
node_discipline -->|"records punishment"| node_punishments
node_discipline -->|"notifies user"| node_notifications
node_user_portal -->|"updates ratings"| node_ratings
node_registrar -->|"reads ratings"| node_ratings
node_user_portal -->|"hashes passwords"| node_password_hash
node_registrar -->|"hashes passwords"| node_password_hash

click node_main "https://github.com/sabiha-islam-liza/cms/blob/main/main.c"
click node_user_portal "https://github.com/sabiha-islam-liza/cms/blob/main/user.c"
click node_admin_portal "https://github.com/sabiha-islam-liza/cms/blob/main/admin.c"
click node_registrar "https://github.com/sabiha-islam-liza/cms/blob/main/registrar.c"
click node_team_access "https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c"
click node_complaint_intake "https://github.com/sabiha-islam-liza/cms/blob/main/user.c"
click node_admin_assignment "https://github.com/sabiha-islam-liza/cms/blob/main/admin.c"
click node_team_review "https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c"
click node_grievance_review "https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c"
click node_discipline "https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c"
click node_complaint_records "https://github.com/sabiha-islam-liza/cms/blob/main/user.c"
click node_notifications "https://github.com/sabiha-islam-liza/cms/blob/main/user.c"
click node_ratings "https://github.com/sabiha-islam-liza/cms/blob/main/user.c"
click node_punishments "https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c"
click node_password_hash "https://github.com/sabiha-islam-liza/cms/blob/main/MD5.c"

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_main,node_operator toneBlue
class node_user_portal,node_admin_portal,node_registrar toneAmber
class node_team_access,node_complaint_intake,node_admin_assignment,node_team_review,node_grievance_review,node_discipline toneMint
class node_complaint_records,node_notifications,node_ratings,node_punishments,node_password_hash toneRose
```

## Components

### Application entry

- [Portal selector](https://github.com/sabiha-islam-liza/cms/blob/main/main.c): `main.c`

### User and admin portals

- [User portal](https://github.com/sabiha-islam-liza/cms/blob/main/user.c): `user.c`
- [Admin portal](https://github.com/sabiha-islam-liza/cms/blob/main/admin.c): `admin.c`
- [Registrar portal](https://github.com/sabiha-islam-liza/cms/blob/main/registrar.c): `registrar.c`

### Complaint resolution

- [Team access](https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c): `resolution.c`
- [Complaint intake](https://github.com/sabiha-islam-liza/cms/blob/main/user.c): `user.c`
- [Admin assignment](https://github.com/sabiha-islam-liza/cms/blob/main/admin.c): `admin.c`
- [Team review](https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c): `resolution.c`
- [Grievance review](https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c): `resolution.c`
- [Discipline decisions](https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c): `resolution.c`

### Shared records and security

- [Complaint records](https://github.com/sabiha-islam-liza/cms/blob/main/user.c): `user.c`
- [Notifications](https://github.com/sabiha-islam-liza/cms/blob/main/user.c): `user.c`
- [Admin ratings](https://github.com/sabiha-islam-liza/cms/blob/main/user.c): `user.c`
- [Punishment records](https://github.com/sabiha-islam-liza/cms/blob/main/resolution.c): `resolution.c`
- [MD5 hashing](https://github.com/sabiha-islam-liza/cms/blob/main/MD5.c): `MD5.c`

### Other components

- **Console user**

## Connections

- Console user → Portal selector: chooses portal (evidence: `main.c`)
- Portal selector → User portal: opens (evidence: `main.c`)
- Portal selector → Admin portal: opens (evidence: `main.c`)
- Portal selector → Team access: opens (evidence: `main.c`)
- Portal selector → Registrar portal: opens (evidence: `main.c`)
- User portal → Complaint intake: files cases (evidence: `user.c`)
- Complaint intake → Complaint records: saves cases (evidence: `user.c`)
- Complaint intake → Notifications: sends alerts (evidence: `user.c`)
- Admin portal → Notifications: notifies teams (evidence: `admin.c`)
- Team access → Team review: provides review (evidence: `resolution.c`)
- Team review → Complaint records: loads cases (evidence: `resolution.c`)
- Team review → Grievance review: offers grievance review (evidence: `resolution.c`)
- Grievance review → Discipline decisions: forwards decisions (evidence: `resolution.c`)
- Discipline decisions → Complaint records: updates outcomes (evidence: `resolution.c`)
- Discipline decisions → Punishment records: records punishment (evidence: `resolution.c`)
- Discipline decisions → Notifications: notifies user (evidence: `resolution.c`)
- User portal → Admin ratings: updates ratings (evidence: `user.c`)
- Registrar portal → Admin ratings: reads ratings (evidence: `registrar.c`)
- User portal → MD5 hashing: hashes passwords (evidence: `user.c`)
- Registrar portal → MD5 hashing: hashes passwords (evidence: `registrar.c`)
