# enzouk/runora architecture

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

## Overview

Runora is a cross-platform flashcard app centered on a study loop: users organize decks and cards, review scheduled prompts, rate recall, and have FSRS determine future intervals. The React app also supports configurable note types, media, import/export, addons, settings, and Google Drive sync. The README lists statistics as a capability, but the supplied tree and excerpts do not establish a distinct statistics implementation. Some subsystem links below are supported by the SOURCE INDEX rather than inspected source excerpts.

Main entry points: [`src/App.tsx`](https://github.com/enzouk/runora/blob/main/src/App.tsx) (App coordinator), [`src/services/storage.ts`](https://github.com/enzouk/runora/blob/main/src/services/storage.ts) (Collection storage), [`src/components/study/StudyView.tsx`](https://github.com/enzouk/runora/blob/main/src/components/study/StudyView.tsx) (Study session), [`src/services/gdriveSync.ts`](https://github.com/enzouk/runora/blob/main/src/services/gdriveSync.ts) (Google Drive sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and authoring"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_decks["Deck management<br/>[DeckList.tsx]"]
  node_deckconfig["Deck options<br/>[DeckModal.tsx]"]
  node_cards["Card browser<br/>[CardBrowser.tsx]"]
  node_editor["Card editor"]
  node_notetypes["Note types"]
end

subgraph group_review["Study and scheduling"]
  node_study["Study session<br/>[StudyView.tsx]"]
  node_content["Card rendering"]
  node_ratings["Review ratings<br/>[RatingButtons.tsx]"]
  node_scheduler["FSRS scheduler<br/>[algorithm.ts]"]
  node_durations["Interval formatting<br/>[timespan.ts]"]
end

subgraph group_data["Local data and media"]
  node_storage[("Collection storage<br/>[storage.ts]")]
  node_cloze["Cloze templates<br/>[clozeService.ts]"]
  node_media[("Media storage<br/>[mediaStore.ts]")]
  node_imports["Import and export<br/>[exportImport.ts]"]
  node_settings["Settings<br/>[SettingsModal.tsx]"]
end

subgraph group_integrations["Extensions and sync"]
  node_addonui["Addon manager<br/>[AddonsView.tsx]"]
  node_addons["Addon runtime<br/>[addonSystem.ts]"]
  node_addondata["Addon storage<br/>[addonStorage.ts]"]
  node_addonfs["Addon filesystem<br/>[addonFs.ts]"]
  node_syncui["Sync controls<br/>[useDriveSync.ts]"]
  node_sync["Google Drive sync<br/>[gdriveSync.ts]"]
end

node_user(("Learner"))
node_drive(("Google Drive"))

node_user -->|"uses"| node_app
node_app -->|"shows"| node_decks
node_app -->|"opens"| node_deckconfig
node_app -->|"shows"| node_cards
node_app -->|"opens"| node_editor
node_app -->|"shows"| node_notetypes
node_app -->|"shows"| node_study
node_app -->|"reads"| node_storage
node_app -->|"imports"| node_imports
node_cards -->|"reads"| node_storage
node_cards -->|"uses"| node_cloze
node_cards -->|"uses"| node_media
node_cards -->|"opens"| node_editor
node_editor -->|"uses"| node_storage
node_editor -->|"uses"| node_addons
node_notetypes -->|"reads"| node_storage
node_study -->|"schedules"| node_scheduler
node_study -->|"uses"| node_storage
node_study -->|"uses"| node_cloze
node_study -->|"renders"| node_content
node_study -->|"shows"| node_ratings
node_scheduler -->|"formats intervals"| node_durations
node_storage -->|"uses"| node_cloze
node_storage -->|"uses"| node_media
node_settings -->|"uses"| node_storage
node_settings -->|"uses"| node_sync
node_settings -->|"uses"| node_imports
node_addonui -->|"manages"| node_addons
node_addons -->|"loads data"| node_addondata
node_addondata -->|"reads files"| node_addonfs
node_syncui -->|"invokes"| node_sync
node_sync -->|"uses"| node_storage
node_sync -->|"uses"| node_media
node_sync -->|"uses"| node_imports
node_sync -.->|"syncs with"| node_drive

click node_app "https://github.com/enzouk/runora/blob/main/src/App.tsx"
click node_decks "https://github.com/enzouk/runora/blob/main/src/components/decks/DeckList.tsx"
click node_deckconfig "https://github.com/enzouk/runora/blob/main/src/components/decks/DeckModal.tsx"
click node_cards "https://github.com/enzouk/runora/blob/main/src/components/cards/CardBrowser.tsx"
click node_editor "https://github.com/enzouk/runora/blob/main/src/components/cards/CardEditorModal.tsx"
click node_notetypes "https://github.com/enzouk/runora/blob/main/src/components/notetypes/NoteTypeManager.tsx"
click node_study "https://github.com/enzouk/runora/blob/main/src/components/study/StudyView.tsx"
click node_content "https://github.com/enzouk/runora/blob/main/src/components/study/CardContentRenderer.tsx"
click node_ratings "https://github.com/enzouk/runora/blob/main/src/components/study/RatingButtons.tsx"
click node_scheduler "https://github.com/enzouk/runora/blob/main/src/fsrs/algorithm.ts"
click node_durations "https://github.com/enzouk/runora/blob/main/src/fsrs/timespan.ts"
click node_storage "https://github.com/enzouk/runora/blob/main/src/services/storage.ts"
click node_cloze "https://github.com/enzouk/runora/blob/main/src/services/clozeService.ts"
click node_media "https://github.com/enzouk/runora/blob/main/src/services/mediaStore.ts"
click node_imports "https://github.com/enzouk/runora/blob/main/src/services/exportImport.ts"
click node_settings "https://github.com/enzouk/runora/blob/main/src/components/settings/SettingsModal.tsx"
click node_addonui "https://github.com/enzouk/runora/blob/main/src/components/addons/AddonsView.tsx"
click node_addons "https://github.com/enzouk/runora/blob/main/src/services/addonSystem.ts"
click node_addondata "https://github.com/enzouk/runora/blob/main/src/services/addonStorage.ts"
click node_addonfs "https://github.com/enzouk/runora/blob/main/src/services/addonFs.ts"
click node_syncui "https://github.com/enzouk/runora/blob/main/src/components/sync/useDriveSync.ts"
click node_sync "https://github.com/enzouk/runora/blob/main/src/services/gdriveSync.ts"

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_app,node_decks,node_deckconfig,node_cards,node_editor,node_notetypes toneBlue
class node_study,node_content,node_ratings,node_scheduler,node_durations toneAmber
class node_storage,node_cloze,node_media,node_imports,node_settings toneMint
class node_addonui,node_addons,node_addondata,node_addonfs,node_syncui,node_sync toneRose
class node_user,node_drive toneIndigo
```

## Components

### App and authoring

- [App coordinator](https://github.com/enzouk/runora/blob/main/src/App.tsx): `src/App.tsx`
- [Deck management](https://github.com/enzouk/runora/blob/main/src/components/decks/DeckList.tsx): `src/components/decks/DeckList.tsx`
- [Deck options](https://github.com/enzouk/runora/blob/main/src/components/decks/DeckModal.tsx): `src/components/decks/DeckModal.tsx`
- [Card browser](https://github.com/enzouk/runora/blob/main/src/components/cards/CardBrowser.tsx): `src/components/cards/CardBrowser.tsx`
- [Card editor](https://github.com/enzouk/runora/blob/main/src/components/cards/CardEditorModal.tsx): `src/components/cards/CardEditorModal.tsx`
- [Note types](https://github.com/enzouk/runora/blob/main/src/components/notetypes/NoteTypeManager.tsx): `src/components/notetypes/NoteTypeManager.tsx`

### Study and scheduling

- [Study session](https://github.com/enzouk/runora/blob/main/src/components/study/StudyView.tsx): `src/components/study/StudyView.tsx`
- [Card rendering](https://github.com/enzouk/runora/blob/main/src/components/study/CardContentRenderer.tsx): `src/components/study/CardContentRenderer.tsx`
- [Review ratings](https://github.com/enzouk/runora/blob/main/src/components/study/RatingButtons.tsx): `src/components/study/RatingButtons.tsx`
- [FSRS scheduler](https://github.com/enzouk/runora/blob/main/src/fsrs/algorithm.ts): `src/fsrs/algorithm.ts`
- [Interval formatting](https://github.com/enzouk/runora/blob/main/src/fsrs/timespan.ts): `src/fsrs/timespan.ts`

### Local data and media

- [Collection storage](https://github.com/enzouk/runora/blob/main/src/services/storage.ts): `src/services/storage.ts`
- [Cloze templates](https://github.com/enzouk/runora/blob/main/src/services/clozeService.ts): `src/services/clozeService.ts`
- [Media storage](https://github.com/enzouk/runora/blob/main/src/services/mediaStore.ts): `src/services/mediaStore.ts`
- [Import and export](https://github.com/enzouk/runora/blob/main/src/services/exportImport.ts): `src/services/exportImport.ts`
- [Settings](https://github.com/enzouk/runora/blob/main/src/components/settings/SettingsModal.tsx): `src/components/settings/SettingsModal.tsx`

### Extensions and sync

- [Addon manager](https://github.com/enzouk/runora/blob/main/src/components/addons/AddonsView.tsx): `src/components/addons/AddonsView.tsx`
- [Addon runtime](https://github.com/enzouk/runora/blob/main/src/services/addonSystem.ts): `src/services/addonSystem.ts`
- [Addon storage](https://github.com/enzouk/runora/blob/main/src/services/addonStorage.ts): `src/services/addonStorage.ts`
- [Addon filesystem](https://github.com/enzouk/runora/blob/main/src/services/addonFs.ts): `src/services/addonFs.ts`
- [Sync controls](https://github.com/enzouk/runora/blob/main/src/components/sync/useDriveSync.ts): `src/components/sync/useDriveSync.ts`
- [Google Drive sync](https://github.com/enzouk/runora/blob/main/src/services/gdriveSync.ts): `src/services/gdriveSync.ts`

### Other components

- **Learner**
- **Google Drive**

## Connections

- Learner → App coordinator: uses
- App coordinator → Deck management: shows (evidence: `src/App.tsx`)
- App coordinator → Deck options: opens (evidence: `src/App.tsx`)
- App coordinator → Card browser: shows (evidence: `src/App.tsx`)
- App coordinator → Card editor: opens (evidence: `src/App.tsx`)
- App coordinator → Note types: shows (evidence: `src/App.tsx`)
- App coordinator → Study session: shows (evidence: `src/App.tsx`)
- App coordinator → Collection storage: reads (evidence: `src/App.tsx`)
- App coordinator → Import and export: imports (evidence: `src/App.tsx`)
- Card browser → Collection storage: reads (evidence: `src/components/cards/CardBrowser.tsx`)
- Card browser → Cloze templates: uses (evidence: `src/components/cards/CardBrowser.tsx`)
- Card browser → Media storage: uses (evidence: `src/components/cards/CardBrowser.tsx`)
- Card browser → Card editor: opens (evidence: `src/components/cards/CardBrowser.tsx`)
- Card editor → Collection storage: uses (evidence: `src/components/cards/CardEditorModal.tsx`)
- Card editor → Addon runtime: uses (evidence: `src/components/cards/CardEditorModal.tsx`)
- Note types → Collection storage: reads (evidence: `src/components/notetypes/NoteTypeManager.tsx`)
- Study session → FSRS scheduler: schedules (evidence: `src/components/study/StudyView.tsx`)
- Study session → Collection storage: uses (evidence: `src/components/study/StudyView.tsx`)
- Study session → Cloze templates: uses (evidence: `src/components/study/StudyView.tsx`)
- Study session → Card rendering: renders (evidence: `src/components/study/StudyView.tsx`)
- Study session → Review ratings: shows (evidence: `src/components/study/StudyView.tsx`)
- FSRS scheduler → Interval formatting: formats intervals (evidence: `src/fsrs/algorithm.ts`)
- Collection storage → Cloze templates: uses (evidence: `src/services/storage.ts`)
- Collection storage → Media storage: uses (evidence: `src/services/storage.ts`)
- Settings → Collection storage: uses (evidence: `src/components/settings/SettingsModal.tsx`)
- Settings → Google Drive sync: uses (evidence: `src/components/settings/SettingsModal.tsx`)
- Settings → Import and export: uses (evidence: `src/components/settings/SettingsModal.tsx`)
- Addon manager → Addon runtime: manages (evidence: `src/components/addons/AddonsView.tsx`)
- Addon runtime → Addon storage: loads data (evidence: `src/services/addonSystem.ts`)
- Addon storage → Addon filesystem: reads files (evidence: `src/services/addonStorage.ts`)
- Sync controls → Google Drive sync: invokes (evidence: `src/components/sync/useDriveSync.ts`)
- Google Drive sync → Collection storage: uses (evidence: `src/services/gdriveSync.ts`)
- Google Drive sync → Media storage: uses (evidence: `src/services/gdriveSync.ts`)
- Google Drive sync → Import and export: uses (evidence: `src/services/gdriveSync.ts`)
- Google Drive sync → Google Drive: syncs with
