# ezhil04z/omadict-android architecture

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

- Interactive diagram: https://gitdiagram.com/ezhil04z/omadict-android
- Repository: https://github.com/ezhil04z/omadict-android

## Overview

OMADICT is an offline-first English dictionary packaged as an Android app. The user starts a lookup from the home or search UI; the app checks bundled dictionary data and provides offline spelling suggestions, then can enrich results online with synonyms, related words, and definitions. Other user-facing branches include word of the day, saved favorites and history, themes, and pronunciation. The Android activity is a Capacitor host for the web app. The sampled app source is partial, so the graph omits uncertain internal call paths and shows documented capabilities at the app-module level.

Main entry points: [`web/js/app.js`](https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js) (UI and lookup controller), [`web/index.html`](https://github.com/ezhil04z/omadict-android/blob/main/web/index.html) (Web app shell), [`android/app/src/main/java/com/omadict/app/MainActivity.java`](https://github.com/ezhil04z/omadict-android/blob/main/android/app/src/main/java/com/omadict/app/MainActivity.java) (Capacitor Android host), [`web/css/style.css`](https://github.com/ezhil04z/omadict-android/blob/main/web/css/style.css) (Responsive themes UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["App experience"]
  node_webpage["Web app shell<br/>[index.html]"]
  node_ui["UI and lookup controller<br/>[app.js]"]
  node_styles["Responsive themes UI<br/>[style.css]"]
end

subgraph group_lookup["Dictionary lookup"]
  node_offline[("Bundled dictionary<br/>[dict-data.js]")]
  node_datamuse["Datamuse API"]
  node_freedict["FreeDictionary API"]
  node_wotd["Word of the day<br/>[app.js]"]
end

subgraph group_personal["Personalization"]
  node_favorites["Favorites and history<br/>[app.js]"]
  node_theme["Theme preferences<br/>[app.js]"]
  node_localstorage[("Browser localStorage")]
end

subgraph group_platform["Android platform"]
  node_speech["System text-to-speech"]
  node_capacitor["Capacitor Android host<br/>[MainActivity.java]"]
end

node_user(("User"))

node_user -->|"opens"| node_webpage
node_webpage -->|"loads"| node_ui
node_ui -->|"looks up offline"| node_offline
node_ui -.->|"fetches suggestions and relations"| node_datamuse
node_ui -.->|"fetches definitions"| node_freedict
node_ui -->|"shows daily word"| node_wotd
node_ui -->|"manages saved words"| node_favorites
node_ui -->|"applies themes"| node_theme
node_favorites -->|"reads and writes"| node_localstorage
node_theme -->|"reads and writes"| node_localstorage
node_ui -->|"requests pronunciation"| node_speech
node_capacitor -->|"hosts"| node_webpage
node_webpage -->|"uses styles"| node_styles

click node_webpage "https://github.com/ezhil04z/omadict-android/blob/main/web/index.html"
click node_ui "https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js"
click node_styles "https://github.com/ezhil04z/omadict-android/blob/main/web/css/style.css"
click node_offline "https://github.com/ezhil04z/omadict-android/blob/main/web/js/dict-data.js"
click node_wotd "https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js"
click node_favorites "https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js"
click node_theme "https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js"
click node_capacitor "https://github.com/ezhil04z/omadict-android/blob/main/android/app/src/main/java/com/omadict/app/MainActivity.java"

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_webpage,node_ui,node_styles,node_user toneBlue
class node_offline,node_datamuse,node_freedict,node_wotd toneAmber
class node_favorites,node_theme,node_localstorage toneMint
class node_speech,node_capacitor toneRose
```

## Components

### App experience

- [Web app shell](https://github.com/ezhil04z/omadict-android/blob/main/web/index.html): `web/index.html`
- [UI and lookup controller](https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js): `web/js/app.js`
- [Responsive themes UI](https://github.com/ezhil04z/omadict-android/blob/main/web/css/style.css): `web/css/style.css`

### Dictionary lookup

- [Bundled dictionary](https://github.com/ezhil04z/omadict-android/blob/main/web/js/dict-data.js): `web/js/dict-data.js`
- **Datamuse API**
- **FreeDictionary API**
- [Word of the day](https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js): `web/js/app.js`

### Personalization

- [Favorites and history](https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js): `web/js/app.js`
- [Theme preferences](https://github.com/ezhil04z/omadict-android/blob/main/web/js/app.js): `web/js/app.js`
- **Browser localStorage**

### Android platform

- **System text-to-speech**
- [Capacitor Android host](https://github.com/ezhil04z/omadict-android/blob/main/android/app/src/main/java/com/omadict/app/MainActivity.java): `android/app/src/main/java/com/omadict/app/MainActivity.java`

### Other components

- **User**

## Connections

- User → Web app shell: opens
- Web app shell → UI and lookup controller: loads
- UI and lookup controller → Bundled dictionary: looks up offline
- UI and lookup controller → Datamuse API: fetches suggestions and relations
- UI and lookup controller → FreeDictionary API: fetches definitions
- UI and lookup controller → Word of the day: shows daily word
- UI and lookup controller → Favorites and history: manages saved words
- UI and lookup controller → Theme preferences: applies themes
- Favorites and history → Browser localStorage: reads and writes
- Theme preferences → Browser localStorage: reads and writes
- UI and lookup controller → System text-to-speech: requests pronunciation
- Capacitor Android host → Web app shell: hosts
- Web app shell → Responsive themes UI: uses styles
