# adhikari-arpan/bece_notes architecture

> Architecture diagram of the GitHub repository adhikari-arpan/bece_notes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adhikari-arpan/bece_notes
- Repository: https://github.com/adhikari-arpan/bece_notes

## Overview

BECE Vault is a study-notes website for Pokhara University’s BECE program. Its main user workflow is to browse semesters or electives, select a subject and file, then view a PDF in-browser or download it. The website also offers a CGPA calculator and supporting pages, plus visit statistics, consent-aware preferences, and note-library indexing. The README documents the user flow; sampled source confirms app routing, note discovery, prerendering, and tracking. Several component-level integrations are unsampled, so their links are omitted where not established.

Main entry points: [`Website/src/App.tsx`](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/App.tsx) (App router), [`Website/src/components/CgpaView.tsx`](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/CgpaView.tsx) (CGPA calculator), [`Website/plugins/notes.ts`](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/plugins/notes.ts) (Notes indexing), [`Website/src/components/CookieBanner.tsx`](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/CookieBanner.tsx) (Cookie consent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_study["Study library"]
  node_catalog["Notes catalog<br/>[notes.ts]"]
  node_manifest["Notes indexing<br/>[notes.ts]"]
  node_home["Browse semesters<br/>[HomeView.tsx]"]
  node_semester["Semester view<br/>[SemesterView.tsx]"]
  node_subject["Subject files<br/>[SubjectView.tsx]"]
  node_pdf["PDF viewer<br/>[PdfViewer.tsx]"]
  node_pdfassets["PDF.js assets<br/>[pdfjsAssets.ts]"]
  node_download["File download<br/>[DownloadButton.tsx]"]
end

subgraph group_calculator["CGPA calculator"]
  node_cgpa["CGPA calculator<br/>[CgpaView.tsx]"]
  node_cgpalogic["Grade calculations<br/>[cgpa.ts]"]
  node_grades["Grade scale<br/>[grades.ts]"]
  node_cgpareport["CGPA report<br/>[cgpaReport.ts]"]
  node_upload["Report upload"]
end

subgraph group_site["Site experience"]
  node_app["App router<br/>[App.tsx]"]
  node_consent["Cookie consent<br/>[CookieBanner.tsx]"]
  node_preferences["Theme preferences<br/>[theme.ts]"]
  node_device["Consent storage<br/>[consent.ts]"]
  node_prerender["Search pages<br/>[prerender.ts]"]
  node_about["About and policy pages<br/>[AboutView.tsx]"]
  node_contributors["Contributor page"]
  node_contributing["Contributing page"]
  node_tipjar["Support the site<br/>[TipJar.tsx]"]
end

subgraph group_services["Site services"]
  node_visits["Visit tracking<br/>[visits.ts]"]
  node_firebase["Firebase setup<br/>[firebase.ts]"]
  node_database[("Firebase database")]
end

node_visitor(("Student"))

node_visitor -->|"opens site"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_semester
node_app -->|"routes to"| node_subject
node_app -->|"routes to"| node_cgpa
node_visitor -->|"picks semester"| node_home
node_visitor -->|"selects subject"| node_subject
node_visitor -->|"opens file"| node_pdf
node_visitor -->|"downloads file"| node_download
node_manifest -->|"exposes manifest"| node_catalog
node_prerender -->|"builds manifest"| node_manifest
node_visitor -->|"enters grades"| node_cgpa
node_cgpa -.->|"calculates grades"| node_cgpalogic
node_cgpa -.->|"uses scale"| node_grades
node_cgpa -.->|"creates report"| node_cgpareport
node_cgpa -.->|"offers upload"| node_upload
node_visitor -->|"sets preference"| node_consent
node_consent -->|"stores consent"| node_device
node_visitor -.->|"views scanned PDF"| node_pdfassets
node_app -->|"tracks page"| node_visits
node_visits -->|"reads and updates"| node_database
node_app -->|"renders support"| node_tipjar
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_contributors
node_app -->|"routes to"| node_contributing
node_firebase -.->|"initializes analytics"| node_database

click node_app "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/App.tsx"
click node_catalog "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/notes.ts"
click node_manifest "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/plugins/notes.ts"
click node_home "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/HomeView.tsx"
click node_semester "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/SemesterView.tsx"
click node_subject "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/SubjectView.tsx"
click node_pdf "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/PdfViewer.tsx"
click node_pdfassets "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/plugins/pdfjsAssets.ts"
click node_download "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/DownloadButton.tsx"
click node_cgpa "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/CgpaView.tsx"
click node_cgpalogic "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/cgpa.ts"
click node_grades "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/grades.ts"
click node_cgpareport "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/cgpaReport.ts"
click node_upload "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/CgpaUploadDialog.tsx"
click node_consent "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/CookieBanner.tsx"
click node_preferences "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/theme.ts"
click node_device "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/consent.ts"
click node_prerender "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/plugins/prerender.ts"
click node_visits "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/visits.ts"
click node_firebase "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/firebase.ts"
click node_about "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/AboutView.tsx"
click node_contributors "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/ContributorsView.tsx"
click node_contributing "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/ContributingView.tsx"
click node_tipjar "https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/TipJar.tsx"

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_catalog,node_manifest,node_home,node_semester,node_subject,node_pdf,node_pdfassets,node_download toneBlue
class node_cgpa,node_cgpalogic,node_grades,node_cgpareport,node_upload toneAmber
class node_app,node_consent,node_preferences,node_device,node_prerender,node_about,node_contributors,node_contributing,node_tipjar toneMint
class node_visits,node_firebase,node_database toneRose
class node_visitor toneIndigo
```

## Components

### Study library

- [Notes catalog](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/notes.ts): `Website/src/content/notes.ts`
- [Notes indexing](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/plugins/notes.ts): `Website/plugins/notes.ts`
- [Browse semesters](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/HomeView.tsx): `Website/src/components/HomeView.tsx`
- [Semester view](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/SemesterView.tsx): `Website/src/components/SemesterView.tsx`
- [Subject files](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/SubjectView.tsx): `Website/src/components/SubjectView.tsx`
- [PDF viewer](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/PdfViewer.tsx): `Website/src/components/PdfViewer.tsx`
- [PDF.js assets](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/plugins/pdfjsAssets.ts): `Website/plugins/pdfjsAssets.ts`
- [File download](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/DownloadButton.tsx): `Website/src/components/DownloadButton.tsx`

### CGPA calculator

- [CGPA calculator](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/CgpaView.tsx): `Website/src/components/CgpaView.tsx`
- [Grade calculations](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/cgpa.ts): `Website/src/content/cgpa.ts`
- [Grade scale](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/grades.ts): `Website/src/content/grades.ts`
- [CGPA report](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/cgpaReport.ts): `Website/src/content/cgpaReport.ts`
- [Report upload](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/CgpaUploadDialog.tsx): `Website/src/components/CgpaUploadDialog.tsx`

### Site experience

- [App router](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/App.tsx): `Website/src/App.tsx`
- [Cookie consent](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/CookieBanner.tsx): `Website/src/components/CookieBanner.tsx`
- [Theme preferences](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/theme.ts): `Website/src/content/theme.ts`
- [Consent storage](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/consent.ts): `Website/src/content/consent.ts`
- [Search pages](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/plugins/prerender.ts): `Website/plugins/prerender.ts`
- [About and policy pages](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/AboutView.tsx): `Website/src/components/AboutView.tsx`
- [Contributor page](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/ContributorsView.tsx): `Website/src/components/ContributorsView.tsx`
- [Contributing page](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/ContributingView.tsx): `Website/src/components/ContributingView.tsx`
- [Support the site](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/components/TipJar.tsx): `Website/src/components/TipJar.tsx`

### Site services

- [Visit tracking](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/content/visits.ts): `Website/src/content/visits.ts`
- [Firebase setup](https://github.com/adhikari-arpan/bece_notes/blob/main/Website/src/firebase.ts): `Website/src/firebase.ts`
- **Firebase database**

### Other components

- **Student**

## Connections

- Student → App router: opens site (evidence: `README.md`)
- App router → Browse semesters: routes to (evidence: `Website/src/App.tsx`)
- App router → Semester view: routes to (evidence: `Website/src/App.tsx`)
- App router → Subject files: routes to (evidence: `Website/src/App.tsx`)
- App router → CGPA calculator: routes to (evidence: `Website/src/App.tsx`)
- Student → Browse semesters: picks semester (evidence: `README.md`)
- Student → Subject files: selects subject (evidence: `README.md`)
- Student → PDF viewer: opens file (evidence: `README.md`)
- Student → File download: downloads file (evidence: `README.md`)
- Notes indexing → Notes catalog: exposes manifest (evidence: `Website/plugins/notes.ts`)
- Search pages → Notes indexing: builds manifest (evidence: `Website/plugins/prerender.ts`)
- Student → CGPA calculator: enters grades (evidence: `README.md`)
- CGPA calculator → Grade calculations: calculates grades
- CGPA calculator → Grade scale: uses scale
- CGPA calculator → CGPA report: creates report
- CGPA calculator → Report upload: offers upload
- Student → Cookie consent: sets preference (evidence: `Website/src/components/CookieBanner.tsx`)
- Cookie consent → Consent storage: stores consent (evidence: `Website/src/components/CookieBanner.tsx`)
- Student → PDF.js assets: views scanned PDF
- App router → Visit tracking: tracks page (evidence: `Website/src/App.tsx`)
- Visit tracking → Firebase database: reads and updates (evidence: `Website/src/content/visits.ts`)
- App router → Support the site: renders support (evidence: `Website/src/App.tsx`)
- App router → About and policy pages: routes to (evidence: `Website/src/App.tsx`)
- App router → Contributor page: routes to (evidence: `Website/src/App.tsx`)
- App router → Contributing page: routes to (evidence: `Website/src/App.tsx`)
- Firebase setup → Firebase database: initializes analytics
