# atharvakhade2007-cyber/sem3-project architecture

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

- Interactive diagram: https://gitdiagram.com/atharvakhade2007-cyber/sem3-project
- Repository: https://github.com/atharvakhade2007-cyber/sem3-project

## Overview

StudyMind AI combines PDF-based study-material generation with adaptive and daily quizzes, plus learner profiles, analytics, leaderboards, and social challenges. Learners use the React application, whose API layer communicates with Django endpoints; backend services handle content generation, assessment, and ratings, while application data is stored in Django models. The task and daily-quiz excerpts support the scheduled quiz branch. Several backend views and services are represented by their exact tree paths, but their internal call wiring is not fully evidenced by the sampled source, so uncertain links are omitted.

Main entry points: [`frontend/src/apiClient.js`](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/apiClient.js) (Authenticated fetch), [`study_core/models.py`](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/models.py) (Study data models), [`frontend/src/api.js`](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/api.js) (API functions), [`frontend/src/App.jsx`](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/App.jsx) (Application routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["Application routes<br/>[App.jsx]"]
  node_workspace["Study workspace<br/>[Dashboard.jsx]"]
  node_dailyui["Daily quiz UI<br/>[DailyQuiz.jsx]"]
  node_learningui["Learning tools<br/>[AdaptiveTest.jsx]"]
  node_communityui["Community UI<br/>[SocialHub.jsx]"]
  node_authui["Account UI<br/>[AuthPage.jsx]"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_api["API functions<br/>[api.js]"]
  node_http["Authenticated fetch<br/>[apiClient.js]"]
end

subgraph group_api["Backend API"]
  node_authviews["Authentication endpoints<br/>[auth.py]"]
  node_documents["Document endpoints<br/>[documents.py]"]
  node_assessment["Assessment endpoints<br/>[assessment.py]"]
  node_dailyview["Daily quiz endpoints<br/>[daily_quiz.py]"]
  node_analytics["Analytics endpoints<br/>[analytics.py]"]
  node_social["Social endpoints<br/>[social.py]"]
  node_challenges["Challenge endpoints<br/>[challenges.py]"]
  node_leaderboard["Leaderboard endpoints<br/>[leaderboard.py]"]
end

subgraph group_learning["Learning services"]
  node_pdf["PDF extraction<br/>[pdf_parser.py]"]
  node_llm["Study content generation<br/>[llm_service.py]"]
  node_generator["Gemini integration<br/>[llm_generator.py]"]
  node_adaptive["Adaptive assessment<br/>[adaptive_engine.py]"]
  node_persona["Persona routing<br/>[persona_engine.py]"]
  node_irt["Daily quiz routing<br/>[irt_engine.py]"]
  node_dailyservice["Daily quiz service"]
end

subgraph group_community["Community features"]
  node_rating["Duel ratings<br/>[rating_engine.py]"]
end

subgraph group_runtime["Runtime and state"]
  node_models[("Study data models<br/>[models.py]")]
  node_task["Quiz generation task<br/>[tasks.py]"]
  node_celery["Task scheduler<br/>[celery.py]"]
end

node_learner(("Learner"))
node_gemini{{"Gemini service"}}
node_mlmodel{{"Persona prediction model"}}

node_learner -->|"uses"| node_app
node_app -->|"routes to"| node_workspace
node_app -->|"routes to"| node_dailyui
node_app -->|"routes to"| node_communityui
node_app -->|"routes to"| node_authui
node_authui -->|"authenticates"| node_authstate
node_authstate -->|"requests"| node_api
node_workspace -->|"requests"| node_api
node_dailyui -->|"requests"| node_api
node_learningui -->|"requests"| node_api
node_communityui -->|"requests"| node_api
node_api -->|"sends requests"| node_http
node_http -->|"HTTP requests"| node_authviews
node_http -->|"HTTP requests"| node_documents
node_http -->|"HTTP requests"| node_assessment
node_http -->|"HTTP requests"| node_dailyview
node_http -->|"HTTP requests"| node_analytics
node_http -->|"HTTP requests"| node_social
node_http -->|"HTTP requests"| node_challenges
node_http -->|"HTTP requests"| node_leaderboard
node_documents -->|"extracts text"| node_pdf
node_documents -->|"generates materials"| node_llm
node_llm -->|"uses"| node_generator
node_generator -->|"calls"| node_gemini
node_assessment -->|"selects tier"| node_persona
node_assessment -->|"updates ratings"| node_adaptive
node_persona -.->|"predicts persona"| node_mlmodel
node_dailyview -->|"serves quiz"| node_dailyservice
node_dailyservice -->|"routes questions"| node_irt
node_task -->|"ensures quiz"| node_dailyservice
node_celery -->|"dispatches"| node_task
node_challenges -->|"rates completed duel"| node_rating
node_authviews -->|"reads and writes"| node_models
node_documents -->|"reads and writes"| node_models
node_assessment -->|"reads and writes"| node_models
node_dailyservice -->|"reads and writes"| node_models
node_analytics -->|"reads"| node_models
node_social -->|"reads and writes"| node_models
node_challenges -->|"reads and writes"| node_models
node_leaderboard -->|"reads"| node_models
node_rating -->|"updates ratings"| node_models

click node_app "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/App.jsx"
click node_workspace "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/pages/Dashboard.jsx"
click node_dailyui "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/components/DailyQuiz.jsx"
click node_learningui "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/components/AdaptiveTest.jsx"
click node_communityui "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/components/SocialHub.jsx"
click node_authui "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/components/AuthPage.jsx"
click node_authstate "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/context/AuthContext.jsx"
click node_api "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/api.js"
click node_http "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/apiClient.js"
click node_authviews "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/auth.py"
click node_documents "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/documents.py"
click node_assessment "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/assessment.py"
click node_dailyview "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/daily_quiz.py"
click node_analytics "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/analytics.py"
click node_social "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/social.py"
click node_challenges "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/challenges.py"
click node_leaderboard "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/leaderboard.py"
click node_pdf "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/pdf_parser.py"
click node_llm "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/llm_service.py"
click node_generator "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/llm_generator.py"
click node_adaptive "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/adaptive_engine.py"
click node_persona "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/persona_engine.py"
click node_irt "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/irt_engine.py"
click node_dailyservice "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/daily_quiz_service.py"
click node_rating "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/rating_engine.py"
click node_models "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/models.py"
click node_task "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/tasks.py"
click node_celery "https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/mysite/celery.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_workspace,node_dailyui,node_learningui,node_communityui,node_authui,node_authstate,node_api,node_http toneBlue
class node_authviews,node_documents,node_assessment,node_dailyview,node_analytics,node_social,node_challenges,node_leaderboard toneAmber
class node_pdf,node_llm,node_generator,node_adaptive,node_persona,node_irt,node_dailyservice toneMint
class node_rating toneRose
class node_models,node_task,node_celery,node_learner,node_gemini,node_mlmodel toneIndigo
```

## Components

### Web application

- [Application routes](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Study workspace](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Daily quiz UI](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/components/DailyQuiz.jsx): `frontend/src/components/DailyQuiz.jsx`
- [Learning tools](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/components/AdaptiveTest.jsx): `frontend/src/components/AdaptiveTest.jsx`
- [Community UI](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/components/SocialHub.jsx): `frontend/src/components/SocialHub.jsx`
- [Account UI](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/components/AuthPage.jsx): `frontend/src/components/AuthPage.jsx`
- [Auth state](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API functions](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Authenticated fetch](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/frontend/src/apiClient.js): `frontend/src/apiClient.js`

### Backend API

- [Authentication endpoints](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/auth.py): `study_core/views/auth.py`
- [Document endpoints](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/documents.py): `study_core/views/documents.py`
- [Assessment endpoints](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/assessment.py): `study_core/views/assessment.py`
- [Daily quiz endpoints](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/daily_quiz.py): `study_core/views/daily_quiz.py`
- [Analytics endpoints](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/analytics.py): `study_core/views/analytics.py`
- [Social endpoints](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/social.py): `study_core/views/social.py`
- [Challenge endpoints](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/challenges.py): `study_core/views/challenges.py`
- [Leaderboard endpoints](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/views/leaderboard.py): `study_core/views/leaderboard.py`

### Learning services

- [PDF extraction](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/pdf_parser.py): `study_core/services/pdf_parser.py`
- [Study content generation](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/llm_service.py): `study_core/services/llm_service.py`
- [Gemini integration](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/llm_generator.py): `study_core/services/llm_generator.py`
- [Adaptive assessment](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/adaptive_engine.py): `study_core/services/adaptive_engine.py`
- [Persona routing](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/persona_engine.py): `study_core/services/persona_engine.py`
- [Daily quiz routing](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/irt_engine.py): `study_core/services/irt_engine.py`
- [Daily quiz service](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/daily_quiz_service.py): `study_core/services/daily_quiz_service.py`

### Community features

- [Duel ratings](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/services/rating_engine.py): `study_core/services/rating_engine.py`

### Runtime and state

- [Study data models](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/models.py): `study_core/models.py`
- [Quiz generation task](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/study_core/tasks.py): `study_core/tasks.py`
- [Task scheduler](https://github.com/atharvakhade2007-cyber/sem3-project/blob/main/mysite/celery.py): `mysite/celery.py`

### Other components

- **Learner**
- **Gemini service**
- **Persona prediction model**

## Connections

- Learner → Application routes: uses
- Application routes → Study workspace: routes to
- Application routes → Daily quiz UI: routes to
- Application routes → Community UI: routes to
- Application routes → Account UI: routes to
- Account UI → Auth state: authenticates
- Auth state → API functions: requests
- Study workspace → API functions: requests
- Daily quiz UI → API functions: requests
- Learning tools → API functions: requests
- Community UI → API functions: requests
- API functions → Authenticated fetch: sends requests
- Authenticated fetch → Authentication endpoints: HTTP requests
- Authenticated fetch → Document endpoints: HTTP requests
- Authenticated fetch → Assessment endpoints: HTTP requests
- Authenticated fetch → Daily quiz endpoints: HTTP requests
- Authenticated fetch → Analytics endpoints: HTTP requests
- Authenticated fetch → Social endpoints: HTTP requests
- Authenticated fetch → Challenge endpoints: HTTP requests
- Authenticated fetch → Leaderboard endpoints: HTTP requests
- Document endpoints → PDF extraction: extracts text
- Document endpoints → Study content generation: generates materials
- Study content generation → Gemini integration: uses
- Gemini integration → Gemini service: calls
- Assessment endpoints → Persona routing: selects tier
- Assessment endpoints → Adaptive assessment: updates ratings
- Persona routing → Persona prediction model: predicts persona
- Daily quiz endpoints → Daily quiz service: serves quiz
- Daily quiz service → Daily quiz routing: routes questions
- Quiz generation task → Daily quiz service: ensures quiz
- Task scheduler → Quiz generation task: dispatches
- Challenge endpoints → Duel ratings: rates completed duel
- Authentication endpoints → Study data models: reads and writes
- Document endpoints → Study data models: reads and writes
- Assessment endpoints → Study data models: reads and writes
- Daily quiz service → Study data models: reads and writes
- Analytics endpoints → Study data models: reads
- Social endpoints → Study data models: reads and writes
- Challenge endpoints → Study data models: reads and writes
- Leaderboard endpoints → Study data models: reads
- Duel ratings → Study data models: updates ratings
