# barqx/quran-cognate-lexicon architecture

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

- Interactive diagram: https://gitdiagram.com/barqx/quran-cognate-lexicon
- Repository: https://github.com/barqx/quran-cognate-lexicon

## Overview

This is a static Qur’anic Arabic research portal with two user-facing paths: analyze a root for Hebrew cognates, live lexicon evidence, and comparative script forms; or open the input in classical Arabic dictionaries and Qur’anic corpora. The graph separates analysis, reference content, and research tools. The excerpts support the main analysis calls and data use; some UI wiring and documented capabilities are represented only where the README makes the relationship explicit.

Main entry points: [`js/app.js`](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/app.js) (Root Analyzer), [`js/dialogs.js`](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/dialogs.js) (Educational Dialogs), [`js/lexicon-links.js`](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/lexicon-links.js) (Arabic Lexicon Directory), [`js/api.js`](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/api.js) (Hebrew Lexicon Lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Root Analysis"]
  node_analyzer["Root Analyzer<br/>[app.js]"]
  node_phonetics["Normalization &amp; Morphology<br/>[phonetics.js]"]
  node_matrix["Script Correspondences<br/>[matrix.js]"]
  node_hebrew["Hebrew Lexicon Lookup<br/>[api.js]"]
end

subgraph group_reference["Reference Content"]
  node_sefaria["Sefaria Dictionaries"]
  node_wiktionary["Wiktionary"]
  node_scriptdata["Script Reference Data<br/>[script-info.js]"]
  node_termedata["Lexicon Learning Data<br/>[lexicon-terms.js]"]
  node_arabicrefs["Arabic Dictionaries &amp; Corpora"]
end

subgraph group_research["Research Tools"]
  node_arabiclinks["Arabic Lexicon Directory<br/>[lexicon-links.js]"]
  node_export["Brief &amp; Link Export<br/>[export.js]"]
  node_history[("Recent Root Shelf<br/>[storage.js]")]
end

subgraph group_experience["Portal Experience"]
  node_portal["Portal Interface<br/>[index.html]"]
  node_dialogs["Educational Dialogs<br/>[dialogs.js]"]
  node_modal["Modal Scroll Lock<br/>[modal.js]"]
  node_theme["Theme &amp; Deep Links<br/>[theme.js]"]
end

node_researcher(("Researcher"))

node_researcher -->|"uses"| node_portal
node_portal -->|"submits root"| node_analyzer
node_analyzer -->|"normalizes and classifies"| node_phonetics
node_phonetics -->|"reads correspondences"| node_matrix
node_analyzer -->|"requests definitions"| node_hebrew
node_hebrew -->|"fetches entries"| node_sefaria
node_hebrew -->|"fetches definitions"| node_wiktionary
node_analyzer -->|"records root"| node_history
node_dialogs -->|"renders script details"| node_scriptdata
node_dialogs -->|"reads term explanations"| node_termedata
node_dialogs -->|"uses modal behavior"| node_modal
node_researcher -->|"enters Arabic lookup"| node_arabiclinks
node_arabiclinks -->|"normalizes query"| node_phonetics
node_arabiclinks -->|"opens source links"| node_arabicrefs
node_analyzer -->|"provides analysis"| node_export
node_analyzer -->|"offers learning panels"| node_dialogs
node_theme -->|"runs shared root"| node_analyzer
node_theme -->|"runs shared lookup"| node_arabiclinks
node_researcher -->|"exports research"| node_export

click node_portal "https://github.com/barqx/quran-cognate-lexicon/blob/master/index.html"
click node_analyzer "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/app.js"
click node_phonetics "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/phonetics.js"
click node_matrix "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/matrix.js"
click node_hebrew "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/api.js"
click node_scriptdata "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/data/script-info.js"
click node_termedata "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/data/lexicon-terms.js"
click node_dialogs "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/dialogs.js"
click node_modal "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/modal.js"
click node_arabiclinks "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/lexicon-links.js"
click node_export "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/export.js"
click node_history "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/storage.js"
click node_theme "https://github.com/barqx/quran-cognate-lexicon/blob/master/js/theme.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_analyzer,node_phonetics,node_matrix,node_hebrew toneBlue
class node_sefaria,node_wiktionary,node_scriptdata,node_termedata,node_arabicrefs toneAmber
class node_arabiclinks,node_export,node_history toneMint
class node_portal,node_dialogs,node_modal,node_theme toneRose
class node_researcher toneIndigo
```

## Components

### Root Analysis

- [Root Analyzer](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/app.js): `js/app.js`
- [Normalization & Morphology](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/phonetics.js): `js/phonetics.js`
- [Script Correspondences](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/matrix.js): `js/matrix.js`
- [Hebrew Lexicon Lookup](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/api.js): `js/api.js`

### Reference Content

- **Sefaria Dictionaries**
- **Wiktionary**
- [Script Reference Data](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/data/script-info.js): `js/data/script-info.js`
- [Lexicon Learning Data](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/data/lexicon-terms.js): `js/data/lexicon-terms.js`
- **Arabic Dictionaries & Corpora**

### Research Tools

- [Arabic Lexicon Directory](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/lexicon-links.js): `js/lexicon-links.js`
- [Brief & Link Export](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/export.js): `js/export.js`
- [Recent Root Shelf](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/storage.js): `js/storage.js`

### Portal Experience

- [Portal Interface](https://github.com/barqx/quran-cognate-lexicon/blob/master/index.html): `index.html`
- [Educational Dialogs](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/dialogs.js): `js/dialogs.js`
- [Modal Scroll Lock](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/modal.js): `js/modal.js`
- [Theme & Deep Links](https://github.com/barqx/quran-cognate-lexicon/blob/master/js/theme.js): `js/theme.js`

### Other components

- **Researcher**

## Connections

- Researcher → Portal Interface: uses (evidence: `README.md`)
- Portal Interface → Root Analyzer: submits root (evidence: `README.md`)
- Root Analyzer → Normalization & Morphology: normalizes and classifies (evidence: `js/app.js`)
- Normalization & Morphology → Script Correspondences: reads correspondences (evidence: `js/phonetics.js`)
- Root Analyzer → Hebrew Lexicon Lookup: requests definitions (evidence: `js/app.js`)
- Hebrew Lexicon Lookup → Sefaria Dictionaries: fetches entries (evidence: `js/api.js`)
- Hebrew Lexicon Lookup → Wiktionary: fetches definitions (evidence: `js/api.js`)
- Root Analyzer → Recent Root Shelf: records root (evidence: `js/app.js`)
- Educational Dialogs → Script Reference Data: renders script details (evidence: `js/dialogs.js`)
- Educational Dialogs → Lexicon Learning Data: reads term explanations (evidence: `js/dialogs.js`)
- Educational Dialogs → Modal Scroll Lock: uses modal behavior (evidence: `README.md`)
- Researcher → Arabic Lexicon Directory: enters Arabic lookup (evidence: `README.md`)
- Arabic Lexicon Directory → Normalization & Morphology: normalizes query (evidence: `js/lexicon-links.js`)
- Arabic Lexicon Directory → Arabic Dictionaries & Corpora: opens source links (evidence: `js/lexicon-links.js`)
- Root Analyzer → Brief & Link Export: provides analysis (evidence: `js/export.js`)
- Root Analyzer → Educational Dialogs: offers learning panels (evidence: `README.md`)
- Theme & Deep Links → Root Analyzer: runs shared root (evidence: `js/theme.js`)
- Theme & Deep Links → Arabic Lexicon Directory: runs shared lookup (evidence: `js/theme.js`)
- Researcher → Brief & Link Export: exports research (evidence: `README.md`)
