# vivek248-cloud/coe architecture

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

- Interactive diagram: https://gitdiagram.com/vivek248-cloud/coe
- Repository: https://github.com/vivek248-cloud/coe

## Overview

Holy Cross College’s OBE examination system manages question banks and turns approved course material into structured examination papers. The principal workflow runs from faculty upload and duplicate resolution, through HOD/COE review and blueprint-based selection, to paper generation and export. The README documents capabilities beyond the sampled excerpts; those branches are represented at their supported paths, while unverified implementation links are omitted. The system uses a shared relational database and role-based access; unsampled subsystems are not described in implementation detail.

Main entry points: [`modules/teaching/upload.php`](https://github.com/vivek248-cloud/coe/blob/main/modules/teaching/upload.php) (Bank upload and editing), [`includes/auth.php`](https://github.com/vivek248-cloud/coe/blob/main/includes/auth.php) (Session and role guards), [`api/commit_upload.php`](https://github.com/vivek248-cloud/coe/blob/main/api/commit_upload.php) (Bank commit and duplicate resolution), [`modules/coe/shuffle.php`](https://github.com/vivek248-cloud/coe/blob/main/modules/coe/shuffle.php) (Paper set generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and administration"]
  node_login["Role-based login<br/>[login.php]"]
  node_admin["Institutional administration<br/>[index.php]"]
end

subgraph group_banks["Question bank workflow"]
  node_faculty_portal["Faculty workspace<br/>[dashboard.php]"]
  node_bank_upload["Bank upload and editing<br/>[upload.php]"]
  node_file_parse["Upload parsing<br/>[parse_upload.php]"]
  node_importer["Question import and extraction"]
  node_bank_commit["Bank commit and duplicate resolution<br/>[commit_upload.php]"]
  node_bank_review["Bank review workspace<br/>[review_bank.php]"]
  node_bank_verify["Bank verification<br/>[verify_bank.php]"]
  node_bank_listing["Bank browsing and export<br/>[view_banks.php]"]
end

subgraph group_design["Blueprint and generation"]
  node_blueprint["Blueprint matrix<br/>[blueprint.php]"]
  node_coe_dashboard["COE workspace<br/>[dashboard.php]"]
  node_shuffle["Paper set generation<br/>[shuffle.php]"]
  node_candidate_api["Question candidates<br/>[get_candidates.php]"]
  node_paper_view["Generated paper viewing<br/>[view_paper.php]"]
  node_shuffle_api["Shuffle generation API"]
  node_docx_export["DOCX paper export<br/>[export_docx.php]"]
  node_docx_renderer["Paper document renderer<br/>[docx_generator.py]"]
end

subgraph group_shared["Shared services"]
  node_auth["Session and role guards<br/>[auth.php]"]
  node_system_helpers["Exam and schema helpers<br/>[system.php]"]
  node_db_config["Database connection<br/>[db.php]"]
  node_database[("Institutional exam database")]
end

node_faculty(("Teaching staff"))
node_coe_user(("COE staff"))

node_faculty -->|"signs in"| node_login
node_coe_user -->|"signs in"| node_login
node_login -->|"checks roles"| node_auth
node_faculty -->|"uploads bank"| node_bank_upload
node_bank_upload -.->|"submits file"| node_file_parse
node_file_parse -->|"uses extraction"| node_importer
node_bank_upload -->|"commits choices"| node_bank_commit
node_bank_commit -->|"stores bank"| node_database
node_coe_user -->|"reviews banks"| node_bank_review
node_bank_review -->|"reads bank data"| node_database
node_bank_verify -->|"verifies bank"| node_database
node_faculty_portal -.->|"opens upload"| node_bank_upload
node_faculty_portal -.->|"browses banks"| node_bank_listing
node_coe_user -->|"defines matrix"| node_blueprint
node_blueprint -->|"stores blueprint"| node_database
node_coe_user -->|"generates sets"| node_shuffle
node_shuffle -.->|"requests candidates"| node_candidate_api
node_shuffle -.->|"starts generation"| node_shuffle_api
node_shuffle_api -->|"records papers and usage"| node_database
node_coe_dashboard -.->|"opens paper"| node_paper_view
node_paper_view -.->|"exports document"| node_docx_export
node_docx_export -.->|"renders DOCX"| node_docx_renderer
node_docx_renderer -.->|"reads paper data"| node_database
node_bank_upload -->|"checks access"| node_auth
node_bank_commit -->|"checks access"| node_auth
node_db_config -->|"connects to"| node_database
node_auth -->|"loads connection"| node_db_config
node_auth -->|"loads helpers"| node_system_helpers
node_bank_commit -->|"uses system helpers"| node_system_helpers

click node_login "https://github.com/vivek248-cloud/coe/blob/main/modules/auth/login.php"
click node_admin "https://github.com/vivek248-cloud/coe/blob/main/modules/admin/index.php"
click node_faculty_portal "https://github.com/vivek248-cloud/coe/blob/main/modules/teaching/dashboard.php"
click node_bank_upload "https://github.com/vivek248-cloud/coe/blob/main/modules/teaching/upload.php"
click node_file_parse "https://github.com/vivek248-cloud/coe/blob/main/api/parse_upload.php"
click node_importer "https://github.com/vivek248-cloud/coe/blob/main/includes/question_importer.php"
click node_bank_commit "https://github.com/vivek248-cloud/coe/blob/main/api/commit_upload.php"
click node_bank_review "https://github.com/vivek248-cloud/coe/blob/main/modules/coe/review_bank.php"
click node_bank_verify "https://github.com/vivek248-cloud/coe/blob/main/api/verify_bank.php"
click node_bank_listing "https://github.com/vivek248-cloud/coe/blob/main/modules/teaching/view_banks.php"
click node_blueprint "https://github.com/vivek248-cloud/coe/blob/main/modules/coe/blueprint.php"
click node_coe_dashboard "https://github.com/vivek248-cloud/coe/blob/main/modules/coe/dashboard.php"
click node_shuffle "https://github.com/vivek248-cloud/coe/blob/main/modules/coe/shuffle.php"
click node_candidate_api "https://github.com/vivek248-cloud/coe/blob/main/api/get_candidates.php"
click node_paper_view "https://github.com/vivek248-cloud/coe/blob/main/modules/coe/view_paper.php"
click node_shuffle_api "https://github.com/vivek248-cloud/coe/blob/main/api/shuffle_generate.php"
click node_docx_export "https://github.com/vivek248-cloud/coe/blob/main/api/export_docx.php"
click node_docx_renderer "https://github.com/vivek248-cloud/coe/blob/main/docx_generator.py"
click node_auth "https://github.com/vivek248-cloud/coe/blob/main/includes/auth.php"
click node_system_helpers "https://github.com/vivek248-cloud/coe/blob/main/includes/system.php"
click node_db_config "https://github.com/vivek248-cloud/coe/blob/main/config/db.php"

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_login,node_admin toneBlue
class node_faculty_portal,node_bank_upload,node_file_parse,node_importer,node_bank_commit,node_bank_review,node_bank_verify,node_bank_listing toneAmber
class node_blueprint,node_coe_dashboard,node_shuffle,node_candidate_api,node_paper_view,node_shuffle_api,node_docx_export,node_docx_renderer toneMint
class node_auth,node_system_helpers,node_db_config,node_database toneRose
class node_faculty,node_coe_user toneIndigo
```

## Components

### Access and administration

- [Role-based login](https://github.com/vivek248-cloud/coe/blob/main/modules/auth/login.php): `modules/auth/login.php`
- [Institutional administration](https://github.com/vivek248-cloud/coe/blob/main/modules/admin/index.php): `modules/admin/index.php`

### Question bank workflow

- [Faculty workspace](https://github.com/vivek248-cloud/coe/blob/main/modules/teaching/dashboard.php): `modules/teaching/dashboard.php`
- [Bank upload and editing](https://github.com/vivek248-cloud/coe/blob/main/modules/teaching/upload.php): `modules/teaching/upload.php`
- [Upload parsing](https://github.com/vivek248-cloud/coe/blob/main/api/parse_upload.php): `api/parse_upload.php`
- [Question import and extraction](https://github.com/vivek248-cloud/coe/blob/main/includes/question_importer.php): `includes/question_importer.php`
- [Bank commit and duplicate resolution](https://github.com/vivek248-cloud/coe/blob/main/api/commit_upload.php): `api/commit_upload.php`
- [Bank review workspace](https://github.com/vivek248-cloud/coe/blob/main/modules/coe/review_bank.php): `modules/coe/review_bank.php`
- [Bank verification](https://github.com/vivek248-cloud/coe/blob/main/api/verify_bank.php): `api/verify_bank.php`
- [Bank browsing and export](https://github.com/vivek248-cloud/coe/blob/main/modules/teaching/view_banks.php): `modules/teaching/view_banks.php`

### Blueprint and generation

- [Blueprint matrix](https://github.com/vivek248-cloud/coe/blob/main/modules/coe/blueprint.php): `modules/coe/blueprint.php`
- [COE workspace](https://github.com/vivek248-cloud/coe/blob/main/modules/coe/dashboard.php): `modules/coe/dashboard.php`
- [Paper set generation](https://github.com/vivek248-cloud/coe/blob/main/modules/coe/shuffle.php): `modules/coe/shuffle.php`
- [Question candidates](https://github.com/vivek248-cloud/coe/blob/main/api/get_candidates.php): `api/get_candidates.php`
- [Generated paper viewing](https://github.com/vivek248-cloud/coe/blob/main/modules/coe/view_paper.php): `modules/coe/view_paper.php`
- [Shuffle generation API](https://github.com/vivek248-cloud/coe/blob/main/api/shuffle_generate.php): `api/shuffle_generate.php`
- [DOCX paper export](https://github.com/vivek248-cloud/coe/blob/main/api/export_docx.php): `api/export_docx.php`
- [Paper document renderer](https://github.com/vivek248-cloud/coe/blob/main/docx_generator.py): `docx_generator.py`

### Shared services

- [Session and role guards](https://github.com/vivek248-cloud/coe/blob/main/includes/auth.php): `includes/auth.php`
- [Exam and schema helpers](https://github.com/vivek248-cloud/coe/blob/main/includes/system.php): `includes/system.php`
- [Database connection](https://github.com/vivek248-cloud/coe/blob/main/config/db.php): `config/db.php`
- **Institutional exam database**

### Other components

- **Teaching staff**
- **COE staff**

## Connections

- Teaching staff → Role-based login: signs in
- COE staff → Role-based login: signs in
- Role-based login → Session and role guards: checks roles (evidence: `modules/auth/login.php`)
- Teaching staff → Bank upload and editing: uploads bank
- Bank upload and editing → Upload parsing: submits file
- Upload parsing → Question import and extraction: uses extraction (evidence: `api/parse_upload.php`)
- Bank upload and editing → Bank commit and duplicate resolution: commits choices (evidence: `modules/teaching/upload.php`)
- Bank commit and duplicate resolution → Institutional exam database: stores bank (evidence: `api/commit_upload.php`)
- COE staff → Bank review workspace: reviews banks
- Bank review workspace → Institutional exam database: reads bank data (evidence: `modules/coe/review_bank.php`)
- Bank verification → Institutional exam database: verifies bank (evidence: `api/verify_bank.php`)
- Faculty workspace → Bank upload and editing: opens upload
- Faculty workspace → Bank browsing and export: browses banks
- COE staff → Blueprint matrix: defines matrix
- Blueprint matrix → Institutional exam database: stores blueprint (evidence: `modules/coe/blueprint.php`)
- COE staff → Paper set generation: generates sets
- Paper set generation → Question candidates: requests candidates
- Paper set generation → Shuffle generation API: starts generation
- Shuffle generation API → Institutional exam database: records papers and usage (evidence: `api/shuffle_generate.php`)
- COE workspace → Generated paper viewing: opens paper
- Generated paper viewing → DOCX paper export: exports document
- DOCX paper export → Paper document renderer: renders DOCX
- Paper document renderer → Institutional exam database: reads paper data
- Bank upload and editing → Session and role guards: checks access (evidence: `modules/teaching/upload.php`)
- Bank commit and duplicate resolution → Session and role guards: checks access (evidence: `api/commit_upload.php`)
- Database connection → Institutional exam database: connects to (evidence: `config/db.php`)
- Session and role guards → Database connection: loads connection (evidence: `includes/auth.php`)
- Session and role guards → Exam and schema helpers: loads helpers (evidence: `includes/auth.php`)
- Bank commit and duplicate resolution → Exam and schema helpers: uses system helpers (evidence: `api/commit_upload.php`)
