# richard043/family_tree architecture

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

- Interactive diagram: https://gitdiagram.com/richard043/family_tree
- Repository: https://github.com/richard043/family_tree

## Overview

This is a small browser-based family-tree viewer. A visitor can view a generated, generation-grouped tree and follow person cards to individual profiles with biographies and parent, spouse, sibling, and child relationships. The tree script explicitly fetches the family data; the profile script’s excerpt shows URL-ID lookup and relationship display, but not its data-loading source. With no README and partial source excerpts, that connection is omitted.

Main entry points: [`js/family.js`](https://github.com/richard043/family_tree/blob/main/js/family.js) (Tree renderer), [`data/family.json`](https://github.com/richard043/family_tree/blob/main/data/family.json) (Family records), [`js/person.js`](https://github.com/richard043/family_tree/blob/main/js/person.js) (Profile and relationships)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tree["Family tree"]
  node_tree_view["Tree renderer<br/>[family.js]"]
  node_family_data["Family records<br/>[family.json]"]
end

subgraph group_profiles["Person profiles"]
  node_person_view["Profile and relationships<br/>[person.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens tree"| node_tree_view
node_tree_view -->|"fetches records"| node_family_data
node_visitor -->|"opens profile"| node_person_view

click node_tree_view "https://github.com/richard043/family_tree/blob/main/js/family.js"
click node_family_data "https://github.com/richard043/family_tree/blob/main/data/family.json"
click node_person_view "https://github.com/richard043/family_tree/blob/main/js/person.js"

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_tree_view,node_family_data toneBlue
class node_person_view toneAmber
class node_visitor toneIndigo
```

## Components

### Family tree

- [Tree renderer](https://github.com/richard043/family_tree/blob/main/js/family.js): `js/family.js`
- [Family records](https://github.com/richard043/family_tree/blob/main/data/family.json): `data/family.json`

### Person profiles

- [Profile and relationships](https://github.com/richard043/family_tree/blob/main/js/person.js): `js/person.js`

### Other components

- **Visitor**

## Connections

- Visitor → Tree renderer: opens tree (evidence: `js/family.js`)
- Tree renderer → Family records: fetches records (evidence: `js/family.js`)
- Visitor → Profile and relationships: opens profile (evidence: `js/person.js`)
