# itsalexi/qpi-calculator architecture

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

- Interactive diagram: https://gitdiagram.com/itsalexi/qpi-calculator
- Repository: https://github.com/itsalexi/qpi-calculator

## Overview

ADMU QPI Calculator is a browser-based curriculum and grade calculator. Students choose a program, enter grades or import copied AISIS grades, and view cumulative, yearly, and semester QPI results; the page also supports course edits and a desired-QPI calculation. The sampled page owns these interactions and calculations. The tree includes a programs API and curriculum data, but the supplied excerpts do not establish how they connect to the page or each other, so those relationships are omitted. UI primitives are grouped as an internal presentation layer.

Main entry points: [`app/layout.js`](https://github.com/itsalexi/qpi-calculator/blob/main/app/layout.js) (Root layout), [`app/page.js`](https://github.com/itsalexi/qpi-calculator/blob/main/app/page.js) (QPI calculator), [`components/ui`](https://github.com/itsalexi/qpi-calculator/tree/main/components/ui) (UI primitives), [`app/components/Header.js`](https://github.com/itsalexi/qpi-calculator/blob/main/app/components/Header.js) (Header)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Calculator experience"]
  node_calculator["QPI calculator<br/>[page.js]"]
  node_layout["Root layout<br/>[layout.js]"]
end

subgraph group_presentation["Presentation layer"]
  node_header["Header<br/>[Header.js]"]
  node_footer["Footer<br/>[Footer.js]"]
  node_ui_primitives["UI primitives"]
  node_class_utils["Class utilities<br/>[utils.js]"]
end

subgraph group_programs["Program data"]
  node_program_api["Programs API<br/>[route.js]"]
  node_program_catalog["Program catalog<br/>[programs.json]"]
end

node_student(("Student"))

node_student -->|"uses"| node_calculator
node_calculator -->|"renders"| node_ui_primitives
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_ui_primitives -->|"uses"| node_class_utils

click node_calculator "https://github.com/itsalexi/qpi-calculator/blob/main/app/page.js"
click node_program_api "https://github.com/itsalexi/qpi-calculator/blob/main/app/api/programs/route.js"
click node_program_catalog "https://github.com/itsalexi/qpi-calculator/blob/main/data/programs.json"
click node_header "https://github.com/itsalexi/qpi-calculator/blob/main/app/components/Header.js"
click node_footer "https://github.com/itsalexi/qpi-calculator/blob/main/app/components/Footer.js"
click node_ui_primitives "https://github.com/itsalexi/qpi-calculator/tree/main/components/ui"
click node_class_utils "https://github.com/itsalexi/qpi-calculator/blob/main/lib/utils.js"
click node_layout "https://github.com/itsalexi/qpi-calculator/blob/main/app/layout.js"

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_calculator,node_layout toneBlue
class node_header,node_footer,node_ui_primitives,node_class_utils toneAmber
class node_program_api,node_program_catalog toneMint
class node_student toneIndigo
```

## Components

### Calculator experience

- [QPI calculator](https://github.com/itsalexi/qpi-calculator/blob/main/app/page.js): `app/page.js`
- [Root layout](https://github.com/itsalexi/qpi-calculator/blob/main/app/layout.js): `app/layout.js`

### Presentation layer

- [Header](https://github.com/itsalexi/qpi-calculator/blob/main/app/components/Header.js): `app/components/Header.js`
- [Footer](https://github.com/itsalexi/qpi-calculator/blob/main/app/components/Footer.js): `app/components/Footer.js`
- [UI primitives](https://github.com/itsalexi/qpi-calculator/tree/main/components/ui): `components/ui`
- [Class utilities](https://github.com/itsalexi/qpi-calculator/blob/main/lib/utils.js): `lib/utils.js`

### Program data

- [Programs API](https://github.com/itsalexi/qpi-calculator/blob/main/app/api/programs/route.js): `app/api/programs/route.js`
- [Program catalog](https://github.com/itsalexi/qpi-calculator/blob/main/data/programs.json): `data/programs.json`

### Other components

- **Student**

## Connections

- Student → QPI calculator: uses (evidence: `README.md`)
- QPI calculator → UI primitives: renders (evidence: `app/page.js`)
- Root layout → Header: renders (evidence: `app/layout.js`)
- Root layout → Footer: renders (evidence: `app/layout.js`)
- UI primitives → Class utilities: uses (evidence: `components/ui/select.jsx`)
