# shreyas5080/studyflow architecture

> Architecture diagram of the GitHub repository shreyas5080/studyflow, 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/shreyas5080/studyflow
- Repository: https://github.com/shreyas5080/studyflow

## Overview

StudyFlow is a React/FastAPI study-planning application. Students register or sign in, then manage subjects and view a study timetable; the backend provides authentication, subject/topic APIs, and AI table generation. The README also describes progress, plans, resources, and related data entities, though their full UI and runtime wiring are not shown in the excerpts. Dashed links mark documented or plausible integrations whose implementation relationship was not directly excerpted.

Main entry points: [`FrontEnd/src/App.jsx`](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/App.jsx) (Page routing), [`backend/app.py`](https://github.com/shreyas5080/studyflow/blob/main/backend/app.py) (FastAPI application), [`backend/src/deps.py`](https://github.com/shreyas5080/studyflow/blob/main/backend/src/deps.py) (Auth and DB dependencies), [`FrontEnd/src/api.js`](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/api.js) (Authenticated requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Student experience"]
  node_browser["Browser UI"]
  node_routes["Page routing<br/>[App.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
  node_register["Registration page<br/>[Register.jsx]"]
  node_login["Login page<br/>[Login.jsx]"]
  node_dashboard["Student dashboard<br/>[Student.jsx]"]
  node_subjects_ui["Subject management<br/>[Subject.jsx]"]
  node_edit_subject["Subject editor<br/>[EditSubject.jsx]"]
  node_timetable_ui["Timetable page<br/>[TimeTable.jsx]"]
  node_auth_client["Authenticated requests<br/>[api.js]"]
end

subgraph group_api["Backend services"]
  node_api_entry["FastAPI application<br/>[app.py]"]
  node_auth_deps["Auth and DB dependencies<br/>[deps.py]"]
end

subgraph group_identity["Identity and verification"]
  node_login_api["Login endpoints<br/>[login.py]"]
  node_otp["OTP verification<br/>[otp.py]"]
  node_email["OTP email sender<br/>[email_service.py]"]
  node_redis[("Redis OTP store")]
end

subgraph group_planning["Study planning"]
  node_subject_api["Subject endpoints<br/>[subjects.py]"]
  node_topic_api["Topic endpoints<br/>[topics.py]"]
  node_ai_table["AI table generation"]
end

subgraph group_persistence["Persistence"]
  node_models["Study data models<br/>[models.py]"]
  node_database["SQLAlchemy setup<br/>[database.py]"]
  node_postgres[("PostgreSQL")]
end

node_student(("Student"))
node_mail_provider["Email provider"]
node_ai_provider["NVIDIA API"]

node_student -->|"uses"| node_browser
node_browser -->|"opens pages"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_register
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_subjects_ui
node_routes -->|"routes to"| node_edit_subject
node_routes -->|"routes to"| node_timetable_ui
node_subjects_ui -->|"sends requests"| node_auth_client
node_edit_subject -->|"sends requests"| node_auth_client
node_dashboard -->|"sends requests"| node_auth_client
node_timetable_ui -->|"sends requests"| node_auth_client
node_subjects_ui -->|"calls subject API"| node_subject_api
node_api_entry -->|"registers router"| node_login_api
node_api_entry -->|"registers router"| node_subject_api
node_api_entry -->|"registers router"| node_topic_api
node_api_entry -->|"registers router"| node_ai_table
node_api_entry -->|"calls OTP functions"| node_otp
node_api_entry -->|"sends OTP email"| node_email
node_api_entry -->|"uses DB dependency"| node_auth_deps
node_login_api -->|"uses dependencies"| node_auth_deps
node_subject_api -->|"uses dependencies"| node_auth_deps
node_topic_api -->|"uses dependencies"| node_auth_deps
node_otp -->|"stores OTPs"| node_redis
node_email -->|"sends email"| node_mail_provider
node_auth_deps -->|"creates sessions"| node_database
node_database -->|"provides model base"| node_models
node_models -.->|"maps study data"| node_postgres
node_ai_table -->|"uses models"| node_models
node_ai_table -->|"uses dependencies"| node_auth_deps
node_ai_table -.->|"uses AI service"| node_ai_provider
node_auth_client -.->|"calls API"| node_api_entry
node_register -.->|"requests verification"| node_otp
node_dashboard -.->|"tracks progress"| node_models

click node_routes "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/App.jsx"
click node_home "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/Home.jsx"
click node_register "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/Register.jsx"
click node_login "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/Login.jsx"
click node_dashboard "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/dashboard/Student.jsx"
click node_subjects_ui "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/dashboard/Subject.jsx"
click node_edit_subject "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/dashboard/EditSubject.jsx"
click node_timetable_ui "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/dashboard/TimeTable.jsx"
click node_auth_client "https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/api.js"
click node_api_entry "https://github.com/shreyas5080/studyflow/blob/main/backend/app.py"
click node_login_api "https://github.com/shreyas5080/studyflow/blob/main/backend/src/routes/login.py"
click node_otp "https://github.com/shreyas5080/studyflow/blob/main/backend/src/auth/otp.py"
click node_email "https://github.com/shreyas5080/studyflow/blob/main/backend/src/email_service.py"
click node_subject_api "https://github.com/shreyas5080/studyflow/blob/main/backend/src/routes/subjects.py"
click node_topic_api "https://github.com/shreyas5080/studyflow/blob/main/backend/src/routes/topics.py"
click node_ai_table "https://github.com/shreyas5080/studyflow/blob/main/backend/src/AI/generate_tableAI.py"
click node_auth_deps "https://github.com/shreyas5080/studyflow/blob/main/backend/src/deps.py"
click node_models "https://github.com/shreyas5080/studyflow/blob/main/backend/src/models.py"
click node_database "https://github.com/shreyas5080/studyflow/blob/main/backend/src/database.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_browser,node_routes,node_home,node_register,node_login,node_dashboard,node_subjects_ui,node_edit_subject,node_timetable_ui,node_auth_client toneBlue
class node_api_entry,node_auth_deps toneAmber
class node_login_api,node_otp,node_email,node_redis,node_ai_provider toneMint
class node_subject_api,node_topic_api,node_ai_table toneRose
class node_models,node_database,node_postgres,node_student,node_mail_provider toneIndigo
```

## Components

### Student experience

- **Browser UI**
- [Page routing](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/App.jsx): `FrontEnd/src/App.jsx`
- [Home page](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/Home.jsx): `FrontEnd/src/pages/Home.jsx`
- [Registration page](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/Register.jsx): `FrontEnd/src/pages/Register.jsx`
- [Login page](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/Login.jsx): `FrontEnd/src/pages/Login.jsx`
- [Student dashboard](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/dashboard/Student.jsx): `FrontEnd/src/pages/dashboard/Student.jsx`
- [Subject management](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/dashboard/Subject.jsx): `FrontEnd/src/pages/dashboard/Subject.jsx`
- [Subject editor](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/dashboard/EditSubject.jsx): `FrontEnd/src/pages/dashboard/EditSubject.jsx`
- [Timetable page](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/pages/dashboard/TimeTable.jsx): `FrontEnd/src/pages/dashboard/TimeTable.jsx`
- [Authenticated requests](https://github.com/shreyas5080/studyflow/blob/main/FrontEnd/src/api.js): `FrontEnd/src/api.js`

### Backend services

- [FastAPI application](https://github.com/shreyas5080/studyflow/blob/main/backend/app.py): `backend/app.py`
- [Auth and DB dependencies](https://github.com/shreyas5080/studyflow/blob/main/backend/src/deps.py): `backend/src/deps.py`

### Identity and verification

- [Login endpoints](https://github.com/shreyas5080/studyflow/blob/main/backend/src/routes/login.py): `backend/src/routes/login.py`
- [OTP verification](https://github.com/shreyas5080/studyflow/blob/main/backend/src/auth/otp.py): `backend/src/auth/otp.py`
- [OTP email sender](https://github.com/shreyas5080/studyflow/blob/main/backend/src/email_service.py): `backend/src/email_service.py`
- **Redis OTP store**

### Study planning

- [Subject endpoints](https://github.com/shreyas5080/studyflow/blob/main/backend/src/routes/subjects.py): `backend/src/routes/subjects.py`
- [Topic endpoints](https://github.com/shreyas5080/studyflow/blob/main/backend/src/routes/topics.py): `backend/src/routes/topics.py`
- [AI table generation](https://github.com/shreyas5080/studyflow/blob/main/backend/src/AI/generate_tableAI.py): `backend/src/AI/generate_tableAI.py`

### Persistence

- [Study data models](https://github.com/shreyas5080/studyflow/blob/main/backend/src/models.py): `backend/src/models.py`
- [SQLAlchemy setup](https://github.com/shreyas5080/studyflow/blob/main/backend/src/database.py): `backend/src/database.py`
- **PostgreSQL**

### Other components

- **Student**
- **Email provider**
- **NVIDIA API**

## Connections

- Student → Browser UI: uses (evidence: `README.md`)
- Browser UI → Page routing: opens pages (evidence: `README.md`)
- Page routing → Home page: routes to (evidence: `FrontEnd/src/App.jsx`)
- Page routing → Registration page: routes to (evidence: `FrontEnd/src/App.jsx`)
- Page routing → Login page: routes to (evidence: `FrontEnd/src/App.jsx`)
- Page routing → Student dashboard: routes to (evidence: `FrontEnd/src/App.jsx`)
- Page routing → Subject management: routes to (evidence: `FrontEnd/src/App.jsx`)
- Page routing → Subject editor: routes to (evidence: `FrontEnd/src/App.jsx`)
- Page routing → Timetable page: routes to (evidence: `FrontEnd/src/App.jsx`)
- Subject management → Authenticated requests: sends requests (evidence: `FrontEnd/src/pages/dashboard/Subject.jsx`)
- Subject editor → Authenticated requests: sends requests (evidence: `FrontEnd/src/pages/dashboard/EditSubject.jsx`)
- Student dashboard → Authenticated requests: sends requests (evidence: `FrontEnd/src/pages/dashboard/Student.jsx`)
- Timetable page → Authenticated requests: sends requests (evidence: `FrontEnd/src/pages/dashboard/TimeTable.jsx`)
- Subject management → Subject endpoints: calls subject API (evidence: `FrontEnd/src/pages/dashboard/Subject.jsx`)
- FastAPI application → Login endpoints: registers router (evidence: `backend/app.py`)
- FastAPI application → Subject endpoints: registers router (evidence: `backend/app.py`)
- FastAPI application → Topic endpoints: registers router (evidence: `backend/app.py`)
- FastAPI application → AI table generation: registers router (evidence: `backend/app.py`)
- FastAPI application → OTP verification: calls OTP functions (evidence: `backend/app.py`)
- FastAPI application → OTP email sender: sends OTP email (evidence: `backend/app.py`)
- FastAPI application → Auth and DB dependencies: uses DB dependency (evidence: `backend/app.py`)
- Login endpoints → Auth and DB dependencies: uses dependencies (evidence: `backend/src/routes/login.py`)
- Subject endpoints → Auth and DB dependencies: uses dependencies (evidence: `backend/src/routes/subjects.py`)
- Topic endpoints → Auth and DB dependencies: uses dependencies (evidence: `backend/src/routes/topics.py`)
- OTP verification → Redis OTP store: stores OTPs (evidence: `backend/src/auth/otp.py`)
- OTP email sender → Email provider: sends email (evidence: `backend/src/email_service.py`)
- Auth and DB dependencies → SQLAlchemy setup: creates sessions (evidence: `backend/src/deps.py`)
- SQLAlchemy setup → Study data models: provides model base (evidence: `backend/src/models.py`)
- Study data models → PostgreSQL: maps study data (evidence: `README.md`)
- AI table generation → Study data models: uses models (evidence: `backend/src/AI/generate_tableAI.py`)
- AI table generation → Auth and DB dependencies: uses dependencies (evidence: `backend/src/AI/generate_tableAI.py`)
- AI table generation → NVIDIA API: uses AI service (evidence: `README.md`)
- Authenticated requests → FastAPI application: calls API (evidence: `README.md`)
- Registration page → OTP verification: requests verification (evidence: `README.md`)
- Student dashboard → Study data models: tracks progress (evidence: `README.md`)
