# rifat064/shobdodaily architecture

> Architecture diagram of the GitHub repository rifat064/shobdodaily, 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/rifat064/shobdodaily
- Repository: https://github.com/rifat064/shobdodaily

## Overview

ShobdoDaily is a browser-based vocabulary-learning app. Learners enter through the home view, where they can study the daily card, hear pronunciations, bookmark words, and mark learning progress; app startup routes between home, bookmarks, settings, premium, and admin. Daily-card loading combines date utilities, Firebase retrieval, and IndexedDB support. The README only identifies this as a web app, so feature detail comes from sampled source; source for service-worker behavior and some premium flows was not inspected.

Main entry points: [`src/app/main.js`](https://github.com/rifat064/shobdodaily/blob/main/src/app/main.js) (App startup), [`src/app/views/home.js`](https://github.com/rifat064/shobdodaily/blob/main/src/app/views/home.js) (Daily learning), [`src/data/firebase.js`](https://github.com/rifat064/shobdodaily/blob/main/src/data/firebase.js) (Firebase services), [`src/core/state.js`](https://github.com/rifat064/shobdodaily/blob/main/src/core/state.js) (Local app state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_startup["App startup<br/>[main.js]"]
  node_routing["View routing<br/>[router.js]"]
end

subgraph group_learning["Learning experience"]
  node_home["Daily learning<br/>[home.js]"]
  node_bookmarks["Bookmarks<br/>[bookmark.js]"]
  node_premium["Premium access<br/>[premium.js]"]
  node_admin["Card publishing<br/>[admin.js]"]
end

subgraph group_account["Account and preferences"]
  node_settings["Settings<br/>[settings.js]"]
  node_state["Local app state<br/>[state.js]"]
end

subgraph group_content["Content and persistence"]
  node_dates["Date utilities<br/>[dates.js]"]
  node_firebase["Firebase services<br/>[firebase.js]"]
  node_indexeddb[("Offline card store<br/>[idb.js]")]
end

node_learner(("Learner"))
node_cloud[("Firebase backend")]
node_browser["Browser platform"]

node_learner -->|"opens app"| node_startup
node_startup -->|"initializes"| node_routing
node_startup -->|"initializes"| node_home
node_startup -->|"initializes"| node_settings
node_startup -->|"initializes"| node_bookmarks
node_startup -->|"initializes"| node_premium
node_startup -->|"loads and initializes"| node_admin
node_startup -->|"loads preferences"| node_state
node_startup -->|"listens for auth"| node_firebase
node_startup -->|"registers worker"| node_browser
node_learner -->|"selects view"| node_routing
node_routing -->|"shows view"| node_home
node_home -->|"gets today key"| node_dates
node_home -->|"fetches daily card"| node_firebase
node_home -->|"reads and caches cards"| node_indexeddb
node_home -->|"reads and saves progress"| node_state
node_home -->|"opens paywall"| node_premium
node_bookmarks -->|"reads bookmarks"| node_state
node_settings -->|"saves preferences"| node_state
node_settings -->|"auth actions"| node_firebase
node_premium -->|"saves premium status"| node_state
node_admin -->|"publishes card"| node_firebase
node_firebase -->|"reads and writes"| node_cloud
node_firebase -->|"uses auth SDK"| node_browser
node_indexeddb -->|"uses IndexedDB"| node_browser
node_state -->|"persists locally"| node_browser
node_settings -->|"schedules notifications"| node_browser

click node_startup "https://github.com/rifat064/shobdodaily/blob/main/src/app/main.js"
click node_routing "https://github.com/rifat064/shobdodaily/blob/main/src/app/router.js"
click node_home "https://github.com/rifat064/shobdodaily/blob/main/src/app/views/home.js"
click node_bookmarks "https://github.com/rifat064/shobdodaily/blob/main/src/app/views/bookmark.js"
click node_premium "https://github.com/rifat064/shobdodaily/blob/main/src/app/views/premium.js"
click node_admin "https://github.com/rifat064/shobdodaily/blob/main/src/app/views/admin.js"
click node_settings "https://github.com/rifat064/shobdodaily/blob/main/src/app/views/settings.js"
click node_state "https://github.com/rifat064/shobdodaily/blob/main/src/core/state.js"
click node_dates "https://github.com/rifat064/shobdodaily/blob/main/src/core/dates.js"
click node_firebase "https://github.com/rifat064/shobdodaily/blob/main/src/data/firebase.js"
click node_indexeddb "https://github.com/rifat064/shobdodaily/blob/main/src/data/idb.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_startup,node_routing,node_browser toneBlue
class node_home,node_bookmarks,node_premium,node_admin,node_cloud toneAmber
class node_settings,node_state toneMint
class node_dates,node_firebase,node_indexeddb toneRose
class node_learner toneIndigo
```

## Components

### App shell

- [App startup](https://github.com/rifat064/shobdodaily/blob/main/src/app/main.js): `src/app/main.js`
- [View routing](https://github.com/rifat064/shobdodaily/blob/main/src/app/router.js): `src/app/router.js`

### Learning experience

- [Daily learning](https://github.com/rifat064/shobdodaily/blob/main/src/app/views/home.js): `src/app/views/home.js`
- [Bookmarks](https://github.com/rifat064/shobdodaily/blob/main/src/app/views/bookmark.js): `src/app/views/bookmark.js`
- [Premium access](https://github.com/rifat064/shobdodaily/blob/main/src/app/views/premium.js): `src/app/views/premium.js`
- [Card publishing](https://github.com/rifat064/shobdodaily/blob/main/src/app/views/admin.js): `src/app/views/admin.js`

### Account and preferences

- [Settings](https://github.com/rifat064/shobdodaily/blob/main/src/app/views/settings.js): `src/app/views/settings.js`
- [Local app state](https://github.com/rifat064/shobdodaily/blob/main/src/core/state.js): `src/core/state.js`

### Content and persistence

- [Date utilities](https://github.com/rifat064/shobdodaily/blob/main/src/core/dates.js): `src/core/dates.js`
- [Firebase services](https://github.com/rifat064/shobdodaily/blob/main/src/data/firebase.js): `src/data/firebase.js`
- [Offline card store](https://github.com/rifat064/shobdodaily/blob/main/src/data/idb.js): `src/data/idb.js`

### Other components

- **Learner**
- **Firebase backend**
- **Browser platform**

## Connections

- Learner → App startup: opens app (evidence: `src/app/main.js`)
- App startup → View routing: initializes (evidence: `src/app/main.js`)
- App startup → Daily learning: initializes (evidence: `src/app/main.js`)
- App startup → Settings: initializes (evidence: `src/app/main.js`)
- App startup → Bookmarks: initializes (evidence: `src/app/main.js`)
- App startup → Premium access: initializes (evidence: `src/app/main.js`)
- App startup → Card publishing: loads and initializes (evidence: `src/app/main.js`)
- App startup → Local app state: loads preferences (evidence: `src/app/main.js`)
- App startup → Firebase services: listens for auth (evidence: `src/app/main.js`)
- App startup → Browser platform: registers worker (evidence: `src/app/main.js`)
- Learner → View routing: selects view (evidence: `src/app/router.js`)
- View routing → Daily learning: shows view (evidence: `src/app/router.js`)
- Daily learning → Date utilities: gets today key (evidence: `src/app/views/home.js`)
- Daily learning → Firebase services: fetches daily card (evidence: `src/app/views/home.js`)
- Daily learning → Offline card store: reads and caches cards (evidence: `src/app/views/home.js`)
- Daily learning → Local app state: reads and saves progress (evidence: `src/app/views/home.js`)
- Daily learning → Premium access: opens paywall (evidence: `src/app/views/home.js`)
- Bookmarks → Local app state: reads bookmarks (evidence: `src/app/views/bookmark.js`)
- Settings → Local app state: saves preferences (evidence: `src/app/views/settings.js`)
- Settings → Firebase services: auth actions (evidence: `src/app/views/settings.js`)
- Premium access → Local app state: saves premium status (evidence: `src/app/views/premium.js`)
- Card publishing → Firebase services: publishes card (evidence: `src/app/views/admin.js`)
- Firebase services → Firebase backend: reads and writes (evidence: `src/data/firebase.js`)
- Firebase services → Browser platform: uses auth SDK (evidence: `src/data/firebase.js`)
- Offline card store → Browser platform: uses IndexedDB (evidence: `src/data/idb.js`)
- Local app state → Browser platform: persists locally (evidence: `src/core/state.js`)
- Settings → Browser platform: schedules notifications (evidence: `src/app/views/settings.js`)
