# rand-h/mofonaina-app architecture

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

- Interactive diagram: https://gitdiagram.com/rand-h/mofonaina-app
- Repository: https://github.com/rand-h/mofonaina-app

## Overview

Mofonaina is a multilingual web/mobile devotional app. The documented user journey centers on daily and annual devotional reading, with Bible reading and hymnbooks as major companion features. Sampled code shows the Bible page controller invoking its Bible API, and the hymn API fetching categorized JSON data. The README documents AI verse explanations, but implementation details and several app entry points are absent from the supplied excerpts, so those relationships are shown only where documented or left unconnected.

Main entry points: [`APIs/BibleAPI/app.js`](https://github.com/rand-h/mofonaina-app/blob/main/APIs/BibleAPI/app.js) (Bible page controller), [`APIs/FihiranaAPI/FihiranaAPI.js`](https://github.com/rand-h/mofonaina-app/blob/main/APIs/FihiranaAPI/FihiranaAPI.js) (Hymnbook API), [`data/verset_chaque_jour.json`](https://github.com/rand-h/mofonaina-app/blob/main/data/verset_chaque_jour.json) (Daily reading), [`data/mofonaina_full_2026.json`](https://github.com/rand-h/mofonaina-app/blob/main/data/mofonaina_full_2026.json) (Annual program)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_devotion["Daily devotion"]
  node_daily["Daily reading"]
  node_annual["Annual program"]
  node_ai["AI verse explanations"]
end

subgraph group_scripture["Bible reading"]
  node_bibleui["Bible page controller<br/>[app.js]"]
  node_bibleapi["Bible data and reading API<br/>[BibleAPI.js]"]
  node_bibleversions["Bible versions"]
  node_bibledata["Bible text datasets"]
  node_biblecompare["Version comparison<br/>[BibleAPI.js]"]
end

subgraph group_worship["Hymnbooks"]
  node_hymnapi["Hymnbook API<br/>[FihiranaAPI.js]"]
  node_hymndata["Hymn collections"]
end

subgraph group_language["Language support"]
  node_languages["Three-language interface"]
end

node_reader(("Reader"))

node_reader -->|"reads daily"| node_daily
node_reader -->|"follows program"| node_annual
node_reader -.->|"requests explanation"| node_ai
node_reader -->|"opens Bible"| node_bibleui
node_bibleui -->|"calls"| node_bibleapi
node_reader -->|"compares versions"| node_biblecompare
node_reader -->|"reads hymns"| node_hymnapi
node_hymnapi -->|"fetches JSON"| node_hymndata
node_reader -->|"uses app"| node_languages

click node_daily "https://github.com/rand-h/mofonaina-app/blob/main/data/verset_chaque_jour.json"
click node_annual "https://github.com/rand-h/mofonaina-app/blob/main/data/mofonaina_full_2026.json"
click node_bibleui "https://github.com/rand-h/mofonaina-app/blob/main/APIs/BibleAPI/app.js"
click node_bibleapi "https://github.com/rand-h/mofonaina-app/blob/main/APIs/BibleAPI/BibleAPI.js"
click node_bibleversions "https://github.com/rand-h/mofonaina-app/blob/main/data/baiboly/bible_versions.json"
click node_bibledata "https://github.com/rand-h/mofonaina-app/tree/main/data/baiboly"
click node_biblecompare "https://github.com/rand-h/mofonaina-app/blob/main/APIs/BibleAPI/BibleAPI.js"
click node_hymnapi "https://github.com/rand-h/mofonaina-app/blob/main/APIs/FihiranaAPI/FihiranaAPI.js"
click node_hymndata "https://github.com/rand-h/mofonaina-app/tree/main/data/fihirana"

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_daily,node_annual,node_ai toneBlue
class node_bibleui,node_bibleapi,node_bibleversions,node_bibledata,node_biblecompare toneAmber
class node_hymnapi,node_hymndata toneMint
class node_languages toneRose
class node_reader toneIndigo
```

## Components

### Daily devotion

- [Daily reading](https://github.com/rand-h/mofonaina-app/blob/main/data/verset_chaque_jour.json): `data/verset_chaque_jour.json`
- [Annual program](https://github.com/rand-h/mofonaina-app/blob/main/data/mofonaina_full_2026.json): `data/mofonaina_full_2026.json`
- **AI verse explanations**

### Bible reading

- [Bible page controller](https://github.com/rand-h/mofonaina-app/blob/main/APIs/BibleAPI/app.js): `APIs/BibleAPI/app.js`
- [Bible data and reading API](https://github.com/rand-h/mofonaina-app/blob/main/APIs/BibleAPI/BibleAPI.js): `APIs/BibleAPI/BibleAPI.js`
- [Bible versions](https://github.com/rand-h/mofonaina-app/blob/main/data/baiboly/bible_versions.json): `data/baiboly/bible_versions.json`
- [Bible text datasets](https://github.com/rand-h/mofonaina-app/tree/main/data/baiboly): `data/baiboly`
- [Version comparison](https://github.com/rand-h/mofonaina-app/blob/main/APIs/BibleAPI/BibleAPI.js): `APIs/BibleAPI/BibleAPI.js`

### Hymnbooks

- [Hymnbook API](https://github.com/rand-h/mofonaina-app/blob/main/APIs/FihiranaAPI/FihiranaAPI.js): `APIs/FihiranaAPI/FihiranaAPI.js`
- [Hymn collections](https://github.com/rand-h/mofonaina-app/tree/main/data/fihirana): `data/fihirana`

### Language support

- **Three-language interface**

### Other components

- **Reader**

## Connections

- Reader → Daily reading: reads daily (evidence: `README.md`)
- Reader → Annual program: follows program (evidence: `README.md`)
- Reader → AI verse explanations: requests explanation (evidence: `README.md`)
- Reader → Bible page controller: opens Bible (evidence: `README.md`)
- Bible page controller → Bible data and reading API: calls (evidence: `APIs/BibleAPI/app.js`)
- Reader → Version comparison: compares versions (evidence: `README.md`)
- Reader → Hymnbook API: reads hymns (evidence: `README.md`)
- Hymnbook API → Hymn collections: fetches JSON (evidence: `APIs/FihiranaAPI/FihiranaAPI.js`)
- Reader → Three-language interface: uses app (evidence: `README.md`)
