# sadhurevanthchowdary-cell/kssem-service-portal architecture

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

- Interactive diagram: https://gitdiagram.com/sadhurevanthchowdary-cell/kssem-service-portal
- Repository: https://github.com/sadhurevanthchowdary-cell/kssem-service-portal

## Overview

KSSEM Service Portal is a Flask campus service-request system. Users choose a service category, submit a complaint with optional image and contact details, then track its status and history; category admins sign in to review and manage complaints. The graph preserves the documented submission controls, category pages, email and CSV capabilities. The route implementation is concentrated in app.py; unsampled route details are represented only where the README documents them.

Main entry points: [`app.py`](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py) (Flask routes), [`models.py`](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/models.py) (Data models), [`static/script.js`](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/static/script.js) (Browser interactions), [`templates/complaint.html`](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/templates/complaint.html) (Complaint form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Portal experience"]
  node_category_pages["Service categories"]
  node_submission_form["Complaint form<br/>[complaint.html]"]
  node_tracking_page["Complaint tracking<br/>[complaints.html]"]
  node_admin_pages["Admin pages"]
  node_frontend["Browser interactions<br/>[script.js]"]
end

subgraph group_requests["Complaint workflow"]
  node_submission["Complaint intake<br/>[app.py]"]
  node_tracking["Search and history<br/>[app.py]"]
  node_uploads["Image uploads"]
end

subgraph group_admin["Administration"]
  node_admin_auth["Admin authentication<br/>[app.py]"]
  node_complaint_admin["Complaint management<br/>[app.py]"]
  node_ip_controls["IP restrictions<br/>[app.py]"]
  node_csv_export["CSV export<br/>[app.py]"]
end

subgraph group_platform["Runtime and state"]
  node_flask_app["Flask routes<br/>[app.py]"]
  node_email_notice["Email confirmation<br/>[app.py]"]
  node_config["Portal configuration<br/>[config.py]"]
  node_models["Data models<br/>[models.py]"]
  node_database[("SQLite database<br/>[kssem.db]")]
  node_email_logs["Email fallback logs"]
end

node_user(("Campus user"))
node_admin_actor(("Category admin"))
node_smtp["SMTP service"]

node_user -->|"chooses service"| node_category_pages
node_category_pages -->|"opens form"| node_submission_form
node_user -->|"submits complaint"| node_submission_form
node_admin_actor -->|"manages complaints"| node_admin_pages
node_submission_form -->|"uses interactions"| node_frontend
node_tracking_page -->|"uses interactions"| node_frontend
node_admin_pages -->|"uses interactions"| node_frontend
node_frontend -->|"calls API"| node_flask_app
node_flask_app -->|"routes submissions"| node_submission
node_flask_app -->|"routes tracking"| node_tracking
node_flask_app -->|"routes login"| node_admin_auth
node_flask_app -->|"routes management"| node_complaint_admin
node_flask_app -->|"enforces restrictions"| node_ip_controls
node_flask_app -->|"routes export"| node_csv_export
node_submission -->|"creates complaint"| node_models
node_tracking -->|"queries history"| node_models
node_complaint_admin -->|"updates records"| node_models
node_ip_controls -->|"stores blocked IPs"| node_models
node_csv_export -->|"reads complaints"| node_models
node_submission -->|"stores images"| node_uploads
node_submission -.->|"sends confirmation"| node_email_notice
node_admin_auth -->|"sends confirmation"| node_email_notice
node_email_notice -.->|"sends email"| node_smtp
node_email_notice -->|"logs fallback"| node_email_logs
node_flask_app -->|"loads settings"| node_config
node_flask_app -->|"imports models"| node_models
node_models -->|"persists records"| node_database

click node_category_pages "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/tree/main/templates"
click node_submission_form "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/templates/complaint.html"
click node_tracking_page "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/templates/complaints.html"
click node_admin_pages "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/templates/admin-dashboard.html"
click node_frontend "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/static/script.js"
click node_flask_app "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py"
click node_submission "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py"
click node_tracking "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py"
click node_uploads "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/tree/main/uploads"
click node_admin_auth "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py"
click node_complaint_admin "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py"
click node_ip_controls "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py"
click node_csv_export "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py"
click node_email_notice "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py"
click node_config "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/config.py"
click node_models "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/models.py"
click node_database "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/kssem.db"
click node_email_logs "https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/tree/main/logs"

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_category_pages,node_submission_form,node_tracking_page,node_admin_pages,node_frontend,node_user toneBlue
class node_submission,node_tracking,node_uploads toneAmber
class node_admin_auth,node_complaint_admin,node_ip_controls,node_csv_export toneMint
class node_flask_app,node_email_notice,node_config,node_models,node_database,node_email_logs toneRose
class node_admin_actor,node_smtp toneIndigo
```

## Components

### Portal experience

- [Service categories](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/tree/main/templates): `templates`
- [Complaint form](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/templates/complaint.html): `templates/complaint.html`
- [Complaint tracking](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/templates/complaints.html): `templates/complaints.html`
- [Admin pages](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/templates/admin-dashboard.html): `templates/admin-dashboard.html`
- [Browser interactions](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/static/script.js): `static/script.js`

### Complaint workflow

- [Complaint intake](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py): `app.py`
- [Search and history](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py): `app.py`
- [Image uploads](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/tree/main/uploads): `uploads`

### Administration

- [Admin authentication](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py): `app.py`
- [Complaint management](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py): `app.py`
- [IP restrictions](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py): `app.py`
- [CSV export](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py): `app.py`

### Runtime and state

- [Flask routes](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py): `app.py`
- [Email confirmation](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/app.py): `app.py`
- [Portal configuration](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/config.py): `config.py`
- [Data models](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/models.py): `models.py`
- [SQLite database](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/blob/main/kssem.db): `kssem.db`
- [Email fallback logs](https://github.com/sadhurevanthchowdary-cell/kssem-service-portal/tree/main/logs): `logs`

### Other components

- **Campus user**
- **Category admin**
- **SMTP service**

## Connections

- Campus user → Service categories: chooses service (evidence: `README.md`)
- Service categories → Complaint form: opens form (evidence: `README.md`)
- Campus user → Complaint form: submits complaint (evidence: `README.md`)
- Category admin → Admin pages: manages complaints (evidence: `README.md`)
- Complaint form → Browser interactions: uses interactions (evidence: `static/script.js`)
- Complaint tracking → Browser interactions: uses interactions (evidence: `static/script.js`)
- Admin pages → Browser interactions: uses interactions (evidence: `static/script.js`)
- Browser interactions → Flask routes: calls API (evidence: `static/script.js`)
- Flask routes → Complaint intake: routes submissions (evidence: `README.md`)
- Flask routes → Search and history: routes tracking (evidence: `README.md`)
- Flask routes → Admin authentication: routes login (evidence: `app.py`)
- Flask routes → Complaint management: routes management (evidence: `README.md`)
- Flask routes → IP restrictions: enforces restrictions (evidence: `README.md`)
- Flask routes → CSV export: routes export (evidence: `README.md`)
- Complaint intake → Data models: creates complaint (evidence: `app.py`)
- Search and history → Data models: queries history (evidence: `app.py`)
- Complaint management → Data models: updates records (evidence: `app.py`)
- IP restrictions → Data models: stores blocked IPs (evidence: `app.py`)
- CSV export → Data models: reads complaints (evidence: `README.md`)
- Complaint intake → Image uploads: stores images (evidence: `README.md`)
- Complaint intake → Email confirmation: sends confirmation (evidence: `README.md`)
- Admin authentication → Email confirmation: sends confirmation (evidence: `app.py`)
- Email confirmation → SMTP service: sends email (evidence: `README.md`)
- Email confirmation → Email fallback logs: logs fallback (evidence: `README.md`)
- Flask routes → Portal configuration: loads settings (evidence: `app.py`)
- Flask routes → Data models: imports models (evidence: `app.py`)
- Data models → SQLite database: persists records (evidence: `README.md`)
