# bkshgtm/personalizedadaptivelearning architecture

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

- Interactive diagram: https://gitdiagram.com/bkshgtm/personalizedadaptivelearning
- Repository: https://github.com/bkshgtm/personalizedadaptivelearning

## Overview

PAL 2.0 is a Django personalized-learning system. Its central user-to-result loop is student interaction and course data, knowledge-tracing predictions, then individualized learning paths and resource suggestions. Separate capabilities cover document/content ingestion, topic classification, knowledge-graph management, and educator analytics through the REST API. The graph emphasizes those product stages and their data models. Some connections are documented in the README or SOURCE INDEX rather than shown in excerpts; uncertain wiring is omitted rather than inferred.

Main entry points: [`learning_paths/ml/adaptive_path_lstm.py`](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/learning_paths/ml/adaptive_path_lstm.py) (Adaptive Path Generator), [`api/views.py`](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/api/views.py) (REST API), [`ml_models/tasks.py`](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/tasks.py) (Training and Prediction Tasks), [`data_ingestion/services/document_processor.py`](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/services/document_processor.py) (Document Processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Learning Experience"]
  node_learning_data[("Learning Records<br/>[models.py]")]
  node_answer_validation["Answer Validation"]
  node_path_data[("Path and Recommendation Data<br/>[models.py]")]
  node_path_generator["Adaptive Path Generator"]
  node_path_tasks["Path Generation Tasks<br/>[tasks.py]"]
end

subgraph group_prediction["Knowledge Tracing"]
  node_tracing_data[("Tracing Jobs and Mastery<br/>[models.py]")]
  node_data_prep["Interaction Preparation"]
  node_dkt["DKT Model<br/>[dkt.py]"]
  node_sakt["SAKT Model<br/>[sakt.py]"]
  node_training["Training and Prediction Tasks<br/>[tasks.py]"]
  node_evaluation["Model Evaluation"]
end

subgraph group_content["Content and Curriculum"]
  node_graph_data[("Knowledge Graph Data<br/>[models.py]")]
  node_graph_ops["Graph Operations"]
  node_uploads[("Upload Records<br/>[models.py]")]
  node_document_processing["Document Processing"]
  node_csv_processing["CSV Processing<br/>[csv_processor.py]"]
  node_ingestion_tasks["Ingestion Tasks<br/>[tasks.py]"]
  node_classification["Topic Classification"]
  node_classification_tasks["Classification Tasks<br/>[tasks.py]"]
  node_classification_data[("Classification Jobs<br/>[models.py]")]
end

subgraph group_integration["API and Analytics"]
  node_api["REST API<br/>[views.py]"]
end

node_students(("Students"))
node_dissect{{"Dissect Service"}}

node_students -.->|"use"| node_api
node_api -->|"reads and writes"| node_learning_data
node_api -->|"dispatches"| node_tracing_data
node_api -->|"dispatches"| node_path_data
node_api -->|"calls"| node_answer_validation
node_answer_validation -->|"reads"| node_learning_data
node_training -->|"prepares data"| node_data_prep
node_training -->|"trains"| node_dkt
node_training -->|"trains"| node_sakt
node_training -->|"updates jobs"| node_tracing_data
node_dkt -->|"evaluates with"| node_evaluation
node_sakt -->|"evaluates with"| node_evaluation
node_path_tasks -->|"delegates to"| node_path_generator
node_path_generator -->|"uses"| node_data_prep
node_path_generator -->|"reads"| node_learning_data
node_path_generator -.->|"uses"| node_graph_data
node_path_generator -.->|"generates recommendations"| node_path_data
node_graph_ops -->|"queries"| node_graph_data
node_ingestion_tasks -->|"calls"| node_document_processing
node_ingestion_tasks -->|"calls"| node_csv_processing
node_ingestion_tasks -->|"updates status"| node_uploads
node_document_processing -->|"reads and writes"| node_uploads
node_document_processing -->|"uses"| node_answer_validation
node_document_processing -->|"calls"| node_dissect
node_classification_tasks -->|"uses"| node_classification
node_classification_tasks -->|"updates"| node_classification_data
node_classification -->|"configures from"| node_classification_data
node_classification -.->|"optional integration"| node_dissect

click node_api "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/api/views.py"
click node_learning_data "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/core/models.py"
click node_answer_validation "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/core/services/answer_validation.py"
click node_tracing_data "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/models.py"
click node_data_prep "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/ml/django_data_preparation.py"
click node_dkt "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/ml/dkt.py"
click node_sakt "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/ml/sakt.py"
click node_training "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/tasks.py"
click node_evaluation "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/ml/evaluation_metrics.py"
click node_graph_data "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/knowledge_graph/models.py"
click node_graph_ops "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/knowledge_graph/services/graph_operations.py"
click node_path_data "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/learning_paths/models.py"
click node_path_generator "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/learning_paths/ml/adaptive_path_lstm.py"
click node_path_tasks "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/learning_paths/tasks.py"
click node_uploads "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/models.py"
click node_document_processing "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/services/document_processor.py"
click node_csv_processing "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/services/csv_processor.py"
click node_ingestion_tasks "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/tasks.py"
click node_classification "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/topic_classification/services/classifier_factory.py"
click node_classification_tasks "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/topic_classification/tasks.py"
click node_classification_data "https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/topic_classification/models.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_learning_data,node_answer_validation,node_path_data,node_path_generator,node_path_tasks toneBlue
class node_tracing_data,node_data_prep,node_dkt,node_sakt,node_training,node_evaluation toneAmber
class node_graph_data,node_graph_ops,node_uploads,node_document_processing,node_csv_processing,node_ingestion_tasks,node_classification,node_classification_tasks,node_classification_data toneMint
class node_api toneRose
class node_students,node_dissect toneIndigo
```

## Components

### Learning Experience

- [Learning Records](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/core/models.py): `core/models.py`
- [Answer Validation](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/core/services/answer_validation.py): `core/services/answer_validation.py`
- [Path and Recommendation Data](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/learning_paths/models.py): `learning_paths/models.py`
- [Adaptive Path Generator](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/learning_paths/ml/adaptive_path_lstm.py): `learning_paths/ml/adaptive_path_lstm.py`
- [Path Generation Tasks](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/learning_paths/tasks.py): `learning_paths/tasks.py`

### Knowledge Tracing

- [Tracing Jobs and Mastery](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/models.py): `ml_models/models.py`
- [Interaction Preparation](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/ml/django_data_preparation.py): `ml_models/ml/django_data_preparation.py`
- [DKT Model](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/ml/dkt.py): `ml_models/ml/dkt.py`
- [SAKT Model](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/ml/sakt.py): `ml_models/ml/sakt.py`
- [Training and Prediction Tasks](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/tasks.py): `ml_models/tasks.py`
- [Model Evaluation](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/ml_models/ml/evaluation_metrics.py): `ml_models/ml/evaluation_metrics.py`

### Content and Curriculum

- [Knowledge Graph Data](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/knowledge_graph/models.py): `knowledge_graph/models.py`
- [Graph Operations](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/knowledge_graph/services/graph_operations.py): `knowledge_graph/services/graph_operations.py`
- [Upload Records](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/models.py): `data_ingestion/models.py`
- [Document Processing](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/services/document_processor.py): `data_ingestion/services/document_processor.py`
- [CSV Processing](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/services/csv_processor.py): `data_ingestion/services/csv_processor.py`
- [Ingestion Tasks](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/data_ingestion/tasks.py): `data_ingestion/tasks.py`
- [Topic Classification](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/topic_classification/services/classifier_factory.py): `topic_classification/services/classifier_factory.py`
- [Classification Tasks](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/topic_classification/tasks.py): `topic_classification/tasks.py`
- [Classification Jobs](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/topic_classification/models.py): `topic_classification/models.py`

### API and Analytics

- [REST API](https://github.com/bkshgtm/personalizedadaptivelearning/blob/master/api/views.py): `api/views.py`

### Other components

- **Students**
- **Dissect Service**

## Connections

- Students → REST API: use
- REST API → Learning Records: reads and writes (evidence: `api/views.py`)
- REST API → Tracing Jobs and Mastery: dispatches (evidence: `api/views.py`)
- REST API → Path and Recommendation Data: dispatches (evidence: `api/views.py`)
- REST API → Answer Validation: calls (evidence: `api/views.py`)
- Answer Validation → Learning Records: reads (evidence: `core/services/answer_validation.py`)
- Training and Prediction Tasks → Interaction Preparation: prepares data (evidence: `ml_models/tasks.py`)
- Training and Prediction Tasks → DKT Model: trains (evidence: `ml_models/tasks.py`)
- Training and Prediction Tasks → SAKT Model: trains (evidence: `ml_models/tasks.py`)
- Training and Prediction Tasks → Tracing Jobs and Mastery: updates jobs (evidence: `ml_models/tasks.py`)
- DKT Model → Model Evaluation: evaluates with (evidence: `ml_models/ml/dkt.py`)
- SAKT Model → Model Evaluation: evaluates with (evidence: `ml_models/ml/sakt.py`)
- Path Generation Tasks → Adaptive Path Generator: delegates to (evidence: `learning_paths/tasks.py`)
- Adaptive Path Generator → Interaction Preparation: uses (evidence: `learning_paths/ml/adaptive_path_lstm.py`)
- Adaptive Path Generator → Learning Records: reads (evidence: `learning_paths/ml/adaptive_path_lstm.py`)
- Adaptive Path Generator → Knowledge Graph Data: uses (evidence: `learning_paths/ml/adaptive_path_lstm.py`)
- Adaptive Path Generator → Path and Recommendation Data: generates recommendations
- Graph Operations → Knowledge Graph Data: queries (evidence: `knowledge_graph/services/graph_operations.py`)
- Ingestion Tasks → Document Processing: calls (evidence: `data_ingestion/tasks.py`)
- Ingestion Tasks → CSV Processing: calls (evidence: `data_ingestion/tasks.py`)
- Ingestion Tasks → Upload Records: updates status (evidence: `data_ingestion/tasks.py`)
- Document Processing → Upload Records: reads and writes (evidence: `data_ingestion/services/document_processor.py`)
- Document Processing → Answer Validation: uses (evidence: `data_ingestion/services/document_processor.py`)
- Document Processing → Dissect Service: calls (evidence: `data_ingestion/services/document_processor.py`)
- Classification Tasks → Topic Classification: uses (evidence: `topic_classification/tasks.py`)
- Classification Tasks → Classification Jobs: updates (evidence: `topic_classification/tasks.py`)
- Topic Classification → Classification Jobs: configures from (evidence: `topic_classification/services/classifier_factory.py`)
- Topic Classification → Dissect Service: optional integration
