# wasmegg-carpet/egg architecture

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

- Interactive diagram: https://gitdiagram.com/wasmegg-carpet/egg
- Repository: https://github.com/wasmegg-carpet/egg

## Overview

This repository is a suite of Egg, Inc. helper tools: users choose a tool and get planning, simulation, reference, or tracking results. The clearest sampled workflow is the ascension planner: enter a player ID or load a plan, work through manual actions or automatic planning, and inspect the resulting plan and calculations. Other distinct product branches include artifact exploration and build configuration, mission planning, events, and cooperative contracts. The README identifies the protobuf/API library as a starting point for API development. Several branches are inferred from the tree; their internal wiring is not established by the excerpts.

Main entry points: [`wasmegg/ascension-planner/src/App.vue`](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/App.vue) (Ascension planner), [`wasmegg/ascension-planner/src/workers/researchCalc.worker.ts`](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/workers/researchCalc.worker.ts) (Research worker), [`wasmegg/artifact-explorer/src/views/Main.vue`](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-explorer/src/views/Main.vue) (Artifact explorer), [`periodicals/main.go`](https://github.com/wasmegg-carpet/egg/blob/main/periodicals/main.go) (Periodicals updater)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Tool Portal"]
  node_home["Tools home<br/>[Home.vue]"]
end

subgraph group_planning["Ascension Planning"]
  node_planner["Ascension planner<br/>[App.vue]"]
  node_planengine["Plan simulation<br/>[simulate.ts]"]
  node_researchviews["Research planning"]
  node_researchworker["Research worker"]
  node_workerclient["Worker client"]
  node_plannerstore["Plan persistence<br/>[usePersistence.ts]"]
end

subgraph group_artifacts["Artifact Tools"]
  node_artifactexplorer["Artifact explorer<br/>[Main.vue]"]
  node_optimizer["Artifact optimizer<br/>[optimizer-core.ts]"]
  node_loot["Mission loot data<br/>[loot.ts]"]
  node_sandbox["Artifact sandbox<br/>[TheBuilds.vue]"]
  node_effectmodel["Artifact effects<br/>[index.ts]"]
end

subgraph group_reference["Game Reference"]
  node_missionplanner["Mission planner<br/>[App.vue]"]
  node_eventcalendar["Events calendar<br/>[App.vue]"]
  node_coop["Co-op contracts<br/>[Coop.vue]"]
end

subgraph group_shared["Shared Game Data"]
  node_contractdata["Contract data<br/>[contracts.ts]"]
  node_gameapi["Game API codec<br/>[index.ts]"]
  node_protobuf["Game schema<br/>[ei.proto]"]
  node_periodicals["Periodicals updater<br/>[main.go]"]
end

node_user(("Tool user"))
node_game(("Egg, Inc. API"))
node_browserstore[("Browser storage")]

node_user -->|"opens tools"| node_home
node_user -->|"plans ascension"| node_planner
node_user -->|"explores artifacts"| node_artifactexplorer
node_user -->|"configures builds"| node_sandbox
node_user -->|"plans missions"| node_missionplanner
node_user -->|"views events"| node_eventcalendar
node_user -->|"views contracts"| node_coop
node_planner -->|"simulates actions"| node_planengine
node_planner -->|"loads and saves"| node_plannerstore
node_researchviews -->|"requests simulations"| node_workerclient
node_workerclient -->|"posts requests"| node_researchworker
node_researchworker -->|"uses engine state"| node_planengine
node_researchworker -->|"returns results"| node_researchviews
node_artifactexplorer -->|"optimizes inventory"| node_optimizer
node_artifactexplorer -->|"reads loot data"| node_loot
node_sandbox -->|"calculates effects"| node_effectmodel
node_eventcalendar -->|"persists preferences"| node_browserstore
node_missionplanner -->|"persists settings"| node_browserstore
node_coop -->|"uses contracts"| node_contractdata
node_periodicals -.->|"requests game data"| node_game
node_periodicals -->|"updates contract data"| node_contractdata
node_gameapi -->|"encodes schema"| node_protobuf

click node_home "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/_home/src/views/Home.vue"
click node_planner "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/App.vue"
click node_planengine "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/engine/simulate.ts"
click node_researchviews "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/composables/useResearchViews.ts"
click node_researchworker "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/workers/researchCalc.worker.ts"
click node_workerclient "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/composables/useResearchCalcWorker.ts"
click node_plannerstore "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/composables/usePersistence.ts"
click node_artifactexplorer "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-explorer/src/views/Main.vue"
click node_optimizer "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-explorer/src/lib/optimizer-core.ts"
click node_loot "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-explorer/src/lib/loot.ts"
click node_sandbox "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-sandbox/src/views/TheBuilds.vue"
click node_effectmodel "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-sandbox/src/lib/effects/index.ts"
click node_missionplanner "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/mission-planner/src/App.vue"
click node_eventcalendar "https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/events/src/App.vue"
click node_coop "https://github.com/wasmegg-carpet/egg/blob/main/eicoop/src/views/Coop.vue"
click node_contractdata "https://github.com/wasmegg-carpet/egg/blob/main/lib/contracts.ts"
click node_gameapi "https://github.com/wasmegg-carpet/egg/blob/main/lib/api/index.ts"
click node_protobuf "https://github.com/wasmegg-carpet/egg/blob/main/protobuf/ei.proto"
click node_periodicals "https://github.com/wasmegg-carpet/egg/blob/main/periodicals/main.go"

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_home,node_user toneBlue
class node_planner,node_planengine,node_researchviews,node_researchworker,node_workerclient,node_plannerstore,node_browserstore toneAmber
class node_artifactexplorer,node_optimizer,node_loot,node_sandbox,node_effectmodel,node_game toneMint
class node_missionplanner,node_eventcalendar,node_coop toneRose
class node_contractdata,node_gameapi,node_protobuf,node_periodicals toneIndigo
```

## Components

### Tool Portal

- [Tools home](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/_home/src/views/Home.vue): `wasmegg/_home/src/views/Home.vue`

### Ascension Planning

- [Ascension planner](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/App.vue): `wasmegg/ascension-planner/src/App.vue`
- [Plan simulation](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/engine/simulate.ts): `wasmegg/ascension-planner/src/engine/simulate.ts`
- [Research planning](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/composables/useResearchViews.ts): `wasmegg/ascension-planner/src/composables/useResearchViews.ts`
- [Research worker](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/workers/researchCalc.worker.ts): `wasmegg/ascension-planner/src/workers/researchCalc.worker.ts`
- [Worker client](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/composables/useResearchCalcWorker.ts): `wasmegg/ascension-planner/src/composables/useResearchCalcWorker.ts`
- [Plan persistence](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/ascension-planner/src/composables/usePersistence.ts): `wasmegg/ascension-planner/src/composables/usePersistence.ts`

### Artifact Tools

- [Artifact explorer](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-explorer/src/views/Main.vue): `wasmegg/artifact-explorer/src/views/Main.vue`
- [Artifact optimizer](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-explorer/src/lib/optimizer-core.ts): `wasmegg/artifact-explorer/src/lib/optimizer-core.ts`
- [Mission loot data](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-explorer/src/lib/loot.ts): `wasmegg/artifact-explorer/src/lib/loot.ts`
- [Artifact sandbox](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-sandbox/src/views/TheBuilds.vue): `wasmegg/artifact-sandbox/src/views/TheBuilds.vue`
- [Artifact effects](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/artifact-sandbox/src/lib/effects/index.ts): `wasmegg/artifact-sandbox/src/lib/effects/index.ts`

### Game Reference

- [Mission planner](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/mission-planner/src/App.vue): `wasmegg/mission-planner/src/App.vue`
- [Events calendar](https://github.com/wasmegg-carpet/egg/blob/main/wasmegg/events/src/App.vue): `wasmegg/events/src/App.vue`
- [Co-op contracts](https://github.com/wasmegg-carpet/egg/blob/main/eicoop/src/views/Coop.vue): `eicoop/src/views/Coop.vue`

### Shared Game Data

- [Contract data](https://github.com/wasmegg-carpet/egg/blob/main/lib/contracts.ts): `lib/contracts.ts`
- [Game API codec](https://github.com/wasmegg-carpet/egg/blob/main/lib/api/index.ts): `lib/api/index.ts`
- [Game schema](https://github.com/wasmegg-carpet/egg/blob/main/protobuf/ei.proto): `protobuf/ei.proto`
- [Periodicals updater](https://github.com/wasmegg-carpet/egg/blob/main/periodicals/main.go): `periodicals/main.go`

### Other components

- **Tool user**
- **Egg, Inc. API**
- **Browser storage**

## Connections

- Tool user → Tools home: opens tools
- Tool user → Ascension planner: plans ascension
- Tool user → Artifact explorer: explores artifacts
- Tool user → Artifact sandbox: configures builds
- Tool user → Mission planner: plans missions
- Tool user → Events calendar: views events
- Tool user → Co-op contracts: views contracts
- Ascension planner → Plan simulation: simulates actions
- Ascension planner → Plan persistence: loads and saves
- Research planning → Worker client: requests simulations
- Worker client → Research worker: posts requests
- Research worker → Plan simulation: uses engine state
- Research worker → Research planning: returns results
- Artifact explorer → Artifact optimizer: optimizes inventory
- Artifact explorer → Mission loot data: reads loot data
- Artifact sandbox → Artifact effects: calculates effects
- Events calendar → Browser storage: persists preferences
- Mission planner → Browser storage: persists settings
- Co-op contracts → Contract data: uses contracts
- Periodicals updater → Egg, Inc. API: requests game data
- Periodicals updater → Contract data: updates contract data
- Game API codec → Game schema: encodes schema
