# dhivkrish7/fe-gpa-dashboard architecture

> Architecture diagram of the GitHub repository dhivkrish7/fe-gpa-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-03-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dhivkrish7/fe-gpa-dashboard
- Repository: https://github.com/dhivkrish7/fe-gpa-dashboard

## Overview

##### What this project is (based on the provided repo)
From the file tree, this is almost certainly a **single-file Python application**:

- `app.py` — the entire application entrypoint (likely a small web/dashboard app).
- `requirements.txt` — runtime dependencies (this will reveal whether it’s Flask/Dash/Streamlit/FastAPI, etc.).
- `README.md` — only a name (`fe-gpa-dashboard`), no architecture notes.

##### Key implication for diagramming
- a **monolithic “single process” app**
- minimal internal layering unless `app.py` implements it

So the first step to “best and most accurate” is: **derive the architecture from the imports and runtime entrypoint**.

##### Framework and runtime model
Open `requirements.txt` and `app.py` and classify the app:

Common patterns you might see:

- **Streamlit**
- `requirements.txt` includes `streamlit`
- `app.py` uses `import streamlit as st`
- Runs as: `streamlit run app.py`
- Architecture: Streamlit server ↔ browser; Python script reruns on interaction

- **Plotly Dash**
- `dash`, `plotly`
- `from dash import Dash, html, dcc`
- Runs a Flask server under the hood
- Architecture: browser ↔ Dash/Flask backend; callbacks for interactivity

- **Flask**
- `flask` + `from flask import Flask`
- Routes like `@app.route(...)`
- Architecture: browser ↔ Flask app; optional DB/external APIs

- **FastAPI**
- `fastapi`, `uvicorn`
- `from fastapi import FastAPI`
- Architecture: browser/client ↔ FastAPI; maybe JSON API consumed by a UI elsewhere (but no frontend folder exists)

##### Data sources and external dependencies
In `app.py`, look for:
- file reads: `open(...)`, `pandas.read_csv(...)`, reading Excel, etc.
- database drivers: `sqlalchemy`, `psycopg2`, `sqlite3`, etc.
- external HTTP calls: `requests.get/post`, `httpx`, Google Sheets API, etc.
- auth: OAuth libs, SSO, etc.

##### Major modules inside `app.py`
- UI/layout layer (page layout, components)
- business logic (GPA calculation, rules)
- data access layer (load/transform data)
- integrations (external API calls)

Your goal (per your instruction) is to **separate into as many components as possible** without inventing things that aren’t there.

##### User interaction loop
- Browser sends request / triggers callback
- App executes Python code (route handler / callback / Streamlit rerun)
- App returns HTML/JS payload or UI update

##### Dependency direction
- UI depends on computation/data
- computation depends on raw/clean data
- data layer depends on external stores/services

##### Architectural patterns likely in this repo (and how to represent them)
Because there’s no multi-module layout, the repo is likely:
- **Monolithic single-process application**
- Possibly **MVC-ish** (routes/controllers + data + rendering) but in one file
- Or **reactive callback model** (Streamlit/Dash)

This by:
- One main “App Process” container
- Multiple internal logical components inside it (even if physically co-located)

##### Python Dashboard App (app.py)
- UI Layer
- Interaction Handlers (routes/callbacks)
- GPA Calculation / Business Rules
- Data Loading + Transform
##### Data Source
- (placeholder: “CSV/DB/External API — confirm in app.py”)

- User → Browser
- Browser ⇄ Dashboard App (HTTP)
- Dashboard App → Data Source (SQL/FS/HTTPS)

Then replace placeholders with exact technologies once confirmed.

##### `app.py` — where does data come from (files/DB/API)? are there authentication/roles?
3) How is it run in practice (local only? gunicorn? streamlit run?) — may be implied by code comments

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% ===========
    %% External Actors / Clients
    %% ===========
    U["End User"]:::actor
    B["Web Browser"]:::client

    %% ===========
    %% System Boundary
    %% ===========
    subgraph "fe-gpa-dashboard (Monolithic Single-Process Python App)"
        APP["Python Web/Dashboard App Process\n(app.py)"]:::app

        subgraph "Logical Components (within app.py)"
            UI["UI / Views\n(layout,charts,tables)"]:::component
            H["Interaction Handlers\n(routes/callbacks/reruns)"]:::component
            BL["GPA Computation\n(business rules)"]:::component
            DL["Data Loading\n(file/DB/API adapters)"]:::component
            TF["Data Transformation\n(cleaning,aggregation)"]:::component
            CFG["Config\n(constants,env vars)"]:::component
        end

        REQ["Dependencies Declaration\n(requirements.txt)"]:::meta
    end

    DOC["Project Documentation\n(README.md)"]:::doc

    %% ===========
    %% External Dependencies (placeholders to be confirmed in app.py / requirements.txt)
    %% ===========
    DS[("Data Source(s)\nCSV/Excel,DB,or External API\n(confirm in app.py)")]:::datastore
    EXT["External Service(s)\nREST APIs/Auth/Sheets/etc.\n(confirm in app.py)"]:::external

    %% ===========
    %% Relationships / Flows (vertical)
    %% ===========
    U -->|"uses"| B
    B <-->|"HTTP(S)"| APP

    APP -->|"renders"| UI
    UI -->|"user_interaction"| H
    H -->|"loads_data"| DL
    DL -->|"reads/writes"| DS
    DL -->|"HTTPS(REST)"| EXT
    DL -->|"raw_data"| TF
    TF -->|"clean_data"| BL
    BL -->|"computed_metrics"| UI
    CFG -->|"configuration"| UI
    CFG -->|"configuration"| H
    CFG -->|"configuration"| DL

    REQ -->|"declares"| APP
    DOC -->|"describes"| APP

    %% ===========
    %% Click Events (from component mapping)
    %% ===========
    click APP "https://github.com/dhivkrish7/fe-gpa-dashboard/blob/main/app.py"
    click REQ "https://github.com/dhivkrish7/fe-gpa-dashboard/blob/main/requirements.txt"
    click DOC "https://github.com/dhivkrish7/fe-gpa-dashboard/blob/main/README.md"

    %% ===========
    %% Styles (color is required)
    %% ===========
    classDef actor fill:#FFE08A,stroke:#8A6D1D,stroke-width:1px,color:#1f1f1f;
    classDef client fill:#D6ECFF,stroke:#2B6CB0,stroke-width:1px,color:#0b1f33;
    classDef app fill:#C6F6D5,stroke:#2F855A,stroke-width:1.5px,color:#0b2a1a;
    classDef component fill:#E9F5FF,stroke:#2C5282,stroke-width:1px,color:#0b1f33;
    classDef datastore fill:#FFF5D6,stroke:#B7791F,stroke-width:1.5px,color:#2a1a00;
    classDef external fill:#FDE2E2,stroke:#C53030,stroke-width:1.2px,color:#2a0b0b,stroke-dasharray: 5 4;
    classDef meta fill:#E6FFFA,stroke:#2C7A7B,stroke-width:1px,color:#08302f;
    classDef doc fill:#F3E8FF,stroke:#6B46C1,stroke-width:1px,color:#1b1033;
```
