# admiralakber/autograph architecture

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

- Interactive diagram: https://gitdiagram.com/admiralakber/autograph
- Repository: https://github.com/admiralakber/autograph

## Overview

Autograph is a browser-based evolutionary art experiment: it grows neural phenotypes from CPPN genomes, evaluates self-reconstruction, and searches for stronger elites while rendering each creature as a network and 3-D self-portrait. The dashboard coordinates the user-facing loop and records signed lineage; optional swarm connectivity shares verified elites through a persistent coordinator. The graph follows documented product capabilities; several internals are represented at their exact enclosing paths because their source was not sampled.

Main entry points: [`web/src/ui/dashboard.ts`](https://github.com/admiralakber/autograph/blob/main/web/src/ui/dashboard.ts) (Experiment dashboard), [`web/src/engine/evolution.ts`](https://github.com/admiralakber/autograph/blob/main/web/src/engine/evolution.ts) (Evolution search), [`coordinator/src/room.ts`](https://github.com/admiralakber/autograph/blob/main/coordinator/src/room.ts) (Room coordinator), [`web/src/engine/substrate.ts`](https://github.com/admiralakber/autograph/blob/main/web/src/engine/substrate.ts) (ES-HyperNEAT phenotype)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experiment["Evolution"]
  node_dashboard["Experiment dashboard<br/>[dashboard.ts]"]
  node_garden["Evolution search<br/>[evolution.ts]"]
  node_mapelites["MAP-Elites archive<br/>[mapelites.ts]"]
  node_fitness["Loop fitness<br/>[fitness.ts]"]
end

subgraph group_creature["Creature Model"]
  node_genome["CPPN genome<br/>[cppn.ts]"]
  node_substrate["ES-HyperNEAT phenotype<br/>[substrate.ts]"]
  node_readback["DNA readback<br/>[readback.ts]"]
  node_mutation["Genome variation<br/>[mutate.ts]"]
end

subgraph group_instrument["Visualization"]
  node_volume["Volume sampling<br/>[volume.ts]"]
  node_scene["3-D scene<br/>[scene3d.ts]"]
  node_netdraw["Network diagrams<br/>[netdraw.ts]"]
end

subgraph group_history["Lineage"]
  node_genealogy["Genealogy view<br/>[genealogy.ts]"]
  node_lineage["Signed lineage<br/>[lineage.ts]"]
  node_localstore[("Lineage persistence<br/>[storage.ts]")]
end

subgraph group_swarm["Shared Swarm"]
  node_swarmclient["Swarm archive client<br/>[swarm.ts]"]
  node_coordinator["Room coordinator<br/>[room.ts]"]
  node_verification["Elite verification<br/>[verify.ts]"]
  node_serveradapter["Worker adapter<br/>[server.ts]"]
  node_durable[("Durable archive<br/>[archive.ts]")]
end

node_visitor(("Browser visitor"))
node_peers(("Swarm peers"))

node_visitor -->|"uses"| node_dashboard
node_dashboard -->|"starts search"| node_garden
node_garden -->|"varies genomes"| node_genome
node_garden -->|"evaluates candidates"| node_fitness
node_garden -->|"archives elites"| node_mapelites
node_fitness -->|"builds phenotype"| node_substrate
node_fitness -->|"tests reconstruction"| node_readback
node_readback -->|"runs brain"| node_substrate
node_dashboard -->|"builds views"| node_substrate
node_dashboard -->|"samples portrait"| node_volume
node_volume -->|"samples field"| node_substrate
node_dashboard -->|"renders portrait"| node_scene
node_dashboard -->|"draws networks"| node_netdraw
node_dashboard -->|"creates entries"| node_lineage
node_dashboard -->|"loads and saves"| node_localstore
node_localstore -->|"renders history"| node_genealogy
node_dashboard -->|"updates tree"| node_genealogy
node_dashboard -.->|"shares archive"| node_swarmclient
node_swarmclient -.->|"signs elites"| node_lineage
node_swarmclient -.->|"syncs elites"| node_peers
node_peers -.->|"connects"| node_serveradapter
node_serveradapter -->|"dispatches room events"| node_coordinator
node_coordinator -->|"verifies submissions"| node_verification
node_coordinator -->|"persists archive"| node_durable
node_coordinator -.->|"broadcasts updates"| node_peers

click node_dashboard "https://github.com/admiralakber/autograph/blob/main/web/src/ui/dashboard.ts"
click node_garden "https://github.com/admiralakber/autograph/blob/main/web/src/engine/evolution.ts"
click node_mapelites "https://github.com/admiralakber/autograph/blob/main/web/src/engine/mapelites.ts"
click node_fitness "https://github.com/admiralakber/autograph/blob/main/web/src/engine/fitness.ts"
click node_genome "https://github.com/admiralakber/autograph/blob/main/web/src/engine/cppn.ts"
click node_substrate "https://github.com/admiralakber/autograph/blob/main/web/src/engine/substrate.ts"
click node_readback "https://github.com/admiralakber/autograph/blob/main/web/src/engine/readback.ts"
click node_mutation "https://github.com/admiralakber/autograph/blob/main/web/src/engine/mutate.ts"
click node_volume "https://github.com/admiralakber/autograph/blob/main/web/src/engine/render/volume.ts"
click node_scene "https://github.com/admiralakber/autograph/blob/main/web/src/engine/render/scene3d.ts"
click node_netdraw "https://github.com/admiralakber/autograph/blob/main/web/src/ui/netdraw.ts"
click node_genealogy "https://github.com/admiralakber/autograph/blob/main/web/src/ui/genealogy.ts"
click node_lineage "https://github.com/admiralakber/autograph/blob/main/web/src/engine/lineage.ts"
click node_localstore "https://github.com/admiralakber/autograph/blob/main/web/src/engine/storage.ts"
click node_swarmclient "https://github.com/admiralakber/autograph/blob/main/web/src/net/swarm.ts"
click node_coordinator "https://github.com/admiralakber/autograph/blob/main/coordinator/src/room.ts"
click node_verification "https://github.com/admiralakber/autograph/blob/main/coordinator/src/verify.ts"
click node_serveradapter "https://github.com/admiralakber/autograph/blob/main/coordinator/src/server.ts"
click node_durable "https://github.com/admiralakber/autograph/blob/main/coordinator/src/archive.ts"

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_dashboard,node_garden,node_mapelites,node_fitness,node_visitor toneBlue
class node_genome,node_substrate,node_readback,node_mutation toneAmber
class node_volume,node_scene,node_netdraw toneMint
class node_genealogy,node_lineage,node_localstore toneRose
class node_swarmclient,node_coordinator,node_verification,node_serveradapter,node_durable,node_peers toneIndigo
```

## Components

### Evolution

- [Experiment dashboard](https://github.com/admiralakber/autograph/blob/main/web/src/ui/dashboard.ts): `web/src/ui/dashboard.ts`
- [Evolution search](https://github.com/admiralakber/autograph/blob/main/web/src/engine/evolution.ts): `web/src/engine/evolution.ts`
- [MAP-Elites archive](https://github.com/admiralakber/autograph/blob/main/web/src/engine/mapelites.ts): `web/src/engine/mapelites.ts`
- [Loop fitness](https://github.com/admiralakber/autograph/blob/main/web/src/engine/fitness.ts): `web/src/engine/fitness.ts`

### Creature Model

- [CPPN genome](https://github.com/admiralakber/autograph/blob/main/web/src/engine/cppn.ts): `web/src/engine/cppn.ts`
- [ES-HyperNEAT phenotype](https://github.com/admiralakber/autograph/blob/main/web/src/engine/substrate.ts): `web/src/engine/substrate.ts`
- [DNA readback](https://github.com/admiralakber/autograph/blob/main/web/src/engine/readback.ts): `web/src/engine/readback.ts`
- [Genome variation](https://github.com/admiralakber/autograph/blob/main/web/src/engine/mutate.ts): `web/src/engine/mutate.ts`

### Visualization

- [Volume sampling](https://github.com/admiralakber/autograph/blob/main/web/src/engine/render/volume.ts): `web/src/engine/render/volume.ts`
- [3-D scene](https://github.com/admiralakber/autograph/blob/main/web/src/engine/render/scene3d.ts): `web/src/engine/render/scene3d.ts`
- [Network diagrams](https://github.com/admiralakber/autograph/blob/main/web/src/ui/netdraw.ts): `web/src/ui/netdraw.ts`

### Lineage

- [Genealogy view](https://github.com/admiralakber/autograph/blob/main/web/src/ui/genealogy.ts): `web/src/ui/genealogy.ts`
- [Signed lineage](https://github.com/admiralakber/autograph/blob/main/web/src/engine/lineage.ts): `web/src/engine/lineage.ts`
- [Lineage persistence](https://github.com/admiralakber/autograph/blob/main/web/src/engine/storage.ts): `web/src/engine/storage.ts`

### Shared Swarm

- [Swarm archive client](https://github.com/admiralakber/autograph/blob/main/web/src/net/swarm.ts): `web/src/net/swarm.ts`
- [Room coordinator](https://github.com/admiralakber/autograph/blob/main/coordinator/src/room.ts): `coordinator/src/room.ts`
- [Elite verification](https://github.com/admiralakber/autograph/blob/main/coordinator/src/verify.ts): `coordinator/src/verify.ts`
- [Worker adapter](https://github.com/admiralakber/autograph/blob/main/coordinator/src/server.ts): `coordinator/src/server.ts`
- [Durable archive](https://github.com/admiralakber/autograph/blob/main/coordinator/src/archive.ts): `coordinator/src/archive.ts`

### Other components

- **Browser visitor**
- **Swarm peers**

## Connections

- Browser visitor → Experiment dashboard: uses
- Experiment dashboard → Evolution search: starts search
- Evolution search → CPPN genome: varies genomes
- Evolution search → Loop fitness: evaluates candidates
- Evolution search → MAP-Elites archive: archives elites
- Loop fitness → ES-HyperNEAT phenotype: builds phenotype
- Loop fitness → DNA readback: tests reconstruction
- DNA readback → ES-HyperNEAT phenotype: runs brain
- Experiment dashboard → ES-HyperNEAT phenotype: builds views
- Experiment dashboard → Volume sampling: samples portrait
- Volume sampling → ES-HyperNEAT phenotype: samples field
- Experiment dashboard → 3-D scene: renders portrait
- Experiment dashboard → Network diagrams: draws networks
- Experiment dashboard → Signed lineage: creates entries
- Experiment dashboard → Lineage persistence: loads and saves
- Lineage persistence → Genealogy view: renders history
- Experiment dashboard → Genealogy view: updates tree
- Experiment dashboard → Swarm archive client: shares archive
- Swarm archive client → Signed lineage: signs elites
- Swarm archive client → Swarm peers: syncs elites
- Swarm peers → Worker adapter: connects
- Worker adapter → Room coordinator: dispatches room events
- Room coordinator → Elite verification: verifies submissions
- Room coordinator → Durable archive: persists archive
- Room coordinator → Swarm peers: broadcasts updates
