# junijaved01/research-opportunity-portal architecture

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

- Interactive diagram: https://gitdiagram.com/junijaved01/research-opportunity-portal
- Repository: https://github.com/junijaved01/research-opportunity-portal

## Overview

This is a Flask-based university research opportunity portal. Faculty use the browser page to browse opportunities, inspect details, create and edit records, close openings, or delete them; the JavaScript client sends these actions to Flask REST endpoints, which validate data and persist records in MySQL. The README documents all CRUD operations and frontend capabilities. The excerpts show the page/API and persistence responsibilities, but omit some route and template details, so those connections are represented only where documented or directly evidenced.

Main entry points: [`app.py`](https://github.com/junijaved01/research-opportunity-portal/blob/main/app.py) (Flask application), [`templates/index.html`](https://github.com/junijaved01/research-opportunity-portal/blob/main/templates/index.html) (Portal page), [`static/script.js`](https://github.com/junijaved01/research-opportunity-portal/blob/main/static/script.js) (Opportunity interactions), [`schema.sql`](https://github.com/junijaved01/research-opportunity-portal/blob/main/schema.sql) (Database schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Web interface"]
  node_page["Portal page<br/>[index.html]"]
  node_client["Opportunity interactions<br/>[script.js]"]
  node_styles["Page styling<br/>[style.css]"]
end

subgraph group_service["API and domain"]
  node_flask["Flask application<br/>[app.py]"]
  node_validation["Input validation<br/>[app.py]"]
  node_opportunity["Opportunity model<br/>[app.py]"]
end

subgraph group_persistence["Data persistence"]
  node_mysql[("MySQL database")]
  node_schema["Database schema<br/>[schema.sql]"]
end

node_faculty(("Faculty user"))

node_faculty -->|"uses"| node_page
node_flask -->|"renders"| node_page
node_page -.->|"loads"| node_client
node_client -->|"sends API requests"| node_flask
node_flask -->|"validates requests"| node_validation
node_flask -->|"queries and updates"| node_opportunity
node_opportunity -->|"persists records"| node_mysql
node_schema -->|"defines tables"| node_mysql
node_page -.->|"styled by"| node_styles

click node_page "https://github.com/junijaved01/research-opportunity-portal/blob/main/templates/index.html"
click node_client "https://github.com/junijaved01/research-opportunity-portal/blob/main/static/script.js"
click node_styles "https://github.com/junijaved01/research-opportunity-portal/blob/main/static/style.css"
click node_flask "https://github.com/junijaved01/research-opportunity-portal/blob/main/app.py"
click node_validation "https://github.com/junijaved01/research-opportunity-portal/blob/main/app.py"
click node_opportunity "https://github.com/junijaved01/research-opportunity-portal/blob/main/app.py"
click node_schema "https://github.com/junijaved01/research-opportunity-portal/blob/main/schema.sql"

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_page,node_client,node_styles,node_faculty toneBlue
class node_flask,node_validation,node_opportunity toneAmber
class node_mysql,node_schema toneMint
```

## Components

### Web interface

- [Portal page](https://github.com/junijaved01/research-opportunity-portal/blob/main/templates/index.html): `templates/index.html`
- [Opportunity interactions](https://github.com/junijaved01/research-opportunity-portal/blob/main/static/script.js): `static/script.js`
- [Page styling](https://github.com/junijaved01/research-opportunity-portal/blob/main/static/style.css): `static/style.css`

### API and domain

- [Flask application](https://github.com/junijaved01/research-opportunity-portal/blob/main/app.py): `app.py`
- [Input validation](https://github.com/junijaved01/research-opportunity-portal/blob/main/app.py): `app.py`
- [Opportunity model](https://github.com/junijaved01/research-opportunity-portal/blob/main/app.py): `app.py`

### Data persistence

- **MySQL database**
- [Database schema](https://github.com/junijaved01/research-opportunity-portal/blob/main/schema.sql): `schema.sql`

### Other components

- **Faculty user**

## Connections

- Faculty user → Portal page: uses (evidence: `README.md`)
- Flask application → Portal page: renders (evidence: `app.py`)
- Portal page → Opportunity interactions: loads
- Opportunity interactions → Flask application: sends API requests (evidence: `static/script.js`)
- Flask application → Input validation: validates requests (evidence: `app.py`)
- Flask application → Opportunity model: queries and updates (evidence: `app.py`)
- Opportunity model → MySQL database: persists records (evidence: `app.py`)
- Database schema → MySQL database: defines tables (evidence: `README.md`)
- Portal page → Page styling: styled by
