# siddhesh-agarwal/cgpa-calculator architecture

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

- Interactive diagram: https://gitdiagram.com/siddhesh-agarwal/cgpa-calculator
- Repository: https://github.com/siddhesh-agarwal/cgpa-calculator

## Overview

This is a small Streamlit CGPA calculator. The user enters current-semester grades and credits, optionally adds prior CGPA and credits, then clicks Calculate; the app maps grades to points, computes semester and cumulative GPAs, and displays both. The grade reference table is a separate informational capability. All runtime behavior is in main.py, so the nodes are conceptual responsibilities within that file.

Main entry points: [`main.py`](https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py) (Streamlit App)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Student"))
node_app["Streamlit App<br/>[main.py]"]
node_inputs["Grade And Credit Inputs<br/>[main.py]"]
node_grade_table["Grade Table<br/>[main.py]"]
node_mapping["Grade Point Mapping<br/>[main.py]"]
node_calculator["CGPA Calculator<br/>[main.py]"]
node_results["GPA Results<br/>[main.py]"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_inputs
node_app -->|"renders"| node_grade_table
node_inputs -->|"provides grades"| node_mapping
node_app -->|"invokes on Calculate"| node_calculator
node_inputs -->|"provides credits"| node_calculator
node_mapping -->|"provides points"| node_calculator
node_calculator -->|"returns GPA values"| node_results
node_app -->|"displays"| node_results

click node_app "https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py"
click node_inputs "https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py"
click node_grade_table "https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py"
click node_mapping "https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py"
click node_calculator "https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py"
click node_results "https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.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_user toneIndigo
class node_app,node_inputs,node_grade_table,node_mapping,node_calculator,node_results toneTeal
```

## Components

### Other components

- **Student**
- [Streamlit App](https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py): `main.py`
- [Grade And Credit Inputs](https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py): `main.py`
- [Grade Table](https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py): `main.py`
- [Grade Point Mapping](https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py): `main.py`
- [CGPA Calculator](https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py): `main.py`
- [GPA Results](https://github.com/siddhesh-agarwal/cgpa-calculator/blob/master/main.py): `main.py`

## Connections

- Student → Streamlit App: uses (evidence: `main.py`)
- Streamlit App → Grade And Credit Inputs: renders (evidence: `main.py`)
- Streamlit App → Grade Table: renders (evidence: `main.py`)
- Grade And Credit Inputs → Grade Point Mapping: provides grades (evidence: `main.py`)
- Streamlit App → CGPA Calculator: invokes on Calculate (evidence: `main.py`)
- Grade And Credit Inputs → CGPA Calculator: provides credits (evidence: `main.py`)
- Grade Point Mapping → CGPA Calculator: provides points (evidence: `main.py`)
- CGPA Calculator → GPA Results: returns GPA values (evidence: `main.py`)
- Streamlit App → GPA Results: displays (evidence: `main.py`)
