# Hero Code Home ## Architecture Overview The Hero Code system follows a hierarchical job execution architecture with three main components: ### [Coordinator](https://git.ourworld.tf/herocode/herocoordinator) - Manages DAGs (Direct Acyclic Graphs) that define flows of jobs - Orchestrates job execution by dispatching individual steps from DAGs to supervisors - Handles flow logic and determines the next steps based on job completion results ### [Supervisor](https://git.ourworld.tf/herocode/supervisor) - Receive job assignments from the coordinator - Dispatch jobs to appropriate runners based on job requirements - Act as intermediaries between coordinators and runners - Return job results back to the coordinator ### [Runner](https://git.ourworld.tf/herocode/herorunner) - Execute the actual jobs assigned by supervisors - Run job-specific code and return responses to supervisors - Specialized for different types of workloads and environments - Use Hero DB as their data layer for persistent storage and data operations Runners run scripts in rhai or heroscript and are written in multiple languages. Each runner uses Hero DB as its data layer for persistent storage and data operations. - [System Runner](https://git.ourworld.tf/herocode/runner_system) - [OSIS Runner](https://git.ourworld.tf/herocode/runner_osis) - [V Runner](https://git.ourworld.tf/herocode/runner_v) - [Python Runner](https://git.ourworld.tf/herocode/runner_python) ```mermaid graph TD C[Coordinator
DAG Management & Flow Logic] subgraph N1["Node 1 (Linux User)"] S1[Supervisor 1] R1[Runner 1
System Runner] R2[Runner 2
Python Runner] DB1[(Hero DB 1)] end subgraph N2["Node 2 (Linux User)"] S2[Supervisor 2] R3[Runner 3
V Runner] R4[Runner 4
OSIS Runner] DB2[(Hero DB 2)] end C <-->|Job & Result| S1 C <-->|Job & Result| S2 S1 <-->|Job & Result| R1 S1 <-->|Job & Result| R2 S2 <-->|Job & Result| R3 S2 <-->|Job & Result| R4 R1 <-->|Data| DB1 R2 <-->|Data| DB1 R3 <-->|Data| DB2 R4 <-->|Data| DB2 style C fill:#e1f5fe style S1 fill:#f3e5f5 style S2 fill:#f3e5f5 style R1 fill:#e8f5e8 style R2 fill:#e8f5e8 style R3 fill:#e8f5e8 style R4 fill:#e8f5e8 style DB1 fill:#fff3e0 style DB2 fill:#fff3e0 ``` ## Local Embedded Application Front End ([leaf](https://git.ourworld.tf/herocode/leaf)) Leaf is a local embedded application front end. It is a web application that can be embedded in any web application. It is a set of widgets that can be used to build web applications. ## [Hero DB](https://git.ourworld.tf/herocode/herodb) Hero DB is the data layer used by runners in each node. It provides persistent storage and data operations for runners, enabling them to store and retrieve data as needed during job execution. ## Herolibs herolibs are libraries for hero code in different languages. - [Vlang] (https://git.ourworld.tf/herocode/herolib_v) - [Rust] (https://git.ourworld.tf/herocode/herolib_rs) - [Python] (https://git.ourworld.tf/herocode/herolib_py) ##