# shrimant028/studyhub architecture

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

- Interactive diagram: https://gitdiagram.com/shrimant028/studyhub
- Repository: https://github.com/shrimant028/studyhub

## Overview

StudyHub is a student study-management web app. Students register or sign in, then use the dashboard to track notes, schedules, and group memberships; they can upload and search notes, manage schedules, and join subject groups. The frontend calls Flask endpoints, which use SQLAlchemy models and local file storage. The backend routes and data operations are all implemented in one file. The HTML pages are listed in the tree but were not excerpted, so their internal wiring is not inferred.

Main entry points: [`frontend/script.js`](https://github.com/shrimant028/studyhub/blob/main/frontend/script.js) (Browser client), [`backend/app.py`](https://github.com/shrimant028/studyhub/blob/main/backend/app.py) (Study records), [`frontend/index.html`](https://github.com/shrimant028/studyhub/blob/main/frontend/index.html) (Sign-in page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Student interface"]
  node_login_page["Sign-in page<br/>[index.html]"]
  node_dashboard_page["Dashboard page<br/>[dashboard.html]"]
  node_client["Browser client<br/>[script.js]"]
end

subgraph group_workflows["Study workflows"]
  node_auth["Account access<br/>[app.py]"]
  node_dashboard["Dashboard stats<br/>[app.py]"]
  node_notes_upload["Notes upload<br/>[app.py]"]
  node_notes_search["Notes search<br/>[app.py]"]
  node_note_download["Note download<br/>[app.py]"]
  node_schedule["Schedule management<br/>[app.py]"]
  node_groups["Study groups<br/>[app.py]"]
end

subgraph group_data["Persistence"]
  node_records[("Study records<br/>[app.py]")]
  node_uploads["Uploaded files<br/>[app.py]"]
end

node_student(("Student"))

node_student -->|"opens"| node_login_page
node_client -->|"requests"| node_auth
node_client -->|"loads stats"| node_dashboard
node_client -->|"uploads notes"| node_notes_upload
node_client -->|"searches notes"| node_notes_search
node_client -->|"downloads files"| node_note_download
node_client -->|"manages schedule"| node_schedule
node_client -->|"joins group"| node_groups
node_auth -->|"reads/writes users"| node_records
node_dashboard -->|"counts records"| node_records
node_notes_upload -->|"saves note record"| node_records
node_notes_upload -->|"stores file"| node_uploads
node_notes_search -->|"queries notes"| node_records
node_note_download -->|"serves file"| node_uploads
node_schedule -->|"reads/writes entries"| node_records
node_groups -->|"saves membership"| node_records

click node_login_page "https://github.com/shrimant028/studyhub/blob/main/frontend/index.html"
click node_dashboard_page "https://github.com/shrimant028/studyhub/blob/main/frontend/dashboard.html"
click node_client "https://github.com/shrimant028/studyhub/blob/main/frontend/script.js"
click node_auth "https://github.com/shrimant028/studyhub/blob/main/backend/app.py"
click node_dashboard "https://github.com/shrimant028/studyhub/blob/main/backend/app.py"
click node_notes_upload "https://github.com/shrimant028/studyhub/blob/main/backend/app.py"
click node_notes_search "https://github.com/shrimant028/studyhub/blob/main/backend/app.py"
click node_note_download "https://github.com/shrimant028/studyhub/blob/main/backend/app.py"
click node_schedule "https://github.com/shrimant028/studyhub/blob/main/backend/app.py"
click node_groups "https://github.com/shrimant028/studyhub/blob/main/backend/app.py"
click node_records "https://github.com/shrimant028/studyhub/blob/main/backend/app.py"
click node_uploads "https://github.com/shrimant028/studyhub/blob/main/backend/app.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_login_page,node_dashboard_page,node_client toneBlue
class node_auth,node_dashboard,node_notes_upload,node_notes_search,node_note_download,node_schedule,node_groups toneAmber
class node_records,node_uploads toneMint
class node_student toneIndigo
```

## Components

### Student interface

- [Sign-in page](https://github.com/shrimant028/studyhub/blob/main/frontend/index.html): `frontend/index.html`
- [Dashboard page](https://github.com/shrimant028/studyhub/blob/main/frontend/dashboard.html): `frontend/dashboard.html`
- [Browser client](https://github.com/shrimant028/studyhub/blob/main/frontend/script.js): `frontend/script.js`

### Study workflows

- [Account access](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`
- [Dashboard stats](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`
- [Notes upload](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`
- [Notes search](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`
- [Note download](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`
- [Schedule management](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`
- [Study groups](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`

### Persistence

- [Study records](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`
- [Uploaded files](https://github.com/shrimant028/studyhub/blob/main/backend/app.py): `backend/app.py`

### Other components

- **Student**

## Connections

- Student → Sign-in page: opens (evidence: `README.md`)
- Browser client → Account access: requests (evidence: `frontend/script.js`)
- Browser client → Dashboard stats: loads stats (evidence: `frontend/script.js`)
- Browser client → Notes upload: uploads notes (evidence: `frontend/script.js`)
- Browser client → Notes search: searches notes (evidence: `frontend/script.js`)
- Browser client → Note download: downloads files (evidence: `frontend/script.js`)
- Browser client → Schedule management: manages schedule (evidence: `frontend/script.js`)
- Browser client → Study groups: joins group (evidence: `frontend/script.js`)
- Account access → Study records: reads/writes users (evidence: `backend/app.py`)
- Dashboard stats → Study records: counts records (evidence: `backend/app.py`)
- Notes upload → Study records: saves note record (evidence: `backend/app.py`)
- Notes upload → Uploaded files: stores file (evidence: `backend/app.py`)
- Notes search → Study records: queries notes (evidence: `backend/app.py`)
- Note download → Uploaded files: serves file (evidence: `backend/app.py`)
- Schedule management → Study records: reads/writes entries (evidence: `backend/app.py`)
- Study groups → Study records: saves membership (evidence: `backend/app.py`)
