# mathuramg/indian-history architecture

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

- Interactive diagram: https://gitdiagram.com/mathuramg/indian-history
- Repository: https://github.com/mathuramg/indian-history

## Overview

This repository is a browser-based Indian history compilation (1600–1947), presented as JSON data and interactive visualizations rather than an API. The main user workflow is browsing historical timeline pages, with separate views for famines, battles, and wars. Data files and image assets support these experiences. The graph covers documented calls and data use; other README capabilities, including treaties, rulers, and the general timeline, are represented only where the tree provides identifiable source paths.

Main entry points: [`famines/app.js`](https://github.com/mathuramg/indian-history/blob/master/famines/app.js) (Famine view), [`divide-rule/app.js`](https://github.com/mathuramg/indian-history/blob/master/divide-rule/app.js) (Division view), [`js/timeline.js`](https://github.com/mathuramg/indian-history/blob/master/js/timeline.js) (Timeline renderer), [`libraries/scrollify.js`](https://github.com/mathuramg/indian-history/blob/master/libraries/scrollify.js) (Section scrolling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_history["Historical Data"]
  node_famine_data["Famine records<br/>[famine.js]"]
  node_division_data["Division timelines<br/>[divideRule.js]"]
  node_general_records["History datasets"]
  node_battle_records["Battle records<br/>[battles.json]"]
end

subgraph group_views["History Views"]
  node_famine_app["Famine view<br/>[app.js]"]
  node_division_app["Division view<br/>[app.js]"]
  node_timeline["Timeline renderer<br/>[timeline.js]"]
  node_battles_view["Battle map<br/>[sketch.js]"]
  node_wars_view["Wars chart<br/>[app.js]"]
end

subgraph group_interaction["Navigation"]
  node_nav["Page navigation<br/>[nav.js]"]
  node_keyboard["Keyboard controls<br/>[keyboard.js]"]
  node_scrollify["Section scrolling<br/>[scrollify.js]"]
end

node_reader(("History reader"))
node_map_service["Map tiles"]

node_reader -->|"opens"| node_famine_app
node_reader -->|"opens"| node_division_app
node_reader -->|"opens"| node_battles_view
node_famine_app -->|"creates"| node_timeline
node_division_app -->|"creates"| node_timeline
node_famine_app -.->|"selects project"| node_famine_data
node_division_app -.->|"selects project"| node_division_data
node_timeline -.->|"reads"| node_famine_data
node_timeline -.->|"reads"| node_division_data
node_famine_app -->|"configures"| node_scrollify
node_division_app -->|"configures"| node_scrollify
node_famine_app -->|"creates"| node_nav
node_nav -->|"moves sections"| node_scrollify
node_keyboard -->|"advances sections"| node_scrollify
node_battles_view -->|"loads"| node_battle_records
node_battles_view -.->|"requests tiles"| node_map_service
node_reader -.->|"opens"| node_wars_view

click node_famine_data "https://github.com/mathuramg/indian-history/blob/master/famines/data/famine.js"
click node_division_data "https://github.com/mathuramg/indian-history/blob/master/divide-rule/data/divideRule.js"
click node_famine_app "https://github.com/mathuramg/indian-history/blob/master/famines/app.js"
click node_division_app "https://github.com/mathuramg/indian-history/blob/master/divide-rule/app.js"
click node_timeline "https://github.com/mathuramg/indian-history/blob/master/js/timeline.js"
click node_battles_view "https://github.com/mathuramg/indian-history/blob/master/battles/sketch.js"
click node_battle_records "https://github.com/mathuramg/indian-history/blob/master/battles.json"
click node_wars_view "https://github.com/mathuramg/indian-history/blob/master/wars-gantt/app.js"
click node_nav "https://github.com/mathuramg/indian-history/blob/master/js/nav.js"
click node_keyboard "https://github.com/mathuramg/indian-history/blob/master/js/keyboard.js"
click node_scrollify "https://github.com/mathuramg/indian-history/blob/master/libraries/scrollify.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_famine_data,node_division_data,node_general_records,node_battle_records toneBlue
class node_famine_app,node_division_app,node_timeline,node_battles_view,node_wars_view toneAmber
class node_nav,node_keyboard,node_scrollify toneMint
class node_reader,node_map_service toneIndigo
```

## Components

### Historical Data

- [Famine records](https://github.com/mathuramg/indian-history/blob/master/famines/data/famine.js): `famines/data/famine.js`
- [Division timelines](https://github.com/mathuramg/indian-history/blob/master/divide-rule/data/divideRule.js): `divide-rule/data/divideRule.js`
- **History datasets**
- [Battle records](https://github.com/mathuramg/indian-history/blob/master/battles.json): `battles.json`

### History Views

- [Famine view](https://github.com/mathuramg/indian-history/blob/master/famines/app.js): `famines/app.js`
- [Division view](https://github.com/mathuramg/indian-history/blob/master/divide-rule/app.js): `divide-rule/app.js`
- [Timeline renderer](https://github.com/mathuramg/indian-history/blob/master/js/timeline.js): `js/timeline.js`
- [Battle map](https://github.com/mathuramg/indian-history/blob/master/battles/sketch.js): `battles/sketch.js`
- [Wars chart](https://github.com/mathuramg/indian-history/blob/master/wars-gantt/app.js): `wars-gantt/app.js`

### Navigation

- [Page navigation](https://github.com/mathuramg/indian-history/blob/master/js/nav.js): `js/nav.js`
- [Keyboard controls](https://github.com/mathuramg/indian-history/blob/master/js/keyboard.js): `js/keyboard.js`
- [Section scrolling](https://github.com/mathuramg/indian-history/blob/master/libraries/scrollify.js): `libraries/scrollify.js`

### Other components

- **History reader**
- **Map tiles**

## Connections

- History reader → Famine view: opens (evidence: `README.md`)
- History reader → Division view: opens (evidence: `README.md`)
- History reader → Battle map: opens (evidence: `README.md`)
- Famine view → Timeline renderer: creates (evidence: `famines/app.js`)
- Division view → Timeline renderer: creates (evidence: `divide-rule/app.js`)
- Famine view → Famine records: selects project
- Division view → Division timelines: selects project
- Timeline renderer → Famine records: reads
- Timeline renderer → Division timelines: reads
- Famine view → Section scrolling: configures (evidence: `famines/app.js`)
- Division view → Section scrolling: configures (evidence: `divide-rule/app.js`)
- Famine view → Page navigation: creates (evidence: `famines/app.js`)
- Page navigation → Section scrolling: moves sections (evidence: `js/nav.js`)
- Keyboard controls → Section scrolling: advances sections (evidence: `js/keyboard.js`)
- Battle map → Battle records: loads (evidence: `battles/sketch.js`)
- Battle map → Map tiles: requests tiles
- History reader → Wars chart: opens
