# sidhantsingla0-gif/marksheet architecture

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

- Interactive diagram: https://gitdiagram.com/sidhantsingla0-gif/marksheet
- Repository: https://github.com/sidhantsingla0-gif/marksheet

## Overview

This is a small browser-based academic result generator. Users enter student details and subject credits/grades, generate a result with SGPA and optional CGPA, then print or download it as a PDF; the result also includes a QR code. The sampled JavaScript implements these workflows directly in the page. The tree contains an HTML and CSS file, but their contents were not provided, so their wiring and presentation details are not inferred. A theme toggle is mentioned in a source comment but has no implementation in the sampled code.

Main entry points: [`script.js`](https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js) (Grade calculation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Result entry"]
  node_page["Result page<br/>[index.html]"]
  node_entry_ui["Subject entry<br/>[script.js]"]
end

subgraph group_results["Result generation"]
  node_calculation["Grade calculation<br/>[script.js]"]
  node_cgpa["CGPA calculation<br/>[script.js]"]
  node_result["Result card<br/>[script.js]"]
end

subgraph group_output["Result output"]
  node_qr["QR generation<br/>[script.js]"]
  node_qrious["QRious library"]
  node_print["Print action<br/>[script.js]"]
  node_pdf["PDF export<br/>[script.js]"]
  node_browser_print["Browser printing"]
  node_pdf_libs["PDF libraries"]
end

node_user(("User"))

node_user -->|"enters grades"| node_entry_ui
node_user -->|"generates result"| node_calculation
node_calculation -->|"computes CGPA"| node_cgpa
node_calculation -->|"updates card"| node_result
node_calculation -->|"builds QR data"| node_qr
node_qr -->|"creates code"| node_qrious
node_user -->|"prints result"| node_print
node_print -->|"invokes print"| node_browser_print
node_user -->|"downloads PDF"| node_pdf
node_pdf -->|"captures and exports"| node_pdf_libs

click node_page "https://github.com/sidhantsingla0-gif/marksheet/blob/main/index.html"
click node_entry_ui "https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js"
click node_calculation "https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js"
click node_cgpa "https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js"
click node_result "https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js"
click node_qr "https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js"
click node_print "https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js"
click node_pdf "https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.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_page,node_entry_ui,node_user toneBlue
class node_calculation,node_cgpa,node_result toneAmber
class node_qr,node_qrious,node_print,node_pdf,node_browser_print,node_pdf_libs toneMint
```

## Components

### Result entry

- [Result page](https://github.com/sidhantsingla0-gif/marksheet/blob/main/index.html): `index.html`
- [Subject entry](https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js): `script.js`

### Result generation

- [Grade calculation](https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js): `script.js`
- [CGPA calculation](https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js): `script.js`
- [Result card](https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js): `script.js`

### Result output

- [QR generation](https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js): `script.js`
- **QRious library**
- [Print action](https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js): `script.js`
- [PDF export](https://github.com/sidhantsingla0-gif/marksheet/blob/main/script.js): `script.js`
- **Browser printing**
- **PDF libraries**

### Other components

- **User**

## Connections

- User → Subject entry: enters grades (evidence: `script.js`)
- User → Grade calculation: generates result (evidence: `script.js`)
- Grade calculation → CGPA calculation: computes CGPA (evidence: `script.js`)
- Grade calculation → Result card: updates card (evidence: `script.js`)
- Grade calculation → QR generation: builds QR data (evidence: `script.js`)
- QR generation → QRious library: creates code (evidence: `script.js`)
- User → Print action: prints result (evidence: `script.js`)
- Print action → Browser printing: invokes print (evidence: `script.js`)
- User → PDF export: downloads PDF (evidence: `script.js`)
- PDF export → PDF libraries: captures and exports (evidence: `script.js`)
