# prajwal9591/personalized-learning-ai architecture

> Architecture diagram of the GitHub repository prajwal9591/personalized-learning-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prajwal9591/personalized-learning-ai
- Repository: https://github.com/prajwal9591/personalized-learning-ai

## Overview

PL AI is a personalized career-learning platform. Learners register and describe their background, receive role-specific skill-gap analysis and a generated roadmap, study grounded units, complete unit assessments, and have mastery and progress updated so later guidance can adapt. The graph preserves the documented discovery, curriculum, mentor, and dashboard capabilities. Several service links are supported by the SOURCE INDEX or README rather than full implementation excerpts; those evidence limits are reflected in the citations.

Main entry points: [`backend/app/main.py`](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/core/database.py`](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/core/database.py) (Learning database), [`frontend/lib/api.ts`](https://github.com/prajwal9591/personalized-learning-ai/blob/main/frontend/lib/api.ts) (REST client), [`backend/app/api/learning.py`](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/learning.py) (Learning routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Learner experience"]
  node_web["Learning UI"]
  node_api_client["REST client<br/>[api.ts]"]
  node_session_store[("Session storage<br/>[storage.ts]")]
end

subgraph group_api["Backend API"]
  node_app["FastAPI app<br/>[main.py]"]
  node_auth_api["Auth routes<br/>[auth.py]"]
  node_learning_api["Learning routes<br/>[learning.py]"]
  node_discovery_api["Discovery routes<br/>[discovery.py]"]
  node_content_api["Content routes<br/>[content.py]"]
  node_assessment_api["Assessment routes<br/>[assessment.py]"]
  node_mentor_api["Mentor routes<br/>[mentor.py]"]
end

subgraph group_adaptive["Adaptive learning"]
  node_role_research["Role research"]
  node_gap_path["Gap and roadmap"]
  node_assessments["Assessment sessions"]
  node_progress["Progress and mastery<br/>[progress.py]"]
  node_mentor["AI mentor<br/>[mentor.py]"]
end

subgraph group_content["Learning content"]
  node_discovery["Course discovery"]
  node_curriculum["Curriculum crawler"]
  node_course_models[("Course and unit records<br/>[course_resource.py]")]
end

subgraph group_foundation["Identity and data"]
  node_auth_service["Auth service<br/>[auth_service.py]"]
  node_ai_client["Groq client<br/>[client.py]"]
  node_database[("Learning database<br/>[database.py]")]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_web
node_web -->|"requests data"| node_api_client
node_api_client -->|"reads token"| node_session_store
node_api_client -->|"calls REST"| node_app
node_app -->|"registers"| node_auth_api
node_app -->|"registers"| node_learning_api
node_app -->|"registers"| node_discovery_api
node_app -->|"registers"| node_content_api
node_app -->|"registers"| node_assessment_api
node_app -->|"registers"| node_mentor_api
node_auth_api -->|"authenticates"| node_auth_service
node_auth_service -.->|"uses session"| node_database
node_learning_api -->|"builds roadmap"| node_gap_path
node_learning_api -.->|"analyzes role"| node_role_research
node_role_research -->|"queries skills"| node_ai_client
node_role_research -->|"reads cache"| node_database
node_discovery_api -->|"finds courses"| node_discovery
node_discovery -->|"requests crawl"| node_curriculum
node_discovery -->|"stores resources"| node_course_models
node_curriculum -->|"saves units"| node_course_models
node_content_api -->|"builds syllabus"| node_curriculum
node_assessment_api -->|"manages sessions"| node_assessments
node_assessments -.->|"updates mastery"| node_progress
node_mentor_api -->|"gets guidance"| node_mentor
node_gap_path -.->|"uses session"| node_database
node_progress -.->|"persists progress"| node_database
node_database -->|"registers models"| node_course_models

click node_web "https://github.com/prajwal9591/personalized-learning-ai/tree/main/frontend/app"
click node_api_client "https://github.com/prajwal9591/personalized-learning-ai/blob/main/frontend/lib/api.ts"
click node_session_store "https://github.com/prajwal9591/personalized-learning-ai/blob/main/frontend/lib/storage.ts"
click node_app "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/main.py"
click node_auth_api "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/auth.py"
click node_learning_api "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/learning.py"
click node_discovery_api "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/discovery.py"
click node_content_api "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/content.py"
click node_assessment_api "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/assessment.py"
click node_mentor_api "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/mentor.py"
click node_auth_service "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/auth_service.py"
click node_role_research "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/role_research_service.py"
click node_gap_path "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/learning_path_service.py"
click node_discovery "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/course_discovery_service.py"
click node_curriculum "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/curriculum_crawler.py"
click node_assessments "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/assessment_session.py"
click node_progress "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/progress.py"
click node_mentor "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/mentor.py"
click node_ai_client "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/ai/client.py"
click node_database "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/core/database.py"
click node_course_models "https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/models/course_resource.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_web,node_api_client,node_session_store toneBlue
class node_app,node_auth_api,node_learning_api,node_discovery_api,node_content_api,node_assessment_api,node_mentor_api toneAmber
class node_role_research,node_gap_path,node_assessments,node_progress,node_mentor toneMint
class node_discovery,node_curriculum,node_course_models toneRose
class node_auth_service,node_ai_client,node_database,node_learner toneIndigo
```

## Components

### Learner experience

- [Learning UI](https://github.com/prajwal9591/personalized-learning-ai/tree/main/frontend/app): `frontend/app`
- [REST client](https://github.com/prajwal9591/personalized-learning-ai/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`
- [Session storage](https://github.com/prajwal9591/personalized-learning-ai/blob/main/frontend/lib/storage.ts): `frontend/lib/storage.ts`

### Backend API

- [FastAPI app](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Auth routes](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Learning routes](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/learning.py): `backend/app/api/learning.py`
- [Discovery routes](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/discovery.py): `backend/app/api/discovery.py`
- [Content routes](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/content.py): `backend/app/api/content.py`
- [Assessment routes](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/assessment.py): `backend/app/api/assessment.py`
- [Mentor routes](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/api/mentor.py): `backend/app/api/mentor.py`

### Adaptive learning

- [Role research](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/role_research_service.py): `backend/app/services/role_research_service.py`
- [Gap and roadmap](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/learning_path_service.py): `backend/app/services/learning_path_service.py`
- [Assessment sessions](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/assessment_session.py): `backend/app/services/assessment_session.py`
- [Progress and mastery](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/progress.py): `backend/app/services/progress.py`
- [AI mentor](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/mentor.py): `backend/app/services/mentor.py`

### Learning content

- [Course discovery](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/course_discovery_service.py): `backend/app/services/course_discovery_service.py`
- [Curriculum crawler](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/curriculum_crawler.py): `backend/app/services/curriculum_crawler.py`
- [Course and unit records](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/models/course_resource.py): `backend/app/models/course_resource.py`

### Identity and data

- [Auth service](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Groq client](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/ai/client.py): `backend/app/ai/client.py`
- [Learning database](https://github.com/prajwal9591/personalized-learning-ai/blob/main/backend/app/core/database.py): `backend/app/core/database.py`

### Other components

- **Learner**

## Connections

- Learner → Learning UI: uses (evidence: `README.md`)
- Learning UI → REST client: requests data (evidence: `README.md`)
- REST client → Session storage: reads token (evidence: `frontend/lib/api.ts`)
- REST client → FastAPI app: calls REST (evidence: `README.md`)
- FastAPI app → Auth routes: registers (evidence: `backend/app/main.py`)
- FastAPI app → Learning routes: registers (evidence: `backend/app/main.py`)
- FastAPI app → Discovery routes: registers (evidence: `backend/app/main.py`)
- FastAPI app → Content routes: registers (evidence: `backend/app/main.py`)
- FastAPI app → Assessment routes: registers (evidence: `backend/app/main.py`)
- FastAPI app → Mentor routes: registers (evidence: `backend/app/main.py`)
- Auth routes → Auth service: authenticates (evidence: `backend/app/api/auth.py`)
- Auth service → Learning database: uses session
- Learning routes → Gap and roadmap: builds roadmap (evidence: `backend/app/api/learning.py`)
- Learning routes → Role research: analyzes role
- Role research → Groq client: queries skills (evidence: `backend/app/services/role_research_service.py`)
- Role research → Learning database: reads cache (evidence: `backend/app/services/role_research_service.py`)
- Discovery routes → Course discovery: finds courses (evidence: `backend/app/api/discovery.py`)
- Course discovery → Curriculum crawler: requests crawl (evidence: `backend/app/services/course_discovery_service.py`)
- Course discovery → Course and unit records: stores resources (evidence: `backend/app/services/course_discovery_service.py`)
- Curriculum crawler → Course and unit records: saves units (evidence: `backend/app/services/curriculum_crawler.py`)
- Content routes → Curriculum crawler: builds syllabus (evidence: `backend/app/api/content.py`)
- Assessment routes → Assessment sessions: manages sessions (evidence: `backend/app/api/assessment.py`)
- Assessment sessions → Progress and mastery: updates mastery (evidence: `README.md`)
- Mentor routes → AI mentor: gets guidance (evidence: `backend/app/api/mentor.py`)
- Gap and roadmap → Learning database: uses session
- Progress and mastery → Learning database: persists progress
- Learning database → Course and unit records: registers models (evidence: `backend/app/core/database.py`)
