# dinesh-2007/learning-hub architecture

> Architecture diagram of the GitHub repository dinesh-2007/learning-hub, 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/dinesh-2007/learning-hub
- Repository: https://github.com/dinesh-2007/learning-hub

## Overview

Study Platform is a full-stack study assistant: learners sign in, then use a React dashboard and study tools backed by FastAPI APIs and MongoDB. Its product areas include scheduling, resources, mock tests, progress and readiness, notes, gamification, notifications, and interview preparation and analytics. The graph separates frontend routing and API access from backend domain routers and persistence. Some page and router implementations are unsampled; those capabilities are included from the tree and documented routes, without asserting unverified internal calls.

Main entry points: [`frontend/src/App.jsx`](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/App.jsx) (App routing), [`backend/database.py`](https://github.com/dinesh-2007/learning-hub/blob/main/backend/database.py) (MongoDB access), [`backend/main.py`](https://github.com/dinesh-2007/learning-hub/blob/main/backend/main.py) (FastAPI application), [`frontend/src/api/axios.js`](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/api/axios.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_authui["Session context<br/>[AuthContext.jsx]"]
  node_api["API client<br/>[axios.js]"]
end

subgraph group_study["Study tools"]
  node_dashboard["Study dashboard<br/>[Dashboard.jsx]"]
  node_scheduleui["Study schedule<br/>[Schedule.jsx]"]
  node_resourcesui["Resource hub<br/>[ResourceHub.jsx]"]
  node_testsui["Mock tests<br/>[MockTests.jsx]"]
  node_progressui["Progress analytics"]
  node_readinessui["Readiness check<br/>[Readiness.jsx]"]
  node_notesui["Study notes<br/>[Notes.jsx]"]
  node_gameui["Gamification<br/>[Gamification.jsx]"]
  node_notificationsui["Notifications<br/>[Notifications.jsx]"]
end

subgraph group_interview["Interview preparation"]
  node_practiceui["Interview practice"]
  node_interviewfeatures["Interview features"]
end

subgraph group_backend["API and domain services"]
  node_backend["FastAPI application<br/>[main.py]"]
  node_authroutes["Authentication API<br/>[auth_router.py]"]
  node_scheduleroutes["Schedule API<br/>[schedule_router.py]"]
  node_progressroutes["Progress API<br/>[progress_router.py]"]
  node_analysisroutes["Analysis API<br/>[analysis_router.py]"]
  node_analyticsroutes["Analytics API"]
  node_readinessroutes["Readiness API"]
  node_resourceroutes["Resource API<br/>[resource_router.py]"]
  node_notesroutes["Notes API<br/>[notes_router.py]"]
  node_gameroutes["Gamification API"]
  node_notificationroutes["Notification API"]
  node_domainroutes["Other domain APIs"]
  node_schemas["Request and response schemas<br/>[schemas.py]"]
end

subgraph group_storage["Persistence"]
  node_database[("MongoDB access<br/>[database.py]")]
end

node_learner(("Learner"))
node_browser(("Browser"))

node_learner -->|"uses"| node_app
node_app -->|"provides session"| node_authui
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_scheduleui
node_app -->|"routes to"| node_resourcesui
node_app -->|"routes to"| node_testsui
node_app -->|"routes to"| node_progressui
node_app -->|"routes to"| node_readinessui
node_app -->|"routes to"| node_notesui
node_app -->|"routes to"| node_gameui
node_app -->|"routes to"| node_notificationsui
node_app -->|"routes to"| node_interviewfeatures
node_authui -->|"calls"| node_api
node_authui -->|"authenticates via"| node_authroutes
node_dashboard -->|"requests data"| node_api
node_scheduleui -->|"requests data"| node_api
node_testsui -->|"requests data"| node_api
node_notesui -->|"requests data"| node_api
node_notificationsui -->|"loads notifications"| node_api
node_gameui -->|"requests data"| node_api
node_practiceui -.->|"routed within"| node_app
node_api -.->|"HTTP requests"| node_browser
node_app -->|"renders"| node_browser
node_backend -.->|"uses"| node_database
node_authroutes -->|"reads and writes"| node_database
node_authroutes -->|"validates with"| node_schemas
node_scheduleroutes -->|"reads and writes"| node_database
node_scheduleroutes -->|"validates with"| node_schemas
node_progressroutes -->|"reads and writes"| node_database
node_progressroutes -->|"validates with"| node_schemas
node_analysisroutes -->|"accesses"| node_database
node_analyticsroutes -->|"accesses"| node_database
node_analyticsroutes -->|"uses"| node_schemas
node_readinessroutes -->|"accesses"| node_database
node_resourceroutes -->|"accesses"| node_database
node_notesroutes -->|"accesses"| node_database
node_notificationroutes -->|"accesses"| node_database
node_gameroutes -->|"reads and writes"| node_database
node_domainroutes -.->|"accesses"| node_database
node_backend -->|"registers"| node_authroutes
node_backend -->|"registers"| node_scheduleroutes
node_backend -->|"registers"| node_resourceroutes
node_backend -->|"registers"| node_progressroutes
node_backend -->|"registers"| node_analysisroutes
node_backend -->|"registers"| node_analyticsroutes
node_backend -->|"registers"| node_readinessroutes
node_backend -->|"registers"| node_notesroutes
node_backend -->|"registers"| node_gameroutes

click node_app "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/context/AuthContext.jsx"
click node_api "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/api/axios.js"
click node_dashboard "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/Dashboard.jsx"
click node_scheduleui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/Schedule.jsx"
click node_resourcesui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/ResourceHub.jsx"
click node_testsui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/MockTests.jsx"
click node_progressui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/ProgressAnalytics.jsx"
click node_readinessui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/Readiness.jsx"
click node_notesui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/Notes.jsx"
click node_gameui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/Gamification.jsx"
click node_notificationsui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/Notifications.jsx"
click node_practiceui "https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/interview/InterviewPractice.jsx"
click node_interviewfeatures "https://github.com/dinesh-2007/learning-hub/tree/main/frontend/src/pages/interview"
click node_backend "https://github.com/dinesh-2007/learning-hub/blob/main/backend/main.py"
click node_authroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/auth_router.py"
click node_scheduleroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/schedule_router.py"
click node_progressroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/progress_router.py"
click node_analysisroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/analysis_router.py"
click node_analyticsroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/analytics_router.py"
click node_readinessroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/readiness_router.py"
click node_resourceroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/resource_router.py"
click node_notesroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/notes_router.py"
click node_gameroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/gamification_router.py"
click node_notificationroutes "https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/notification_router.py"
click node_domainroutes "https://github.com/dinesh-2007/learning-hub/tree/main/backend/routers"
click node_schemas "https://github.com/dinesh-2007/learning-hub/blob/main/backend/schemas.py"
click node_database "https://github.com/dinesh-2007/learning-hub/blob/main/backend/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_app,node_authui,node_api,node_browser toneBlue
class node_dashboard,node_scheduleui,node_resourcesui,node_testsui,node_progressui,node_readinessui,node_notesui,node_gameui,node_notificationsui toneAmber
class node_practiceui,node_interviewfeatures toneMint
class node_backend,node_authroutes,node_scheduleroutes,node_progressroutes,node_analysisroutes,node_analyticsroutes,node_readinessroutes,node_resourceroutes,node_notesroutes,node_gameroutes,node_notificationroutes,node_domainroutes,node_schemas toneRose
class node_database,node_learner toneIndigo
```

## Components

### Frontend experience

- [App routing](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session context](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/api/axios.js): `frontend/src/api/axios.js`

### Study tools

- [Study dashboard](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/Dashboard.jsx): `frontend/src/pages/core/Dashboard.jsx`
- [Study schedule](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/Schedule.jsx): `frontend/src/pages/core/Schedule.jsx`
- [Resource hub](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/ResourceHub.jsx): `frontend/src/pages/core/ResourceHub.jsx`
- [Mock tests](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/MockTests.jsx): `frontend/src/pages/core/MockTests.jsx`
- [Progress analytics](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/ProgressAnalytics.jsx): `frontend/src/pages/core/ProgressAnalytics.jsx`
- [Readiness check](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/Readiness.jsx): `frontend/src/pages/core/Readiness.jsx`
- [Study notes](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/core/Notes.jsx): `frontend/src/pages/core/Notes.jsx`
- [Gamification](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/Gamification.jsx): `frontend/src/pages/Gamification.jsx`
- [Notifications](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/Notifications.jsx): `frontend/src/pages/Notifications.jsx`

### Interview preparation

- [Interview practice](https://github.com/dinesh-2007/learning-hub/blob/main/frontend/src/pages/interview/InterviewPractice.jsx): `frontend/src/pages/interview/InterviewPractice.jsx`
- [Interview features](https://github.com/dinesh-2007/learning-hub/tree/main/frontend/src/pages/interview): `frontend/src/pages/interview`

### API and domain services

- [FastAPI application](https://github.com/dinesh-2007/learning-hub/blob/main/backend/main.py): `backend/main.py`
- [Authentication API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/auth_router.py): `backend/routers/auth_router.py`
- [Schedule API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/schedule_router.py): `backend/routers/schedule_router.py`
- [Progress API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/progress_router.py): `backend/routers/progress_router.py`
- [Analysis API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/analysis_router.py): `backend/routers/analysis_router.py`
- [Analytics API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/analytics_router.py): `backend/routers/analytics_router.py`
- [Readiness API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/readiness_router.py): `backend/routers/readiness_router.py`
- [Resource API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/resource_router.py): `backend/routers/resource_router.py`
- [Notes API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/notes_router.py): `backend/routers/notes_router.py`
- [Gamification API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/gamification_router.py): `backend/routers/gamification_router.py`
- [Notification API](https://github.com/dinesh-2007/learning-hub/blob/main/backend/routers/notification_router.py): `backend/routers/notification_router.py`
- [Other domain APIs](https://github.com/dinesh-2007/learning-hub/tree/main/backend/routers): `backend/routers`
- [Request and response schemas](https://github.com/dinesh-2007/learning-hub/blob/main/backend/schemas.py): `backend/schemas.py`

### Persistence

- [MongoDB access](https://github.com/dinesh-2007/learning-hub/blob/main/backend/database.py): `backend/database.py`

### Other components

- **Learner**
- **Browser**

## Connections

- Learner → App routing: uses (evidence: `frontend/src/App.jsx`)
- App routing → Session context: provides session (evidence: `frontend/src/App.jsx`)
- App routing → Study dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Study schedule: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Resource hub: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Mock tests: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Progress analytics: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Readiness check: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Study notes: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Gamification: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Notifications: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Interview features: routes to (evidence: `frontend/src/App.jsx`)
- Session context → API client: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Session context → Authentication API: authenticates via (evidence: `frontend/src/context/AuthContext.jsx`)
- Study dashboard → API client: requests data (evidence: `frontend/src/pages/core/Dashboard.jsx`)
- Study schedule → API client: requests data (evidence: `frontend/src/pages/core/Schedule.jsx`)
- Mock tests → API client: requests data (evidence: `frontend/src/pages/core/MockTests.jsx`)
- Study notes → API client: requests data (evidence: `frontend/src/pages/core/Notes.jsx`)
- Notifications → API client: loads notifications (evidence: `frontend/src/pages/Notifications.jsx`)
- Gamification → API client: requests data (evidence: `frontend/src/pages/Gamification.jsx`)
- Interview practice → App routing: routed within (evidence: `frontend/src/App.jsx`)
- API client → Browser: HTTP requests
- App routing → Browser: renders
- FastAPI application → MongoDB access: uses
- Authentication API → MongoDB access: reads and writes (evidence: `backend/routers/auth_router.py`)
- Authentication API → Request and response schemas: validates with (evidence: `backend/routers/auth_router.py`)
- Schedule API → MongoDB access: reads and writes (evidence: `backend/routers/schedule_router.py`)
- Schedule API → Request and response schemas: validates with (evidence: `backend/routers/schedule_router.py`)
- Progress API → MongoDB access: reads and writes (evidence: `backend/routers/progress_router.py`)
- Progress API → Request and response schemas: validates with (evidence: `backend/routers/progress_router.py`)
- Analysis API → MongoDB access: accesses (evidence: `backend/routers/analysis_router.py`)
- Analytics API → MongoDB access: accesses (evidence: `backend/routers/analytics_router.py`)
- Analytics API → Request and response schemas: uses (evidence: `backend/routers/analytics_router.py`)
- Readiness API → MongoDB access: accesses (evidence: `backend/routers/readiness_router.py`)
- Resource API → MongoDB access: accesses (evidence: `backend/routers/resource_router.py`)
- Notes API → MongoDB access: accesses (evidence: `backend/routers/notes_router.py`)
- Notification API → MongoDB access: accesses (evidence: `backend/routers/notification_router.py`)
- Gamification API → MongoDB access: reads and writes (evidence: `backend/routers/gamification_router.py`)
- Other domain APIs → MongoDB access: accesses (evidence: `backend/routers/auth_router.py`)
- FastAPI application → Authentication API: registers (evidence: `backend/main.py`)
- FastAPI application → Schedule API: registers (evidence: `backend/main.py`)
- FastAPI application → Resource API: registers (evidence: `backend/main.py`)
- FastAPI application → Progress API: registers (evidence: `backend/main.py`)
- FastAPI application → Analysis API: registers (evidence: `backend/main.py`)
- FastAPI application → Analytics API: registers (evidence: `backend/main.py`)
- FastAPI application → Readiness API: registers (evidence: `backend/main.py`)
- FastAPI application → Notes API: registers (evidence: `backend/main.py`)
- FastAPI application → Gamification API: registers (evidence: `backend/main.py`)
