# yoshio28/memorama architecture

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

- Interactive diagram: https://gitdiagram.com/yoshio28/memorama
- Repository: https://github.com/yoshio28/memorama

## Overview

Memora is a local Electron flashcard-study application. The principal workflow is choosing a deck, section, or saved study mode, building a scheduled-review or free-practice session, answering cards, and updating progress. The renderer also supports deck/section/card management, browsing and statistics, import/export, and preferences. Its scheduler is a pure SM-2 variant; persistence and file dialogs run through a secure preload bridge to the main process. Several renderer capabilities are documented but their implementation details were not sampled, so their internal links are not inferred.

Main entry points: [`src/index.html`](https://github.com/yoshio28/memorama/blob/main/src/index.html) (Application UI), [`src/app.js`](https://github.com/yoshio28/memorama/blob/main/src/app.js) (Study sessions), [`main.js`](https://github.com/yoshio28/memorama/blob/main/main.js) (Electron main), [`preload.js`](https://github.com/yoshio28/memorama/blob/main/preload.js) (Secure IPC bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_study["Study workflow"]
  node_renderer["Application UI<br/>[index.html]"]
  node_studylogic["Study sessions<br/>[app.js]"]
  node_scheduler["Spaced scheduler<br/>[scheduler.js]"]
  node_savedmodes["Saved study modes<br/>[app.js]"]
  node_practice["Free practice<br/>[app.js]"]
end

subgraph group_content["Deck content"]
  node_decks["Decks and sections<br/>[app.js]"]
  node_cards["Flashcards<br/>[app.js]"]
  node_browse["Browse and search<br/>[app.js]"]
  node_importexport["Import and export<br/>[app.js]"]
end

subgraph group_platform["Local platform"]
  node_bridge["Secure IPC bridge<br/>[preload.js]"]
  node_main["Electron main<br/>[main.js]"]
  node_data[("Local data file<br/>[main.js]")]
  node_backups[("Daily backups<br/>[main.js]")]
  node_filesystem["Local files"]
end

subgraph group_insights["Progress and settings"]
  node_stats["Statistics<br/>[app.js]"]
  node_preferences["Preferences and themes<br/>[app.js]"]
  node_history["Review history<br/>[app.js]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_renderer
node_renderer -->|"starts sessions"| node_studylogic
node_studylogic -->|"computes answers"| node_scheduler
node_studylogic -.->|"builds practice"| node_practice
node_studylogic -.->|"loads presets"| node_savedmodes
node_renderer -->|"manages"| node_decks
node_decks -->|"organizes"| node_cards
node_renderer -->|"opens"| node_browse
node_renderer -->|"imports and exports"| node_importexport
node_renderer -->|"views"| node_stats
node_renderer -->|"configures"| node_preferences
node_studylogic -.->|"records reviews"| node_history
node_renderer -->|"calls data API"| node_bridge
node_bridge -->|"sends IPC"| node_main
node_main -->|"reads and writes"| node_data
node_main -->|"creates daily copies"| node_backups
node_bridge -->|"opens and saves"| node_filesystem
node_main -->|"shows file dialogs"| node_filesystem

click node_renderer "https://github.com/yoshio28/memorama/blob/main/src/index.html"
click node_studylogic "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_scheduler "https://github.com/yoshio28/memorama/blob/main/src/scheduler.js"
click node_savedmodes "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_practice "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_decks "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_cards "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_browse "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_importexport "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_stats "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_preferences "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_history "https://github.com/yoshio28/memorama/blob/main/src/app.js"
click node_bridge "https://github.com/yoshio28/memorama/blob/main/preload.js"
click node_main "https://github.com/yoshio28/memorama/blob/main/main.js"
click node_data "https://github.com/yoshio28/memorama/blob/main/main.js"
click node_backups "https://github.com/yoshio28/memorama/blob/main/main.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_renderer,node_studylogic,node_scheduler,node_savedmodes,node_practice toneBlue
class node_decks,node_cards,node_browse,node_importexport toneAmber
class node_bridge,node_main,node_data,node_backups,node_filesystem toneMint
class node_stats,node_preferences,node_history toneRose
class node_learner toneIndigo
```

## Components

### Study workflow

- [Application UI](https://github.com/yoshio28/memorama/blob/main/src/index.html): `src/index.html`
- [Study sessions](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`
- [Spaced scheduler](https://github.com/yoshio28/memorama/blob/main/src/scheduler.js): `src/scheduler.js`
- [Saved study modes](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`
- [Free practice](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`

### Deck content

- [Decks and sections](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`
- [Flashcards](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`
- [Browse and search](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`
- [Import and export](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`

### Local platform

- [Secure IPC bridge](https://github.com/yoshio28/memorama/blob/main/preload.js): `preload.js`
- [Electron main](https://github.com/yoshio28/memorama/blob/main/main.js): `main.js`
- [Local data file](https://github.com/yoshio28/memorama/blob/main/main.js): `main.js`
- [Daily backups](https://github.com/yoshio28/memorama/blob/main/main.js): `main.js`
- **Local files**

### Progress and settings

- [Statistics](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`
- [Preferences and themes](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`
- [Review history](https://github.com/yoshio28/memorama/blob/main/src/app.js): `src/app.js`

### Other components

- **Learner**

## Connections

- Learner → Application UI: uses (evidence: `README.md`)
- Application UI → Study sessions: starts sessions (evidence: `src/app.js`)
- Study sessions → Spaced scheduler: computes answers (evidence: `src/app.js`)
- Study sessions → Free practice: builds practice (evidence: `src/app.js`)
- Study sessions → Saved study modes: loads presets (evidence: `src/app.js`)
- Application UI → Decks and sections: manages (evidence: `README.md`)
- Decks and sections → Flashcards: organizes (evidence: `README.md`)
- Application UI → Browse and search: opens (evidence: `README.md`)
- Application UI → Import and export: imports and exports (evidence: `README.md`)
- Application UI → Statistics: views (evidence: `README.md`)
- Application UI → Preferences and themes: configures (evidence: `README.md`)
- Study sessions → Review history: records reviews (evidence: `src/app.js`)
- Application UI → Secure IPC bridge: calls data API
- Secure IPC bridge → Electron main: sends IPC (evidence: `preload.js`)
- Electron main → Local data file: reads and writes (evidence: `main.js`)
- Electron main → Daily backups: creates daily copies (evidence: `main.js`)
- Secure IPC bridge → Local files: opens and saves (evidence: `preload.js`)
- Electron main → Local files: shows file dialogs (evidence: `main.js`)
