# prinnboontanan/metaaves architecture

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

- Interactive diagram: https://gitdiagram.com/prinnboontanan/metaaves
- Repository: https://github.com/prinnboontanan/metaaves

## Overview

MetaAves is a browser-based bird guessing game: players submit bird names, receive progressively revealed taxonomy clues, and see a post-game study card. Its broader dataset includes ranked taxonomy and separate clade memberships. The main game logic and Wikipedia/Wikidata enrichment are in script.js; exact wiring to page elements and data files is partly inferred from the tree and excerpts, so uncertain calls are omitted.

Main entry points: [`script.js`](https://github.com/prinnboontanan/metaaves/blob/main/script.js) (Game logic), [`index.html`](https://github.com/prinnboontanan/metaaves/blob/main/index.html) (Game page), [`data/birds.generated.json`](https://github.com/prinnboontanan/metaaves/blob/main/data/birds.generated.json) (Bird records), [`data/taxonomy.generated.json`](https://github.com/prinnboontanan/metaaves/blob/main/data/taxonomy.generated.json) (Ranked taxonomy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Guessing game"]
  node_gamecode["Game logic<br/>[script.js]"]
end

subgraph group_taxonomy["Taxonomy data"]
  node_birddata["Bird records"]
  node_taxonomydata["Ranked taxonomy"]
  node_cladedata["Clade membership"]
  node_clades["Clade definitions<br/>[clades.json]"]
  node_overrides["Taxonomy overrides"]
  node_infodata["Taxon details<br/>[taxon_info.json]"]
  node_schema["Bird schema<br/>[bird.schema.json]"]
end

subgraph group_study["Study enrichment"]
  node_wiki["Wikipedia API"]
  node_wikidata["Wikidata API"]
end

subgraph group_presentation["Browser interface"]
  node_page["Game page<br/>[index.html]"]
  node_styles["Game styling<br/>[style.css]"]
  node_browser(("Browser"))
end

node_player(("Player"))

node_player -->|"plays"| node_page
node_page -->|"runs"| node_gamecode
node_gamecode -->|"loads birds"| node_birddata
node_gamecode -->|"reads ancestry"| node_taxonomydata
node_gamecode -->|"reads clades"| node_cladedata
node_gamecode -->|"reads definitions"| node_clades
node_gamecode -->|"reads overrides"| node_overrides
node_gamecode -->|"reads details"| node_infodata
node_gamecode -.->|"fetches pages"| node_wiki
node_gamecode -.->|"fetches taxonomy"| node_wikidata
node_gamecode -->|"updates display"| node_browser
node_page -->|"uses styles"| node_styles
node_browser -->|"shows clues"| node_player

click node_page "https://github.com/prinnboontanan/metaaves/blob/main/index.html"
click node_gamecode "https://github.com/prinnboontanan/metaaves/blob/main/script.js"
click node_styles "https://github.com/prinnboontanan/metaaves/blob/main/style.css"
click node_birddata "https://github.com/prinnboontanan/metaaves/blob/main/data/birds.generated.json"
click node_taxonomydata "https://github.com/prinnboontanan/metaaves/blob/main/data/taxonomy.generated.json"
click node_cladedata "https://github.com/prinnboontanan/metaaves/blob/main/data/clade_membership.generated.json"
click node_clades "https://github.com/prinnboontanan/metaaves/blob/main/data/clades.json"
click node_overrides "https://github.com/prinnboontanan/metaaves/blob/main/data/taxonomy_overrides.json"
click node_infodata "https://github.com/prinnboontanan/metaaves/blob/main/data/taxon_info.json"
click node_schema "https://github.com/prinnboontanan/metaaves/blob/main/data/bird.schema.json"

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_gamecode toneBlue
class node_birddata,node_taxonomydata,node_cladedata,node_clades,node_overrides,node_infodata,node_schema toneAmber
class node_wiki,node_wikidata toneMint
class node_page,node_styles,node_browser toneRose
class node_player toneIndigo
```

## Components

### Guessing game

- [Game logic](https://github.com/prinnboontanan/metaaves/blob/main/script.js): `script.js`

### Taxonomy data

- [Bird records](https://github.com/prinnboontanan/metaaves/blob/main/data/birds.generated.json): `data/birds.generated.json`
- [Ranked taxonomy](https://github.com/prinnboontanan/metaaves/blob/main/data/taxonomy.generated.json): `data/taxonomy.generated.json`
- [Clade membership](https://github.com/prinnboontanan/metaaves/blob/main/data/clade_membership.generated.json): `data/clade_membership.generated.json`
- [Clade definitions](https://github.com/prinnboontanan/metaaves/blob/main/data/clades.json): `data/clades.json`
- [Taxonomy overrides](https://github.com/prinnboontanan/metaaves/blob/main/data/taxonomy_overrides.json): `data/taxonomy_overrides.json`
- [Taxon details](https://github.com/prinnboontanan/metaaves/blob/main/data/taxon_info.json): `data/taxon_info.json`
- [Bird schema](https://github.com/prinnboontanan/metaaves/blob/main/data/bird.schema.json): `data/bird.schema.json`

### Study enrichment

- **Wikipedia API**
- **Wikidata API**

### Browser interface

- [Game page](https://github.com/prinnboontanan/metaaves/blob/main/index.html): `index.html`
- [Game styling](https://github.com/prinnboontanan/metaaves/blob/main/style.css): `style.css`
- **Browser**

### Other components

- **Player**

## Connections

- Player → Game page: plays
- Game page → Game logic: runs
- Game logic → Bird records: loads birds
- Game logic → Ranked taxonomy: reads ancestry
- Game logic → Clade membership: reads clades
- Game logic → Clade definitions: reads definitions
- Game logic → Taxonomy overrides: reads overrides
- Game logic → Taxon details: reads details
- Game logic → Wikipedia API: fetches pages
- Game logic → Wikidata API: fetches taxonomy
- Game logic → Browser: updates display
- Game page → Game styling: uses styles
- Browser → Player: shows clues
