A production-quality desktop flashcard application built with Electron, featuring SM-2 spaced repetition, audio caching, and designed for Tauri migration.
- Multiple Study Sets: Create, manage, and organize up to 50 study sets
- Flashcard Management: Add, edit, delete, and star flashcards (up to 500 per set)
- Bulk Import: Paste term-definition pairs with automatic delimiter detection
- Inline Editing: Click directly on terms/definitions to edit them
- Visual grid of all study sets with progress indicators
- Quick Actions: Study 5 min, Review Due Cards, Random Set
- Resume Section: Pick up interrupted sessions exactly where you left off
- Study streak and daily statistics
- Interactive Flashcard Carousel:
- Click or press Space to flip
- Arrow keys (←/→) to navigate
- Shuffle button for random order
- Term List: View all cards with mastery levels and due dates
- Per-term Controls: Star toggle, TTS listen button, inline editing
- Three Study Modes: Learn All, Study Starred, Review Due
- SM-2 Spaced Repetition (toggleable):
- Confidence grading: Again (1), Hard (2), Good (3), Easy (4)
- Optimized review intervals for long-term retention
- Due date tracking per card
- Multiple Choice Mode: Alternative to SM-2 grading
- Progress Tracking: Visual progress bar and batch summaries
- Session Auto-Save: Progress saved after every answer
- Browser TTS: Free, offline-capable using Web Speech API
- Premium TTS: ElevenLabs integration for ultra-realistic voices
- IndexedDB Audio Cache:
- 50MB default / 100MB max with LRU eviction
- Instant replay for cached audio
- Idle pre-caching for starred and upcoming cards
| Key | Action |
|---|---|
Space |
Flip flashcard |
← / → |
Navigate cards |
1 |
Grade: Again |
2 |
Grade: Hard |
3 |
Grade: Good |
4 |
Grade: Easy |
S |
Toggle star |
L |
Listen (TTS) |
Escape |
Exit/Close |
All shortcuts are customizable via Learn Settings.
- Cards studied per day
- Session duration tracking
- Study streaks
- Per-set mastery progress
- Export sets as JSON for backup or sharing
- Import JSON sets into the app
- Auto-Save: Session state is saved after every answered question
- Resume Prompt: On Home screen, "Pick up where you left off" shows if a saved session exists
- Session Data: Stores card IDs (not duplicates), progress, and mode
- Expiry: Sessions expire after 7 days of inactivity
- Clear on Complete: Session is automatically cleared when all cards are mastered
The app implements the SuperMemo 2 algorithm:
- Ease Factor: Starts at 2.5, adjusts based on performance
- Intervals: 1 day → 6 days → exponential growth
- Grading Impact:
- Again (1): Reset interval to 1 day, decrease ease
- Hard (2): Interval × 0.8, slight ease decrease
- Good (3): Standard progression
- Easy (4): Interval × 1.3, increase ease
Toggle SM-2 on/off via the settings cog in Learn Mode.
- Storage: IndexedDB database
studyset_audio_cache - Key Format:
${term}-${voiceId}(truncated to 100 chars) - Cache Size: Configurable, default 50MB with LRU eviction
- Pre-caching: Starred cards and next 5 cards are pre-cached in idle time
- Fallback: Browser TTS used if ElevenLabs fails or cache is cold
/
├── index.html # Main UI with all sections
├── main.js # Electron main process
├── preload.js # Electron bridge
├── package.json
└── src/
├── app.js # Entry point, event handlers
├── state.js # Central state management
├── navigation.js # Section show/hide logic
├── render.js # DOM rendering functions
├── storage.js # localStorage + IndexedDB
├── tts.js # Text-to-speech + caching
├── spacedRep.js # SM-2 algorithm
└── analytics.js # Local study tracking
- Node.js 16+
- npm 8+
npm installnpm startnpm run buildThis app is designed for seamless migration to Tauri:
- All state uses
localStorage/IndexedDB(no Electron IPC) - TTS uses standard Web APIs
- No
require()in frontend modules - ES Modules used throughout
# 1. Install Tauri CLI
npm install -D @tauri-apps/cli
# 2. Initialize Tauri project
npx tauri init
# 3. Configure tauri.conf.json
# Set distDir to "./" and devPath to point to index.html
# 4. Build for Windows
npx tauri build
# 5. Build for Android
npx tauri android init
npx tauri android buildThe frontend uses web-standard APIs exclusively. For platform-specific features (file dialogs, notifications), implement adapters in the Tauri Rust backend.
| Data | Storage | Key |
|---|---|---|
| Study Sets | localStorage | studyset_state |
| Learn Session | localStorage | studyset_learn_session |
| Schema Version | localStorage | studyset_version |
| Audio Cache | IndexedDB | studyset_audio_cache |
All persisted data includes schemaVersion, createdAt, and updatedAt for migrations.
- Maximum 50 study sets
- Maximum 500 cards per set
- Audio cache: 50-100MB with LRU eviction
- Session expiry: 7 days
ISC