# yashwantalli/examination-management-portal architecture

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

- Interactive diagram: https://gitdiagram.com/yashwantalli/examination-management-portal
- Repository: https://github.com/yashwantalli/examination-management-portal

## Overview

EMP is a role-based examination portal. Students find exams and book or cancel slots, examiners create slots and evaluate students against rubrics, and administrators configure exams and publish results. HTML routes and the session-authenticated JSON API share business rules in services.py; SQLAlchemy models hold the domain state. The README documents PDF scorecards, booking audit events, and optional email. Evidence is limited to the excerpts, source-index references, and README; unsampled route details are represented only at subsystem level.

Main entry points: [`app.py`](https://github.com/yashwantalli/examination-management-portal/blob/main/app.py) (App setup), [`services.py`](https://github.com/yashwantalli/examination-management-portal/blob/main/services.py) (Business rules), [`models.py`](https://github.com/yashwantalli/examination-management-portal/blob/main/models.py) (Exam domain models), [`routes/student.py`](https://github.com/yashwantalli/examination-management-portal/blob/main/routes/student.py) (Student workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application foundation"]
  node_app["App setup<br/>[app.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_extensions["Flask extensions<br/>[extensions.py]"]
  node_templates["Portal views"]
end

subgraph group_identity["Accounts and access"]
  node_auth["Authentication<br/>[auth.py]"]
end

subgraph group_exam["Examination workflows"]
  node_admin["Admin management<br/>[admin.py]"]
  node_examiner["Examiner workflow<br/>[examiner.py]"]
  node_student["Student workflow<br/>[student.py]"]
  node_api["Session JSON API<br/>[api.py]"]
  node_rules["Business rules<br/>[services.py]"]
  node_scorecard["PDF scorecards<br/>[scorecard.py]"]
end

subgraph group_data["Domain and persistence"]
  node_domain["Exam domain models<br/>[models.py]"]
  node_database[("Relational database")]
  node_mail["SMTP mail"]
end

node_users(("Portal users"))

node_app -->|"loads config"| node_config
node_app -->|"initializes"| node_extensions
node_app -->|"registers routes"| node_auth
node_app -->|"registers routes"| node_admin
node_app -->|"registers routes"| node_api
node_app -->|"initializes ORM"| node_domain
node_users -->|"sign in"| node_auth
node_auth -->|"reads and writes"| node_domain
node_users -->|"book examinations"| node_student
node_users -->|"evaluate students"| node_examiner
node_users -->|"manage examinations"| node_admin
node_users -->|"use JSON API"| node_api
node_student -->|"requests booking actions"| node_rules
node_examiner -->|"saves evaluations"| node_rules
node_admin -->|"uses shared rules"| node_rules
node_api -->|"uses shared rules"| node_rules
node_rules -->|"reads and writes"| node_domain
node_student -->|"downloads PDF"| node_scorecard
node_scorecard -->|"reads result data"| node_domain
node_domain -->|"persists records"| node_database
node_student -->|"renders pages"| node_templates
node_examiner -->|"renders pages"| node_templates
node_admin -->|"renders pages"| node_templates
node_rules -.->|"sends notifications"| node_mail

click node_app "https://github.com/yashwantalli/examination-management-portal/blob/main/app.py"
click node_config "https://github.com/yashwantalli/examination-management-portal/blob/main/config.py"
click node_extensions "https://github.com/yashwantalli/examination-management-portal/blob/main/extensions.py"
click node_auth "https://github.com/yashwantalli/examination-management-portal/blob/main/routes/auth.py"
click node_admin "https://github.com/yashwantalli/examination-management-portal/blob/main/routes/admin.py"
click node_examiner "https://github.com/yashwantalli/examination-management-portal/blob/main/routes/examiner.py"
click node_student "https://github.com/yashwantalli/examination-management-portal/blob/main/routes/student.py"
click node_api "https://github.com/yashwantalli/examination-management-portal/blob/main/routes/api.py"
click node_rules "https://github.com/yashwantalli/examination-management-portal/blob/main/services.py"
click node_scorecard "https://github.com/yashwantalli/examination-management-portal/blob/main/scorecard.py"
click node_domain "https://github.com/yashwantalli/examination-management-portal/blob/main/models.py"
click node_templates "https://github.com/yashwantalli/examination-management-portal/tree/main/templates"

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_app,node_config,node_extensions,node_templates,node_users toneBlue
class node_auth toneAmber
class node_admin,node_examiner,node_student,node_api,node_rules,node_scorecard toneMint
class node_domain,node_database,node_mail toneRose
```

## Components

### Application foundation

- [App setup](https://github.com/yashwantalli/examination-management-portal/blob/main/app.py): `app.py`
- [Configuration](https://github.com/yashwantalli/examination-management-portal/blob/main/config.py): `config.py`
- [Flask extensions](https://github.com/yashwantalli/examination-management-portal/blob/main/extensions.py): `extensions.py`
- [Portal views](https://github.com/yashwantalli/examination-management-portal/tree/main/templates): `templates`

### Accounts and access

- [Authentication](https://github.com/yashwantalli/examination-management-portal/blob/main/routes/auth.py): `routes/auth.py`

### Examination workflows

- [Admin management](https://github.com/yashwantalli/examination-management-portal/blob/main/routes/admin.py): `routes/admin.py`
- [Examiner workflow](https://github.com/yashwantalli/examination-management-portal/blob/main/routes/examiner.py): `routes/examiner.py`
- [Student workflow](https://github.com/yashwantalli/examination-management-portal/blob/main/routes/student.py): `routes/student.py`
- [Session JSON API](https://github.com/yashwantalli/examination-management-portal/blob/main/routes/api.py): `routes/api.py`
- [Business rules](https://github.com/yashwantalli/examination-management-portal/blob/main/services.py): `services.py`
- [PDF scorecards](https://github.com/yashwantalli/examination-management-portal/blob/main/scorecard.py): `scorecard.py`

### Domain and persistence

- [Exam domain models](https://github.com/yashwantalli/examination-management-portal/blob/main/models.py): `models.py`
- **Relational database**
- **SMTP mail**

### Other components

- **Portal users**

## Connections

- App setup → Configuration: loads config (evidence: `app.py`)
- App setup → Flask extensions: initializes (evidence: `app.py`)
- App setup → Authentication: registers routes (evidence: `app.py`)
- App setup → Admin management: registers routes (evidence: `app.py`)
- App setup → Session JSON API: registers routes (evidence: `app.py`)
- App setup → Exam domain models: initializes ORM (evidence: `app.py`)
- Portal users → Authentication: sign in (evidence: `README.md`)
- Authentication → Exam domain models: reads and writes (evidence: `routes/auth.py`)
- Portal users → Student workflow: book examinations (evidence: `README.md`)
- Portal users → Examiner workflow: evaluate students (evidence: `README.md`)
- Portal users → Admin management: manage examinations (evidence: `README.md`)
- Portal users → Session JSON API: use JSON API (evidence: `README.md`)
- Student workflow → Business rules: requests booking actions (evidence: `routes/student.py`)
- Examiner workflow → Business rules: saves evaluations (evidence: `routes/examiner.py`)
- Admin management → Business rules: uses shared rules (evidence: `README.md`)
- Session JSON API → Business rules: uses shared rules (evidence: `README.md`)
- Business rules → Exam domain models: reads and writes (evidence: `services.py`)
- Student workflow → PDF scorecards: downloads PDF (evidence: `routes/student.py`)
- PDF scorecards → Exam domain models: reads result data (evidence: `scorecard.py`)
- Exam domain models → Relational database: persists records (evidence: `README.md`)
- Student workflow → Portal views: renders pages (evidence: `README.md`)
- Examiner workflow → Portal views: renders pages (evidence: `README.md`)
- Admin management → Portal views: renders pages (evidence: `README.md`)
- Business rules → SMTP mail: sends notifications (evidence: `services.py`)
