# ahadiprince1757-gif/shifter architecture

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

- Interactive diagram: https://gitdiagram.com/ahadiprince1757-gif/shifter
- Repository: https://github.com/ahadiprince1757-gif/shifter

## Overview

Tixar is an educational learning product with curriculum content, answer checking, diagnostic feedback, and personalized learning intelligence. Its diagnostic workflow parses a learner’s response, extracts evidence, resolves a skill, reasons about errors, detects misconceptions, plans a repair, and synthesizes feedback; the Python orchestrator explicitly owns those stages. The frontend also has a separate JavaScript diagnostic engine and offline content/sync capabilities, while the backend exposes grading, curriculum, and analytics services. Some frontend routing and subsystem wiring were not sampled, so uncertain links are omitted or marked unverified.

Main entry points: [`engine/orchestrator.py`](https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/orchestrator.py) (Reasoning Orchestrator), [`frontend/src/sync/syncEngine.js`](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/sync/syncEngine.js) (Offline Sync), [`frontend/src/diagnostics/engine/diagnosticEngine.js`](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/engine/diagnosticEngine.js) (Diagnostic Engine), [`backend/app.js`](https://github.com/ahadiprince1757-gif/shifter/blob/main/backend/app.js) (Backend API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning Experience"]
  node_frontend_entry["Web Application<br/>[App.jsx]"]
  node_submission["Answer Submission<br/>[SubmitAnswer.js]"]
  node_engine_bridge["Engine Bridge<br/>[engineBridge.js]"]
end

subgraph group_diagnostics["Diagnosis and Repair"]
  node_frontend_diagnosis["Diagnostic Engine"]
  node_teacher_diagnoser["Teacher Diagnoser"]
  node_step_analysis["Step Analysis<br/>[stepAnalyzer.js]"]
  node_misconceptions["Misconception Knowledge"]
  node_python_api["Diagnostic API<br/>[main.py]"]
  node_orchestrator["Reasoning Orchestrator<br/>[orchestrator.py]"]
  node_parser["Response Parser<br/>[parser.py]"]
  node_skill_resolver["Skill Resolver<br/>[skills.py]"]
  node_misconception_detector["Misconception Detector<br/>[misconceptions.py]"]
  node_repair_planner["Repair Planner<br/>[planner.py]"]
  node_response_synthesizer["Feedback Synthesizer<br/>[synthesizer.py]"]
end

subgraph group_intelligence["Learning Intelligence"]
  node_backend_api["Backend API<br/>[app.js]"]
  node_intelligence_service["Intelligence Service"]
  node_skill_ontology["Skill Ontology<br/>[skillOntology.js]"]
end

subgraph group_content["Curriculum and Content"]
  node_local_search["Local Search"]
  node_content_loader["Content Loader<br/>[contentLoader.js]"]
  node_subject_content["Subject Content"]
  node_local_database[("Local Database<br/>[db.js]")]
  node_sync_engine["Offline Sync<br/>[syncEngine.js]"]
end

node_learner(("Learner"))
node_supabase[("Supabase")]

node_learner -.->|"submits answer"| node_submission
node_submission -.->|"requests diagnosis"| node_engine_bridge
node_engine_bridge -->|"delegates to"| node_teacher_diagnoser
node_teacher_diagnoser -->|"uses"| node_frontend_diagnosis
node_frontend_diagnosis -->|"analyzes steps"| node_step_analysis
node_frontend_diagnosis -->|"checks knowledge"| node_misconceptions
node_python_api -->|"invokes"| node_orchestrator
node_orchestrator -->|"parses response"| node_parser
node_orchestrator -->|"resolves skill"| node_skill_resolver
node_orchestrator -->|"detects misconception"| node_misconception_detector
node_orchestrator -->|"plans repair"| node_repair_planner
node_orchestrator -->|"synthesizes feedback"| node_response_synthesizer
node_backend_api -->|"requests intelligence"| node_intelligence_service
node_intelligence_service -->|"uses ontology"| node_skill_ontology
node_local_search -->|"reads"| node_local_database
node_content_loader -->|"loads subjects"| node_subject_content
node_content_loader -->|"loads data"| node_local_database
node_sync_engine -->|"loads bundled topics"| node_content_loader
node_sync_engine -->|"stores topics"| node_local_database
node_sync_engine -.->|"syncs remotely"| node_backend_api
node_backend_api -.->|"reads and writes"| node_supabase

click node_frontend_entry "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/App.jsx"
click node_submission "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/application/use-cases/SubmitAnswer.js"
click node_engine_bridge "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/services/engineBridge.js"
click node_frontend_diagnosis "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/engine/diagnosticEngine.js"
click node_teacher_diagnoser "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/teacherDiagnoser.js"
click node_step_analysis "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/analyzers/stepAnalyzer.js"
click node_misconceptions "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/knowledge/subjectMisconceptions.js"
click node_python_api "https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/api/main.py"
click node_orchestrator "https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/orchestrator.py"
click node_parser "https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/core/parser.py"
click node_skill_resolver "https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/core/skills.py"
click node_misconception_detector "https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/knowledge/misconceptions.py"
click node_repair_planner "https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/repair/planner.py"
click node_response_synthesizer "https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/response/synthesizer.py"
click node_backend_api "https://github.com/ahadiprince1757-gif/shifter/blob/main/backend/app.js"
click node_intelligence_service "https://github.com/ahadiprince1757-gif/shifter/blob/main/backend/services/intelligenceService.js"
click node_skill_ontology "https://github.com/ahadiprince1757-gif/shifter/blob/main/backend/services/skillOntology.js"
click node_local_search "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/utils/LocalSearchEngine.js"
click node_content_loader "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/data/contentLoader.js"
click node_subject_content "https://github.com/ahadiprince1757-gif/shifter/tree/main/frontend/src/data"
click node_local_database "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/db/db.js"
click node_sync_engine "https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/sync/syncEngine.js"

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_frontend_entry,node_submission,node_engine_bridge toneBlue
class node_frontend_diagnosis,node_teacher_diagnoser,node_step_analysis,node_misconceptions,node_python_api,node_orchestrator,node_parser,node_skill_resolver,node_misconception_detector,node_repair_planner,node_response_synthesizer,node_supabase toneAmber
class node_backend_api,node_intelligence_service,node_skill_ontology toneMint
class node_local_search,node_content_loader,node_subject_content,node_local_database,node_sync_engine toneRose
class node_learner toneIndigo
```

## Components

### Learning Experience

- [Web Application](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Answer Submission](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/application/use-cases/SubmitAnswer.js): `frontend/src/application/use-cases/SubmitAnswer.js`
- [Engine Bridge](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/services/engineBridge.js): `frontend/src/services/engineBridge.js`

### Diagnosis and Repair

- [Diagnostic Engine](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/engine/diagnosticEngine.js): `frontend/src/diagnostics/engine/diagnosticEngine.js`
- [Teacher Diagnoser](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/teacherDiagnoser.js): `frontend/src/diagnostics/teacherDiagnoser.js`
- [Step Analysis](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/analyzers/stepAnalyzer.js): `frontend/src/diagnostics/analyzers/stepAnalyzer.js`
- [Misconception Knowledge](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/diagnostics/knowledge/subjectMisconceptions.js): `frontend/src/diagnostics/knowledge/subjectMisconceptions.js`
- [Diagnostic API](https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/api/main.py): `engine/api/main.py`
- [Reasoning Orchestrator](https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/orchestrator.py): `engine/orchestrator.py`
- [Response Parser](https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/core/parser.py): `engine/core/parser.py`
- [Skill Resolver](https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/core/skills.py): `engine/core/skills.py`
- [Misconception Detector](https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/knowledge/misconceptions.py): `engine/knowledge/misconceptions.py`
- [Repair Planner](https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/repair/planner.py): `engine/repair/planner.py`
- [Feedback Synthesizer](https://github.com/ahadiprince1757-gif/shifter/blob/main/engine/response/synthesizer.py): `engine/response/synthesizer.py`

### Learning Intelligence

- [Backend API](https://github.com/ahadiprince1757-gif/shifter/blob/main/backend/app.js): `backend/app.js`
- [Intelligence Service](https://github.com/ahadiprince1757-gif/shifter/blob/main/backend/services/intelligenceService.js): `backend/services/intelligenceService.js`
- [Skill Ontology](https://github.com/ahadiprince1757-gif/shifter/blob/main/backend/services/skillOntology.js): `backend/services/skillOntology.js`

### Curriculum and Content

- [Local Search](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/utils/LocalSearchEngine.js): `frontend/src/utils/LocalSearchEngine.js`
- [Content Loader](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/data/contentLoader.js): `frontend/src/data/contentLoader.js`
- [Subject Content](https://github.com/ahadiprince1757-gif/shifter/tree/main/frontend/src/data): `frontend/src/data`
- [Local Database](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/db/db.js): `frontend/src/db/db.js`
- [Offline Sync](https://github.com/ahadiprince1757-gif/shifter/blob/main/frontend/src/sync/syncEngine.js): `frontend/src/sync/syncEngine.js`

### Other components

- **Learner**
- **Supabase**

## Connections

- Learner → Answer Submission: submits answer
- Answer Submission → Engine Bridge: requests diagnosis
- Engine Bridge → Teacher Diagnoser: delegates to (evidence: `frontend/src/services/engineBridge.js`)
- Teacher Diagnoser → Diagnostic Engine: uses (evidence: `frontend/src/diagnostics/teacherDiagnoser.js`)
- Diagnostic Engine → Step Analysis: analyzes steps (evidence: `frontend/src/diagnostics/engine/diagnosticEngine.js`)
- Diagnostic Engine → Misconception Knowledge: checks knowledge (evidence: `frontend/src/diagnostics/engine/diagnosticEngine.js`)
- Diagnostic API → Reasoning Orchestrator: invokes (evidence: `engine/api/main.py`)
- Reasoning Orchestrator → Response Parser: parses response (evidence: `engine/orchestrator.py`)
- Reasoning Orchestrator → Skill Resolver: resolves skill (evidence: `engine/orchestrator.py`)
- Reasoning Orchestrator → Misconception Detector: detects misconception (evidence: `engine/orchestrator.py`)
- Reasoning Orchestrator → Repair Planner: plans repair (evidence: `engine/orchestrator.py`)
- Reasoning Orchestrator → Feedback Synthesizer: synthesizes feedback (evidence: `engine/orchestrator.py`)
- Backend API → Intelligence Service: requests intelligence (evidence: `backend/app.js`)
- Intelligence Service → Skill Ontology: uses ontology (evidence: `backend/services/intelligenceService.js`)
- Local Search → Local Database: reads (evidence: `frontend/src/utils/LocalSearchEngine.js`)
- Content Loader → Subject Content: loads subjects (evidence: `frontend/src/data/contentLoader.js`)
- Content Loader → Local Database: loads data (evidence: `frontend/src/data/contentLoader.js`)
- Offline Sync → Content Loader: loads bundled topics (evidence: `frontend/src/sync/syncEngine.js`)
- Offline Sync → Local Database: stores topics (evidence: `frontend/src/sync/syncEngine.js`)
- Offline Sync → Backend API: syncs remotely
- Backend API → Supabase: reads and writes
