# i-am-rayo/fvtt-atlas-navigation architecture

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

- Interactive diagram: https://gitdiagram.com/i-am-rayo/fvtt-atlas-navigation
- Repository: https://github.com/i-am-rayo/fvtt-atlas-navigation

## Overview

This is a Foundry VTT module in its Phase 1 development-shell state, not yet an atlas or routing implementation. The current workflow registers a world setting during initialization, then checks GM status on readiness and optionally displays a localized notice. Road editing, scale calibration, persistence, route calculation, and overlays are documented future capabilities, not present runtime components; source inspection here was limited to the startup script and package metadata.

Main entry points: [`scripts/main.js`](https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/scripts/main.js) (Ready handler), [`lang/en.json`](https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/lang/en.json) (English strings)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_foundry(("Foundry VTT"))
node_entry["Startup module<br/>[main.js]"]
node_hooks["Lifecycle hooks"]
node_setting["Startup setting<br/>[main.js]"]
node_ready["Ready handler<br/>[main.js]"]
node_localization["English strings<br/>[en.json]"]
node_notifications["Notifications UI"]

node_entry -->|"registers callbacks"| node_hooks
node_hooks -->|"dispatches init"| node_setting
node_hooks -->|"dispatches ready"| node_ready
node_ready -->|"reads value"| node_setting
node_ready -->|"localizes keys"| node_localization
node_ready -->|"shows notice"| node_notifications

click node_entry "https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/scripts/main.js"
click node_setting "https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/scripts/main.js"
click node_ready "https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/scripts/main.js"
click node_localization "https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/lang/en.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_foundry,node_hooks toneIndigo
class node_entry,node_setting,node_localization toneTeal
class node_ready toneMint
class node_notifications toneBlue
```

## Components

### Other components

- **Foundry VTT**
- [Startup module](https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/scripts/main.js): `scripts/main.js`
- **Lifecycle hooks**
- [Startup setting](https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/scripts/main.js): `scripts/main.js`
- [Ready handler](https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/scripts/main.js): `scripts/main.js`
- [English strings](https://github.com/i-am-rayo/fvtt-atlas-navigation/blob/main/lang/en.json): `lang/en.json`
- **Notifications UI**

## Connections

- Startup module → Lifecycle hooks: registers callbacks (evidence: `scripts/main.js`)
- Lifecycle hooks → Startup setting: dispatches init (evidence: `scripts/main.js`)
- Lifecycle hooks → Ready handler: dispatches ready (evidence: `scripts/main.js`)
- Ready handler → Startup setting: reads value (evidence: `scripts/main.js`)
- Ready handler → English strings: localizes keys (evidence: `scripts/main.js`)
- Ready handler → Notifications UI: shows notice (evidence: `scripts/main.js`)
