# gallikattip-pixel/adaptive-learning architecture

> Architecture diagram of the GitHub repository gallikattip-pixel/adaptive-learning, 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/gallikattip-pixel/adaptive-learning
- Repository: https://github.com/gallikattip-pixel/adaptive-learning

## Overview

This repository implements an adaptive-learning product: students authenticate, complete diagnostics, and view personalized skills, pathways, practice, and progress. The browser UI calls an Express backend, which combines assessment and student-state services with a five-model ML gateway to produce learning plans. The gateway’s orchestration and model stages are shown from sampled source. Many route handlers and UI sections are only indexed, so uncertain connections are omitted or marked unverified; the README is a Vite template and documents no product capabilities.

Main entry points: [`ML-SYSTEM/ml-gateway/orchestrator/pipeline.py`](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/orchestrator/pipeline.py) (Plan orchestrator), [`backend/src/services/prerequisiteEngine.ts`](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/prerequisiteEngine.ts) (Prerequisite engine), [`src/routes/AppRoutes.tsx`](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/routes/AppRoutes.tsx) (Web routes), [`src/pages/student/StudentDashboardPage.tsx`](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/pages/student/StudentDashboardPage.tsx) (Student dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Student experience"]
  node_webapp["Web routes<br/>[AppRoutes.tsx]"]
  node_authui["Authentication UI"]
  node_authhook["Auth state<br/>[useAuth.ts]"]
  node_authservice["Auth client<br/>[authService.ts]"]
  node_dashboard["Student dashboard"]
  node_overview["Learning overview"]
  node_api["API client<br/>[apiClient.ts]"]
end

subgraph group_backend["Application backend"]
  node_express["Express server<br/>[server.ts]"]
  node_routes["API routes"]
end

subgraph group_learning["Learning services"]
  node_assess["Assessment service"]
  node_assessmentdata[("Assessment repository")]
  node_state["Student state aggregation<br/>[stateAggregator.ts]"]
  node_prereq["Prerequisite engine"]
  node_youtube["Video resources<br/>[youtubeService.ts]"]
  node_mlbackend["ML gateway client<br/>[mlGateway.ts]"]
end

subgraph group_gateway["ML gateway"]
  node_gatewayapp["Gateway API<br/>[app.py]"]
  node_pipeline["Plan orchestrator<br/>[pipeline.py]"]
  node_interest["Interest model<br/>[model5_adapter.py]"]
  node_gaps["Skill-gap model<br/>[model1_adapter.py]"]
  node_mastery["Mastery model<br/>[model2_adapter.py]"]
  node_recommend["Recommendation model<br/>[model3_adapter.py]"]
  node_risk["Risk model<br/>[model4_adapter.py]"]
  node_contracts["Plan contracts<br/>[contracts.py]"]
end

node_student(("Student"))

node_student -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_authui
node_webapp -->|"routes to"| node_dashboard
node_authui -.->|"uses auth state"| node_authhook
node_authhook -->|"delegates to"| node_authservice
node_authservice -->|"calls"| node_api
node_dashboard -->|"requests data"| node_api
node_dashboard -->|"renders"| node_overview
node_api -.->|"HTTP requests"| node_express
node_express -->|"mounts"| node_routes
node_routes -.->|"dispatches"| node_assess
node_assess -->|"reads and writes"| node_assessmentdata
node_prereq -->|"builds student input"| node_state
node_prereq -->|"requests plan"| node_mlbackend
node_prereq -.->|"reads assessment data"| node_assessmentdata
node_gatewayapp -->|"invokes"| node_pipeline
node_pipeline -->|"predicts"| node_interest
node_pipeline -->|"predicts"| node_gaps
node_pipeline -->|"predicts"| node_mastery
node_pipeline -->|"predicts"| node_recommend
node_pipeline -->|"predicts"| node_risk
node_pipeline -->|"returns plan"| node_contracts
node_mlbackend -.->|"HTTP integration"| node_gatewayapp

click node_webapp "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/routes/AppRoutes.tsx"
click node_authui "https://github.com/gallikattip-pixel/adaptive-learning/tree/main/src/pages/auth"
click node_authhook "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/hooks/useAuth.ts"
click node_authservice "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/services/auth/authService.ts"
click node_dashboard "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/pages/student/StudentDashboardPage.tsx"
click node_overview "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/components/student/OverviewSection.tsx"
click node_api "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/services/api/apiClient.ts"
click node_express "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/server.ts"
click node_routes "https://github.com/gallikattip-pixel/adaptive-learning/tree/main/backend/src/routes"
click node_assess "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/diagnosticService.ts"
click node_assessmentdata "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/repositories/assessmentRepository.ts"
click node_state "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/stateAggregator.ts"
click node_prereq "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/prerequisiteEngine.ts"
click node_youtube "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/youtubeService.ts"
click node_mlbackend "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/mlGateway.ts"
click node_gatewayapp "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/app.py"
click node_pipeline "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/orchestrator/pipeline.py"
click node_interest "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model5_adapter.py"
click node_gaps "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model1_adapter.py"
click node_mastery "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model2_adapter.py"
click node_recommend "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model3_adapter.py"
click node_risk "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model4_adapter.py"
click node_contracts "https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/schemas/contracts.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_webapp,node_authui,node_authhook,node_authservice,node_dashboard,node_overview,node_api toneBlue
class node_express,node_routes toneAmber
class node_assess,node_assessmentdata,node_state,node_prereq,node_youtube,node_mlbackend toneMint
class node_gatewayapp,node_pipeline,node_interest,node_gaps,node_mastery,node_recommend,node_risk,node_contracts toneRose
class node_student toneIndigo
```

## Components

### Student experience

- [Web routes](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/routes/AppRoutes.tsx): `src/routes/AppRoutes.tsx`
- [Authentication UI](https://github.com/gallikattip-pixel/adaptive-learning/tree/main/src/pages/auth): `src/pages/auth`
- [Auth state](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/hooks/useAuth.ts): `src/hooks/useAuth.ts`
- [Auth client](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/services/auth/authService.ts): `src/services/auth/authService.ts`
- [Student dashboard](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/pages/student/StudentDashboardPage.tsx): `src/pages/student/StudentDashboardPage.tsx`
- [Learning overview](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/components/student/OverviewSection.tsx): `src/components/student/OverviewSection.tsx`
- [API client](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/src/services/api/apiClient.ts): `src/services/api/apiClient.ts`

### Application backend

- [Express server](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/server.ts): `backend/src/server.ts`
- [API routes](https://github.com/gallikattip-pixel/adaptive-learning/tree/main/backend/src/routes): `backend/src/routes`

### Learning services

- [Assessment service](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/diagnosticService.ts): `backend/src/services/diagnosticService.ts`
- [Assessment repository](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/repositories/assessmentRepository.ts): `backend/src/repositories/assessmentRepository.ts`
- [Student state aggregation](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/stateAggregator.ts): `backend/src/services/stateAggregator.ts`
- [Prerequisite engine](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/prerequisiteEngine.ts): `backend/src/services/prerequisiteEngine.ts`
- [Video resources](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/youtubeService.ts): `backend/src/services/youtubeService.ts`
- [ML gateway client](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/backend/src/services/mlGateway.ts): `backend/src/services/mlGateway.ts`

### ML gateway

- [Gateway API](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/app.py): `ML-SYSTEM/ml-gateway/app.py`
- [Plan orchestrator](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/orchestrator/pipeline.py): `ML-SYSTEM/ml-gateway/orchestrator/pipeline.py`
- [Interest model](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model5_adapter.py): `ML-SYSTEM/ml-gateway/adapters/model5_adapter.py`
- [Skill-gap model](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model1_adapter.py): `ML-SYSTEM/ml-gateway/adapters/model1_adapter.py`
- [Mastery model](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model2_adapter.py): `ML-SYSTEM/ml-gateway/adapters/model2_adapter.py`
- [Recommendation model](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model3_adapter.py): `ML-SYSTEM/ml-gateway/adapters/model3_adapter.py`
- [Risk model](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/adapters/model4_adapter.py): `ML-SYSTEM/ml-gateway/adapters/model4_adapter.py`
- [Plan contracts](https://github.com/gallikattip-pixel/adaptive-learning/blob/main/ML-SYSTEM/ml-gateway/schemas/contracts.py): `ML-SYSTEM/ml-gateway/schemas/contracts.py`

### Other components

- **Student**

## Connections

- Student → Web routes: uses (evidence: `src/routes/AppRoutes.tsx`)
- Web routes → Authentication UI: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Web routes → Student dashboard: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Authentication UI → Auth state: uses auth state (evidence: `src/pages/auth/SignUpPage.tsx`)
- Auth state → Auth client: delegates to (evidence: `src/hooks/useAuth.ts`)
- Auth client → API client: calls (evidence: `src/services/auth/authService.ts`)
- Student dashboard → API client: requests data (evidence: `src/pages/student/StudentDashboardPage.tsx`)
- Student dashboard → Learning overview: renders (evidence: `src/pages/student/StudentDashboardPage.tsx`)
- API client → Express server: HTTP requests
- Express server → API routes: mounts (evidence: `backend/src/server.ts`)
- API routes → Assessment service: dispatches
- Assessment service → Assessment repository: reads and writes (evidence: `backend/src/services/diagnosticService.ts`)
- Prerequisite engine → Student state aggregation: builds student input (evidence: `backend/src/services/prerequisiteEngine.ts`)
- Prerequisite engine → ML gateway client: requests plan (evidence: `backend/src/services/prerequisiteEngine.ts`)
- Prerequisite engine → Assessment repository: reads assessment data
- Gateway API → Plan orchestrator: invokes (evidence: `ML-SYSTEM/ml-gateway/app.py`)
- Plan orchestrator → Interest model: predicts (evidence: `ML-SYSTEM/ml-gateway/orchestrator/pipeline.py`)
- Plan orchestrator → Skill-gap model: predicts (evidence: `ML-SYSTEM/ml-gateway/orchestrator/pipeline.py`)
- Plan orchestrator → Mastery model: predicts (evidence: `ML-SYSTEM/ml-gateway/orchestrator/pipeline.py`)
- Plan orchestrator → Recommendation model: predicts (evidence: `ML-SYSTEM/ml-gateway/orchestrator/pipeline.py`)
- Plan orchestrator → Risk model: predicts (evidence: `ML-SYSTEM/ml-gateway/orchestrator/pipeline.py`)
- Plan orchestrator → Plan contracts: returns plan (evidence: `ML-SYSTEM/ml-gateway/orchestrator/pipeline.py`)
- ML gateway client → Gateway API: HTTP integration
