# pmotschmann/evolve architecture

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

- Interactive diagram: https://gitdiagram.com/pmotschmann/evolve
- Repository: https://github.com/pmotschmann/evolve

## Overview

Evolve is an incremental civilization-building game whose gameplay progresses from managing resources, jobs, and government through research, industry, species development, and spacefaring expansion. Its runtime is organized as interacting domain systems over shared game state, with actions dispatching into systems and rendering updates. The repository also includes an in-game reference wiki covering mechanics, events, technology, challenges, and other topics. Relationships below use sampled calls, SOURCE INDEX references, and README descriptions; some wiki and entry-point wiring is unsampled.

Main entry points: [`src/actions.js`](https://github.com/pmotschmann/evolve/blob/master/src/actions.js) (Game Actions), [`src/races.js`](https://github.com/pmotschmann/evolve/blob/master/src/races.js) (Species), [`src/industry.js`](https://github.com/pmotschmann/evolve/blob/master/src/industry.js) (Industry), [`src/tech.js`](https://github.com/pmotschmann/evolve/blob/master/src/tech.js) (Technology)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime Core"]
  node_game["Game Interface<br/>[index.js]"]
  node_state[("Game State<br/>[vars.js]")]
  node_utilities["Game Utilities<br/>[functions.js]"]
  node_actions["Game Actions<br/>[actions.js]"]
end

subgraph group_civilization["Civilization"]
  node_resources["Resources<br/>[resources.js]"]
  node_jobs["Jobs<br/>[jobs.js]"]
  node_civics["Civics<br/>[civics.js]"]
  node_governors["Governors<br/>[governor.js]"]
  node_industry["Industry<br/>[industry.js]"]
end

subgraph group_progression["Progression"]
  node_species["Species<br/>[races.js]"]
  node_research["Technology<br/>[tech.js]"]
  node_arpa["ARPA Projects<br/>[arpa.js]"]
  node_achievements["Achievements<br/>[achieve.js]"]
  node_events["Events<br/>[events.js]"]
  node_seasons["Seasons<br/>[seasons.js]"]
  node_resets["Resets<br/>[resets.js]"]
end

subgraph group_expansion["Expansion"]
  node_space["Space Expansion<br/>[space.js]"]
  node_portal["Portal Worlds<br/>[portal.js]"]
  node_eden["Edenic Systems<br/>[edenic.js]"]
  node_truepath["Tau Ceti<br/>[truepath.js]"]
end

subgraph group_reference["Game Wiki"]
  node_wiki["Wiki Search<br/>[search.js]"]
  node_wiki_topics["Wiki Topics"]
end

node_player(("Player"))

node_player -->|"plays"| node_game
node_game -->|"dispatches"| node_actions
node_game -->|"uses"| node_state
node_game -.->|"opens"| node_wiki
node_actions -->|"updates"| node_resources
node_actions -->|"loads"| node_jobs
node_actions -->|"loads"| node_industry
node_actions -->|"renders"| node_space
node_actions -->|"renders"| node_portal
node_actions -->|"renders"| node_eden
node_actions -->|"renders"| node_truepath
node_actions -->|"builds"| node_arpa
node_actions -->|"uses"| node_research
node_research -->|"pays costs"| node_actions
node_research -->|"renders powers"| node_species
node_research -->|"loads foundry"| node_jobs
node_industry -->|"checks requirements"| node_actions
node_industry -->|"uses"| node_species
node_industry -->|"checks space"| node_space
node_civics -->|"defines"| node_governors
node_governors -->|"uses"| node_actions
node_species -->|"defines"| node_industry
node_species -->|"loads"| node_jobs
node_species -->|"renders"| node_eden
node_resources -->|"uses worker scale"| node_jobs
node_resources -->|"checks suppression"| node_portal
node_resources -->|"uses syndicate"| node_truepath
node_achievements -->|"reads"| node_species
node_achievements -->|"reads"| node_space
node_achievements -->|"reads monsters"| node_portal
node_wiki -->|"searches"| node_wiki_topics
node_wiki_topics -->|"documents"| node_research
node_wiki_topics -->|"documents"| node_events
node_wiki_topics -->|"documents"| node_space
node_utilities -->|"uses"| node_state
node_utilities -->|"adjusts costs"| node_arpa

click node_game "https://github.com/pmotschmann/evolve/blob/master/src/index.js"
click node_state "https://github.com/pmotschmann/evolve/blob/master/src/vars.js"
click node_utilities "https://github.com/pmotschmann/evolve/blob/master/src/functions.js"
click node_actions "https://github.com/pmotschmann/evolve/blob/master/src/actions.js"
click node_resources "https://github.com/pmotschmann/evolve/blob/master/src/resources.js"
click node_jobs "https://github.com/pmotschmann/evolve/blob/master/src/jobs.js"
click node_civics "https://github.com/pmotschmann/evolve/blob/master/src/civics.js"
click node_governors "https://github.com/pmotschmann/evolve/blob/master/src/governor.js"
click node_industry "https://github.com/pmotschmann/evolve/blob/master/src/industry.js"
click node_species "https://github.com/pmotschmann/evolve/blob/master/src/races.js"
click node_research "https://github.com/pmotschmann/evolve/blob/master/src/tech.js"
click node_arpa "https://github.com/pmotschmann/evolve/blob/master/src/arpa.js"
click node_achievements "https://github.com/pmotschmann/evolve/blob/master/src/achieve.js"
click node_events "https://github.com/pmotschmann/evolve/blob/master/src/events.js"
click node_seasons "https://github.com/pmotschmann/evolve/blob/master/src/seasons.js"
click node_resets "https://github.com/pmotschmann/evolve/blob/master/src/resets.js"
click node_space "https://github.com/pmotschmann/evolve/blob/master/src/space.js"
click node_portal "https://github.com/pmotschmann/evolve/blob/master/src/portal.js"
click node_eden "https://github.com/pmotschmann/evolve/blob/master/src/edenic.js"
click node_truepath "https://github.com/pmotschmann/evolve/blob/master/src/truepath.js"
click node_wiki "https://github.com/pmotschmann/evolve/blob/master/src/wiki/search.js"
click node_wiki_topics "https://github.com/pmotschmann/evolve/tree/master/src/wiki"

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_game,node_state,node_utilities,node_actions toneBlue
class node_resources,node_jobs,node_civics,node_governors,node_industry toneAmber
class node_species,node_research,node_arpa,node_achievements,node_events,node_seasons,node_resets toneMint
class node_space,node_portal,node_eden,node_truepath toneRose
class node_wiki,node_wiki_topics,node_player toneIndigo
```

## Components

### Runtime Core

- [Game Interface](https://github.com/pmotschmann/evolve/blob/master/src/index.js): `src/index.js`
- [Game State](https://github.com/pmotschmann/evolve/blob/master/src/vars.js): `src/vars.js`
- [Game Utilities](https://github.com/pmotschmann/evolve/blob/master/src/functions.js): `src/functions.js`
- [Game Actions](https://github.com/pmotschmann/evolve/blob/master/src/actions.js): `src/actions.js`

### Civilization

- [Resources](https://github.com/pmotschmann/evolve/blob/master/src/resources.js): `src/resources.js`
- [Jobs](https://github.com/pmotschmann/evolve/blob/master/src/jobs.js): `src/jobs.js`
- [Civics](https://github.com/pmotschmann/evolve/blob/master/src/civics.js): `src/civics.js`
- [Governors](https://github.com/pmotschmann/evolve/blob/master/src/governor.js): `src/governor.js`
- [Industry](https://github.com/pmotschmann/evolve/blob/master/src/industry.js): `src/industry.js`

### Progression

- [Species](https://github.com/pmotschmann/evolve/blob/master/src/races.js): `src/races.js`
- [Technology](https://github.com/pmotschmann/evolve/blob/master/src/tech.js): `src/tech.js`
- [ARPA Projects](https://github.com/pmotschmann/evolve/blob/master/src/arpa.js): `src/arpa.js`
- [Achievements](https://github.com/pmotschmann/evolve/blob/master/src/achieve.js): `src/achieve.js`
- [Events](https://github.com/pmotschmann/evolve/blob/master/src/events.js): `src/events.js`
- [Seasons](https://github.com/pmotschmann/evolve/blob/master/src/seasons.js): `src/seasons.js`
- [Resets](https://github.com/pmotschmann/evolve/blob/master/src/resets.js): `src/resets.js`

### Expansion

- [Space Expansion](https://github.com/pmotschmann/evolve/blob/master/src/space.js): `src/space.js`
- [Portal Worlds](https://github.com/pmotschmann/evolve/blob/master/src/portal.js): `src/portal.js`
- [Edenic Systems](https://github.com/pmotschmann/evolve/blob/master/src/edenic.js): `src/edenic.js`
- [Tau Ceti](https://github.com/pmotschmann/evolve/blob/master/src/truepath.js): `src/truepath.js`

### Game Wiki

- [Wiki Search](https://github.com/pmotschmann/evolve/blob/master/src/wiki/search.js): `src/wiki/search.js`
- [Wiki Topics](https://github.com/pmotschmann/evolve/tree/master/src/wiki): `src/wiki`

### Other components

- **Player**

## Connections

- Player → Game Interface: plays
- Game Interface → Game Actions: dispatches (evidence: `src/index.js`)
- Game Interface → Game State: uses (evidence: `src/index.js`)
- Game Interface → Wiki Search: opens
- Game Actions → Resources: updates (evidence: `src/actions.js`)
- Game Actions → Jobs: loads (evidence: `src/actions.js`)
- Game Actions → Industry: loads (evidence: `src/actions.js`)
- Game Actions → Space Expansion: renders (evidence: `src/actions.js`)
- Game Actions → Portal Worlds: renders (evidence: `src/actions.js`)
- Game Actions → Edenic Systems: renders (evidence: `src/actions.js`)
- Game Actions → Tau Ceti: renders (evidence: `src/actions.js`)
- Game Actions → ARPA Projects: builds (evidence: `src/actions.js`)
- Game Actions → Technology: uses (evidence: `src/actions.js`)
- Technology → Game Actions: pays costs (evidence: `src/tech.js`)
- Technology → Species: renders powers (evidence: `src/tech.js`)
- Technology → Jobs: loads foundry (evidence: `src/tech.js`)
- Industry → Game Actions: checks requirements (evidence: `src/industry.js`)
- Industry → Species: uses (evidence: `src/industry.js`)
- Industry → Space Expansion: checks space (evidence: `src/industry.js`)
- Civics → Governors: defines (evidence: `src/civics.js`)
- Governors → Game Actions: uses (evidence: `src/governor.js`)
- Species → Industry: defines (evidence: `src/races.js`)
- Species → Jobs: loads (evidence: `src/races.js`)
- Species → Edenic Systems: renders (evidence: `src/races.js`)
- Resources → Jobs: uses worker scale (evidence: `src/resources.js`)
- Resources → Portal Worlds: checks suppression (evidence: `src/resources.js`)
- Resources → Tau Ceti: uses syndicate (evidence: `src/resources.js`)
- Achievements → Species: reads (evidence: `src/achieve.js`)
- Achievements → Space Expansion: reads (evidence: `src/achieve.js`)
- Achievements → Portal Worlds: reads monsters (evidence: `src/achieve.js`)
- Wiki Search → Wiki Topics: searches (evidence: `src/wiki/search.js`)
- Wiki Topics → Technology: documents (evidence: `src/wiki/tech.js`)
- Wiki Topics → Events: documents (evidence: `src/wiki/events.js`)
- Wiki Topics → Space Expansion: documents (evidence: `src/wiki/mechanics.js`)
- Game Utilities → Game State: uses (evidence: `src/functions.js`)
- Game Utilities → ARPA Projects: adjusts costs (evidence: `src/functions.js`)
