# anujmaurya2024/bytestudy architecture

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

- Interactive diagram: https://gitdiagram.com/anujmaurya2024/bytestudy
- Repository: https://github.com/anujmaurya2024/bytestudy

## Overview

BytePath is a student academic planner and career-guidance platform: students sign in, enter a dashboard, and use academic planning, study, resource, and guidance features. The React app presents those workflows; its shared academic store manages client state and selected service clients connect to the Spring API. Backend controllers expose domain operations, services apply business rules, and repositories persist records. The README documents this layered design, while sampled excerpts confirm selected auth, academic, advisor, and PYQ flows. Other feature links are shown only where supported by the tree or documented capabilities; unsampled wiring is not inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/App.jsx) (App shell), [`backend/src/main/java/com/bytepath/service/AuthService.java`](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/AuthService.java) (Authentication), [`backend/src/main/java/com/bytepath/service/AdvisorService.java`](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/AdvisorService.java) (Advisor service), [`frontend/src/hooks/useAcademicStore.js`](https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/hooks/useAcademicStore.js) (Academic store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Student web app"]
  node_app["App shell<br/>[App.jsx]"]
  node_store["Academic store"]
  node_panels["Feature panels"]
  node_authui["Login page<br/>[LoginPage.jsx]"]
  node_authclient["Auth client<br/>[authApi.js]"]
  node_advisorclient["Advisor client<br/>[advisorApi.js]"]
end

subgraph group_api["API and security"]
  node_authctrl["Auth endpoints"]
  node_authsvc["Authentication<br/>[AuthService.java]"]
  node_security["JWT security"]
end

subgraph group_learning["Academic and learning"]
  node_academicctrl["Academic endpoints"]
  node_academicsvc["Academic logic"]
  node_studentctrl["Student features"]
  node_studentdata["Student data logic"]
end

subgraph group_resources["Resources and guidance"]
  node_advisorui["Advisor panel<br/>[AdvisorPanel.jsx]"]
  node_advisorctrl["Advisor endpoints"]
  node_advisorsvc["Advisor service"]
  node_docsearch["Document retrieval"]
  node_storage["File storage client"]
end

subgraph group_persistence["Persistence"]
  node_userrepo[("User repository")]
  node_semesterrepo[("Semester records")]
  node_chatrepo[("Chat messages")]
  node_chunkrepo[("Document chunks")]
  node_pyqrepo[("Study resources")]
end

node_student(("Student"))
node_externalai(("AI provider"))
node_google(("Google OAuth"))
node_github(("GitHub OAuth"))
node_supabase[("Supabase Storage")]

node_student -->|"uses"| node_app
node_app -->|"shows"| node_authui
node_app -->|"renders"| node_panels
node_app -->|"reads state"| node_store
node_store -->|"loads session"| node_authclient
node_store -->|"asks advisor"| node_advisorclient
node_authui -->|"signs in"| node_authclient
node_authclient -->|"calls API"| node_authctrl
node_advisorui -->|"sends questions"| node_advisorclient
node_advisorclient -->|"calls API"| node_advisorctrl
node_authctrl -->|"delegates"| node_authsvc
node_authsvc -->|"reads/writes"| node_userrepo
node_authsvc -.->|"validates token"| node_google
node_authsvc -.->|"exchanges code"| node_github
node_authctrl -->|"uses"| node_security
node_academicctrl -->|"delegates"| node_academicsvc
node_academicsvc -->|"updates profile"| node_userrepo
node_academicsvc -->|"stores grades"| node_semesterrepo
node_studentctrl -->|"delegates"| node_studentdata
node_advisorctrl -->|"delegates"| node_advisorsvc
node_advisorsvc -->|"retrieves excerpts"| node_docsearch
node_advisorsvc -.->|"requests answer"| node_externalai
node_advisorsvc -->|"stores chat"| node_chatrepo
node_docsearch -->|"searches chunks"| node_chunkrepo
node_studentdata -->|"manages files"| node_storage
node_studentdata -->|"manages resources"| node_pyqrepo
node_storage -->|"uploads and fetches"| node_supabase

click node_app "https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/App.jsx"
click node_store "https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/hooks/useAcademicStore.js"
click node_panels "https://github.com/anujmaurya2024/bytestudy/tree/main/frontend/src/components"
click node_authui "https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/components/LoginPage.jsx"
click node_authclient "https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/services/authApi.js"
click node_advisorclient "https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/services/advisorApi.js"
click node_authctrl "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/controller/AuthController.java"
click node_authsvc "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/AuthService.java"
click node_security "https://github.com/anujmaurya2024/bytestudy/tree/main/backend/src/main/java/com/bytepath/security"
click node_academicctrl "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/controller/AcademicController.java"
click node_academicsvc "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/AcademicService.java"
click node_studentctrl "https://github.com/anujmaurya2024/bytestudy/tree/main/backend/src/main/java/com/bytepath/controller"
click node_studentdata "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/StudentDataService.java"
click node_advisorui "https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/components/AdvisorPanel.jsx"
click node_advisorctrl "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/controller/AdvisorController.java"
click node_advisorsvc "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/AdvisorService.java"
click node_docsearch "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/DocumentSearchService.java"
click node_storage "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/SupabaseStorageService.java"
click node_userrepo "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/UserRepository.java"
click node_semesterrepo "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/SemesterRecordRepository.java"
click node_chatrepo "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/ChatMessageRepository.java"
click node_chunkrepo "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/DocumentChunkRepository.java"
click node_pyqrepo "https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/PyqResourceRepository.java"

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_app,node_store,node_panels,node_authui,node_authclient,node_advisorclient toneBlue
class node_authctrl,node_authsvc,node_security,node_supabase toneAmber
class node_academicctrl,node_academicsvc,node_studentctrl,node_studentdata toneMint
class node_advisorui,node_advisorctrl,node_advisorsvc,node_docsearch,node_storage toneRose
class node_userrepo,node_semesterrepo,node_chatrepo,node_chunkrepo,node_pyqrepo,node_student,node_externalai,node_google,node_github toneIndigo
```

## Components

### Student web app

- [App shell](https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Academic store](https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/hooks/useAcademicStore.js): `frontend/src/hooks/useAcademicStore.js`
- [Feature panels](https://github.com/anujmaurya2024/bytestudy/tree/main/frontend/src/components): `frontend/src/components`
- [Login page](https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/components/LoginPage.jsx): `frontend/src/components/LoginPage.jsx`
- [Auth client](https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/services/authApi.js): `frontend/src/services/authApi.js`
- [Advisor client](https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/services/advisorApi.js): `frontend/src/services/advisorApi.js`

### API and security

- [Auth endpoints](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/controller/AuthController.java): `backend/src/main/java/com/bytepath/controller/AuthController.java`
- [Authentication](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/AuthService.java): `backend/src/main/java/com/bytepath/service/AuthService.java`
- [JWT security](https://github.com/anujmaurya2024/bytestudy/tree/main/backend/src/main/java/com/bytepath/security): `backend/src/main/java/com/bytepath/security`

### Academic and learning

- [Academic endpoints](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/controller/AcademicController.java): `backend/src/main/java/com/bytepath/controller/AcademicController.java`
- [Academic logic](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/AcademicService.java): `backend/src/main/java/com/bytepath/service/AcademicService.java`
- [Student features](https://github.com/anujmaurya2024/bytestudy/tree/main/backend/src/main/java/com/bytepath/controller): `backend/src/main/java/com/bytepath/controller`
- [Student data logic](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/StudentDataService.java): `backend/src/main/java/com/bytepath/service/StudentDataService.java`

### Resources and guidance

- [Advisor panel](https://github.com/anujmaurya2024/bytestudy/blob/main/frontend/src/components/AdvisorPanel.jsx): `frontend/src/components/AdvisorPanel.jsx`
- [Advisor endpoints](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/controller/AdvisorController.java): `backend/src/main/java/com/bytepath/controller/AdvisorController.java`
- [Advisor service](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/AdvisorService.java): `backend/src/main/java/com/bytepath/service/AdvisorService.java`
- [Document retrieval](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/DocumentSearchService.java): `backend/src/main/java/com/bytepath/service/DocumentSearchService.java`
- [File storage client](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/service/SupabaseStorageService.java): `backend/src/main/java/com/bytepath/service/SupabaseStorageService.java`

### Persistence

- [User repository](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/UserRepository.java): `backend/src/main/java/com/bytepath/repository/UserRepository.java`
- [Semester records](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/SemesterRecordRepository.java): `backend/src/main/java/com/bytepath/repository/SemesterRecordRepository.java`
- [Chat messages](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/ChatMessageRepository.java): `backend/src/main/java/com/bytepath/repository/ChatMessageRepository.java`
- [Document chunks](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/DocumentChunkRepository.java): `backend/src/main/java/com/bytepath/repository/DocumentChunkRepository.java`
- [Study resources](https://github.com/anujmaurya2024/bytestudy/blob/main/backend/src/main/java/com/bytepath/repository/PyqResourceRepository.java): `backend/src/main/java/com/bytepath/repository/PyqResourceRepository.java`

### Other components

- **Student**
- **AI provider**
- **Google OAuth**
- **GitHub OAuth**
- **Supabase Storage**

## Connections

- Student → App shell: uses
- App shell → Login page: shows
- App shell → Feature panels: renders
- App shell → Academic store: reads state
- Academic store → Auth client: loads session
- Academic store → Advisor client: asks advisor
- Login page → Auth client: signs in
- Auth client → Auth endpoints: calls API
- Advisor panel → Advisor client: sends questions
- Advisor client → Advisor endpoints: calls API
- Auth endpoints → Authentication: delegates
- Authentication → User repository: reads/writes
- Authentication → Google OAuth: validates token
- Authentication → GitHub OAuth: exchanges code
- Auth endpoints → JWT security: uses
- Academic endpoints → Academic logic: delegates
- Academic logic → User repository: updates profile
- Academic logic → Semester records: stores grades
- Student features → Student data logic: delegates
- Advisor endpoints → Advisor service: delegates
- Advisor service → Document retrieval: retrieves excerpts
- Advisor service → AI provider: requests answer
- Advisor service → Chat messages: stores chat
- Document retrieval → Document chunks: searches chunks
- Student data logic → File storage client: manages files
- Student data logic → Study resources: manages resources
- File storage client → Supabase Storage: uploads and fetches
