# chetangawali/collegecomplaint architecture

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

- Interactive diagram: https://gitdiagram.com/chetangawali/collegecomplaint
- Repository: https://github.com/chetangawali/collegecomplaint

## Overview

This is a Flask college complaint portal. Users register or log in, submit categorized complaints, and review their complaint history; administrators log in, review complaints, and update their status and reply. The routes and SQL operations are in app.py, with database connection setup in database.py and page rendering through templates. The tree and sampled source support these workflows; no README documentation or template contents were provided, so template styling and any additional behavior are not inferred.

Main entry points: [`database.py`](https://github.com/chetangawali/collegecomplaint/blob/main/database.py) (Connection setup), [`app.py`](https://github.com/chetangawali/collegecomplaint/blob/main/app.py) (Complaint review), [`templates/index.html`](https://github.com/chetangawali/collegecomplaint/blob/main/templates/index.html) (Home page), [`templates/register.html`](https://github.com/chetangawali/collegecomplaint/blob/main/templates/register.html) (Register page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public access"]
  node_home["Home page<br/>[index.html]"]
end

subgraph group_user["User workflow"]
  node_register["Registration<br/>[app.py]"]
  node_register_page["Register page<br/>[register.html]"]
  node_user_login["User login<br/>[app.py]"]
  node_login_page["Login page<br/>[login.html]"]
  node_submit["Complaint submission<br/>[app.py]"]
  node_submit_page["Submission form"]
  node_user_dashboard["User dashboard<br/>[app.py]"]
  node_dashboard_page["Complaint history<br/>[dashboard.html]"]
end

subgraph group_admin["Admin workflow"]
  node_admin_login["Admin login<br/>[app.py]"]
  node_admin_login_page["Admin login page<br/>[admin_login.html]"]
  node_admin_dashboard["Complaint review<br/>[app.py]"]
  node_admin_page["Admin dashboard"]
end

subgraph group_runtime["Runtime and data"]
  node_db_access["Connection setup<br/>[database.py]"]
  node_mysql[("MySQL database")]
end

node_visitor(("Visitor"))
node_user_actor(("User"))
node_admin_actor(("Administrator"))

node_visitor -->|"requests page"| node_home
node_home -->|"renders"| node_visitor
node_user_actor -->|"submits details"| node_register
node_register -->|"renders"| node_register_page
node_register -->|"opens connection"| node_db_access
node_register -->|"inserts user"| node_mysql
node_user_actor -->|"submits credentials"| node_user_login
node_user_login -->|"renders"| node_login_page
node_user_login -->|"opens connection"| node_db_access
node_user_login -->|"checks credentials"| node_mysql
node_user_actor -->|"submits complaint"| node_submit
node_submit -->|"renders"| node_submit_page
node_submit -->|"opens connection"| node_db_access
node_submit -->|"reads categories"| node_mysql
node_submit -->|"inserts complaint"| node_mysql
node_user_actor -->|"requests history"| node_user_dashboard
node_user_dashboard -->|"opens connection"| node_db_access
node_user_dashboard -->|"reads user complaints"| node_mysql
node_user_dashboard -->|"renders history"| node_dashboard_page
node_admin_actor -->|"submits credentials"| node_admin_login
node_admin_login -->|"renders"| node_admin_login_page
node_admin_login -->|"opens connection"| node_db_access
node_admin_login -->|"checks credentials"| node_mysql
node_admin_actor -->|"requests review"| node_admin_dashboard
node_admin_dashboard -->|"opens connection"| node_db_access
node_admin_dashboard -->|"reads complaints"| node_mysql
node_admin_dashboard -->|"renders review"| node_admin_page
node_admin_actor -->|"submits update"| node_admin_dashboard
node_admin_dashboard -->|"updates complaint"| node_mysql
node_db_access -->|"connects"| node_mysql

click node_home "https://github.com/chetangawali/collegecomplaint/blob/main/templates/index.html"
click node_register "https://github.com/chetangawali/collegecomplaint/blob/main/app.py"
click node_register_page "https://github.com/chetangawali/collegecomplaint/blob/main/templates/register.html"
click node_user_login "https://github.com/chetangawali/collegecomplaint/blob/main/app.py"
click node_login_page "https://github.com/chetangawali/collegecomplaint/blob/main/templates/login.html"
click node_submit "https://github.com/chetangawali/collegecomplaint/blob/main/app.py"
click node_submit_page "https://github.com/chetangawali/collegecomplaint/blob/main/templates/submit_complaint.html"
click node_user_dashboard "https://github.com/chetangawali/collegecomplaint/blob/main/app.py"
click node_dashboard_page "https://github.com/chetangawali/collegecomplaint/blob/main/templates/dashboard.html"
click node_admin_login "https://github.com/chetangawali/collegecomplaint/blob/main/app.py"
click node_admin_login_page "https://github.com/chetangawali/collegecomplaint/blob/main/templates/admin_login.html"
click node_admin_dashboard "https://github.com/chetangawali/collegecomplaint/blob/main/app.py"
click node_admin_page "https://github.com/chetangawali/collegecomplaint/blob/main/templates/admin_dashboard.html"
click node_db_access "https://github.com/chetangawali/collegecomplaint/blob/main/database.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_home,node_user_actor toneBlue
class node_register,node_register_page,node_user_login,node_login_page,node_submit,node_submit_page,node_user_dashboard,node_dashboard_page toneAmber
class node_admin_login,node_admin_login_page,node_admin_dashboard,node_admin_page toneMint
class node_db_access,node_mysql toneRose
class node_visitor,node_admin_actor toneIndigo
```

## Components

### Public access

- [Home page](https://github.com/chetangawali/collegecomplaint/blob/main/templates/index.html): `templates/index.html`

### User workflow

- [Registration](https://github.com/chetangawali/collegecomplaint/blob/main/app.py): `app.py`
- [Register page](https://github.com/chetangawali/collegecomplaint/blob/main/templates/register.html): `templates/register.html`
- [User login](https://github.com/chetangawali/collegecomplaint/blob/main/app.py): `app.py`
- [Login page](https://github.com/chetangawali/collegecomplaint/blob/main/templates/login.html): `templates/login.html`
- [Complaint submission](https://github.com/chetangawali/collegecomplaint/blob/main/app.py): `app.py`
- [Submission form](https://github.com/chetangawali/collegecomplaint/blob/main/templates/submit_complaint.html): `templates/submit_complaint.html`
- [User dashboard](https://github.com/chetangawali/collegecomplaint/blob/main/app.py): `app.py`
- [Complaint history](https://github.com/chetangawali/collegecomplaint/blob/main/templates/dashboard.html): `templates/dashboard.html`

### Admin workflow

- [Admin login](https://github.com/chetangawali/collegecomplaint/blob/main/app.py): `app.py`
- [Admin login page](https://github.com/chetangawali/collegecomplaint/blob/main/templates/admin_login.html): `templates/admin_login.html`
- [Complaint review](https://github.com/chetangawali/collegecomplaint/blob/main/app.py): `app.py`
- [Admin dashboard](https://github.com/chetangawali/collegecomplaint/blob/main/templates/admin_dashboard.html): `templates/admin_dashboard.html`

### Runtime and data

- [Connection setup](https://github.com/chetangawali/collegecomplaint/blob/main/database.py): `database.py`
- **MySQL database**

### Other components

- **Visitor**
- **User**
- **Administrator**

## Connections

- Visitor → Home page: requests page
- Home page → Visitor: renders
- User → Registration: submits details
- Registration → Register page: renders
- Registration → Connection setup: opens connection
- Registration → MySQL database: inserts user
- User → User login: submits credentials
- User login → Login page: renders
- User login → Connection setup: opens connection
- User login → MySQL database: checks credentials
- User → Complaint submission: submits complaint
- Complaint submission → Submission form: renders
- Complaint submission → Connection setup: opens connection
- Complaint submission → MySQL database: reads categories
- Complaint submission → MySQL database: inserts complaint
- User → User dashboard: requests history
- User dashboard → Connection setup: opens connection
- User dashboard → MySQL database: reads user complaints
- User dashboard → Complaint history: renders history
- Administrator → Admin login: submits credentials
- Admin login → Admin login page: renders
- Admin login → Connection setup: opens connection
- Admin login → MySQL database: checks credentials
- Administrator → Complaint review: requests review
- Complaint review → Connection setup: opens connection
- Complaint review → MySQL database: reads complaints
- Complaint review → Admin dashboard: renders review
- Administrator → Complaint review: submits update
- Complaint review → MySQL database: updates complaint
- Connection setup → MySQL database: connects
