# pivasya/taskforge architecture

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

- Interactive diagram: https://gitdiagram.com/pivasya/taskforge
- Repository: https://github.com/pivasya/taskforge

## Overview

TaskForge is a learning and coding platform: learners use its React apps to browse courses, solve tasks, and submit code for asynchronous judging. The README documents the durable submission path and major browser, AI-agent, SQL/image-task, Minecraft, and high-availability capabilities. The graph combines those documented relationships with the sampled frontend query-cache and browser-service wiring; unsampled subsystems are represented at supported directory or entry-point paths, without inferring internal calls.

Main entry points: [`apps/web/src/App.jsx`](https://github.com/pivasya/taskforge/blob/develop/apps/web/src/App.jsx) (Web application), [`services/execution`](https://github.com/pivasya/taskforge/tree/develop/services/execution) (Execution worker), [`services/solutions/api/Program.cs`](https://github.com/pivasya/taskforge/blob/develop/services/solutions/api/Program.cs) (Solution submissions), [`services/tasks/assignment-api/Program.cs`](https://github.com/pivasya/taskforge/blob/develop/services/tasks/assignment-api/Program.cs) (Assignment API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_web["Web application<br/>[App.jsx]"]
  node_ctweb["CT learning app<br/>[App.jsx]"]
  node_query[("Query cache<br/>[queryClient.js]")]
  node_queryprovider["Query provider"]
  node_queryhook["Query hook<br/>[useQuery.js]"]
  node_education["Courses and tasks<br/>[Program.cs]"]
  node_content["Learning content<br/>[Program.cs]"]
end

subgraph group_judging["Submission and judging"]
  node_solutions["Solution submissions<br/>[Program.cs]"]
  node_execution["Execution worker"]
  node_analyzer["Code analyzer<br/>[main.rs]"]
  node_runners["Language runners"]
  node_assignmentapi["Assignment API<br/>[Program.cs]"]
  node_taskdb[("Task data<br/>[TasksDbContext.cs]")]
end

subgraph group_platform["Platform services"]
  node_browser["Browser API<br/>[Program.cs]"]
  node_browseragent(("Automated agent"))
  node_aiapi["AI API<br/>[Program.cs]"]
  node_aiworker["AI worker<br/>[Program.cs]"]
  node_files["Files API<br/>[Program.cs]"]
end

subgraph group_operations["Integrations and operations"]
  node_minecraft["Minecraft API<br/>[Program.cs]"]
  node_mobplugin["Mob tweaks plugin"]
  node_cluster["Cluster manager<br/>[manager.py]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_web
node_learner -.->|"uses"| node_ctweb
node_web -->|"provides cache"| node_queryprovider
node_queryprovider -->|"creates client"| node_query
node_queryhook -->|"uses client"| node_queryprovider
node_queryhook -->|"fetches and observes"| node_query
node_web -.->|"browses courses"| node_education
node_education -.->|"loads learning content"| node_content
node_learner -->|"submits solution"| node_solutions
node_solutions -->|"creates execution job"| node_execution
node_execution -->|"checks submission"| node_analyzer
node_execution -->|"runs code"| node_runners
node_execution -->|"returns verdict"| node_solutions
node_web -.->|"uses task APIs"| node_assignmentapi
node_assignmentapi -.->|"persists task data"| node_taskdb
node_browseragent -->|"discovers and inspects"| node_browser
node_browser -->|"renders deployed app"| node_web
node_browseragent -->|"submits through APIs"| node_solutions
node_web -.->|"uses agent features"| node_aiapi
node_aiapi -.->|"delegates agent work"| node_aiworker
node_assignmentapi -->|"stores image assets"| node_files
node_minecraft -->|"delivers link codes"| node_mobplugin
node_cluster -->|"manages HA nodes"| node_cluster

click node_web "https://github.com/pivasya/taskforge/blob/develop/apps/web/src/App.jsx"
click node_ctweb "https://github.com/pivasya/taskforge/blob/develop/apps/web-ct/src/App.jsx"
click node_query "https://github.com/pivasya/taskforge/blob/develop/apps/web/src/data/queryClient.js"
click node_queryprovider "https://github.com/pivasya/taskforge/blob/develop/apps/web/src/data/QueryClientProvider.jsx"
click node_queryhook "https://github.com/pivasya/taskforge/blob/develop/apps/web/src/hooks/useQuery.js"
click node_education "https://github.com/pivasya/taskforge/blob/develop/services/education/api/Program.cs"
click node_content "https://github.com/pivasya/taskforge/blob/develop/services/content/api/Program.cs"
click node_solutions "https://github.com/pivasya/taskforge/blob/develop/services/solutions/api/Program.cs"
click node_execution "https://github.com/pivasya/taskforge/tree/develop/services/execution"
click node_analyzer "https://github.com/pivasya/taskforge/blob/develop/services/analyzers/code-analyzer/src/main.rs"
click node_runners "https://github.com/pivasya/taskforge/tree/develop/services/execution/runners"
click node_assignmentapi "https://github.com/pivasya/taskforge/blob/develop/services/tasks/assignment-api/Program.cs"
click node_taskdb "https://github.com/pivasya/taskforge/blob/develop/services/tasks/assignment-api/Data/TasksDbContext.cs"
click node_browser "https://github.com/pivasya/taskforge/blob/develop/services/browser/api/Program.cs"
click node_aiapi "https://github.com/pivasya/taskforge/blob/develop/services/ai/api/Program.cs"
click node_aiworker "https://github.com/pivasya/taskforge/blob/develop/services/ai/worker/Program.cs"
click node_files "https://github.com/pivasya/taskforge/blob/develop/services/files/api/Program.cs"
click node_minecraft "https://github.com/pivasya/taskforge/blob/develop/services/minecraft/api/Program.cs"
click node_mobplugin "https://github.com/pivasya/taskforge/blob/develop/plugins/minecraft/minecraft-plugin-folia/CustomMobTweaksPlugin/src/main/java/me/vasya/custommobtweaks/CustomMobTweaksPlugin.java"
click node_cluster "https://github.com/pivasya/taskforge/blob/develop/deploy/cluster/manager.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_ctweb,node_query,node_queryprovider,node_queryhook,node_education,node_content toneBlue
class node_solutions,node_execution,node_analyzer,node_runners,node_assignmentapi,node_taskdb toneAmber
class node_browser,node_browseragent,node_aiapi,node_aiworker,node_files toneMint
class node_minecraft,node_mobplugin,node_cluster toneRose
class node_learner toneIndigo
```

## Components

### Learning experience

- [Web application](https://github.com/pivasya/taskforge/blob/develop/apps/web/src/App.jsx): `apps/web/src/App.jsx`
- [CT learning app](https://github.com/pivasya/taskforge/blob/develop/apps/web-ct/src/App.jsx): `apps/web-ct/src/App.jsx`
- [Query cache](https://github.com/pivasya/taskforge/blob/develop/apps/web/src/data/queryClient.js): `apps/web/src/data/queryClient.js`
- [Query provider](https://github.com/pivasya/taskforge/blob/develop/apps/web/src/data/QueryClientProvider.jsx): `apps/web/src/data/QueryClientProvider.jsx`
- [Query hook](https://github.com/pivasya/taskforge/blob/develop/apps/web/src/hooks/useQuery.js): `apps/web/src/hooks/useQuery.js`
- [Courses and tasks](https://github.com/pivasya/taskforge/blob/develop/services/education/api/Program.cs): `services/education/api/Program.cs`
- [Learning content](https://github.com/pivasya/taskforge/blob/develop/services/content/api/Program.cs): `services/content/api/Program.cs`

### Submission and judging

- [Solution submissions](https://github.com/pivasya/taskforge/blob/develop/services/solutions/api/Program.cs): `services/solutions/api/Program.cs`
- [Execution worker](https://github.com/pivasya/taskforge/tree/develop/services/execution): `services/execution`
- [Code analyzer](https://github.com/pivasya/taskforge/blob/develop/services/analyzers/code-analyzer/src/main.rs): `services/analyzers/code-analyzer/src/main.rs`
- [Language runners](https://github.com/pivasya/taskforge/tree/develop/services/execution/runners): `services/execution/runners`
- [Assignment API](https://github.com/pivasya/taskforge/blob/develop/services/tasks/assignment-api/Program.cs): `services/tasks/assignment-api/Program.cs`
- [Task data](https://github.com/pivasya/taskforge/blob/develop/services/tasks/assignment-api/Data/TasksDbContext.cs): `services/tasks/assignment-api/Data/TasksDbContext.cs`

### Platform services

- [Browser API](https://github.com/pivasya/taskforge/blob/develop/services/browser/api/Program.cs): `services/browser/api/Program.cs`
- **Automated agent**
- [AI API](https://github.com/pivasya/taskforge/blob/develop/services/ai/api/Program.cs): `services/ai/api/Program.cs`
- [AI worker](https://github.com/pivasya/taskforge/blob/develop/services/ai/worker/Program.cs): `services/ai/worker/Program.cs`
- [Files API](https://github.com/pivasya/taskforge/blob/develop/services/files/api/Program.cs): `services/files/api/Program.cs`

### Integrations and operations

- [Minecraft API](https://github.com/pivasya/taskforge/blob/develop/services/minecraft/api/Program.cs): `services/minecraft/api/Program.cs`
- [Mob tweaks plugin](https://github.com/pivasya/taskforge/blob/develop/plugins/minecraft/minecraft-plugin-folia/CustomMobTweaksPlugin/src/main/java/me/vasya/custommobtweaks/CustomMobTweaksPlugin.java): `plugins/minecraft/minecraft-plugin-folia/CustomMobTweaksPlugin/src/main/java/me/vasya/custommobtweaks/CustomMobTweaksPlugin.java`
- [Cluster manager](https://github.com/pivasya/taskforge/blob/develop/deploy/cluster/manager.py): `deploy/cluster/manager.py`

### Other components

- **Learner**

## Connections

- Learner → Web application: uses
- Learner → CT learning app: uses
- Web application → Query provider: provides cache (evidence: `apps/web/src/data/QueryClientProvider.jsx`)
- Query provider → Query cache: creates client (evidence: `apps/web/src/data/QueryClientProvider.jsx`)
- Query hook → Query provider: uses client (evidence: `apps/web/src/hooks/useQuery.js`)
- Query hook → Query cache: fetches and observes (evidence: `apps/web/src/hooks/useQuery.js`)
- Web application → Courses and tasks: browses courses
- Courses and tasks → Learning content: loads learning content
- Learner → Solution submissions: submits solution
- Solution submissions → Execution worker: creates execution job
- Execution worker → Code analyzer: checks submission
- Execution worker → Language runners: runs code (evidence: `services/execution/runners/csharp-runner/Controllers/RunController.cs`)
- Execution worker → Solution submissions: returns verdict
- Web application → Assignment API: uses task APIs
- Assignment API → Task data: persists task data
- Automated agent → Browser API: discovers and inspects
- Browser API → Web application: renders deployed app
- Automated agent → Solution submissions: submits through APIs
- Web application → AI API: uses agent features
- AI API → AI worker: delegates agent work
- Assignment API → Files API: stores image assets
- Minecraft API → Mob tweaks plugin: delivers link codes
- Cluster manager → Cluster manager: manages HA nodes (evidence: `deploy/cluster/manager.py`)
