Skip to content
Back to projects

PairWise Cards: spaced repetition flashcard application

Flashcard application designed to test three levels of recall effort, with spaced repetition and progress stored locally in the browser.

Problem

Different flashcard formats do not engage memory in the same way.

Swipe mode allows fast review, but relies heavily on self-assessment and can become too passive. Conversely, typing forces a complete answer, but sometimes requires reconstructing an entire formulation when only a specific piece of knowledge needs to be verified.

I therefore sought to offer an intermediate format: active enough to prompt recall, but light enough to avoid turning every review into a writing exercise.

The first version of the project, started in August 2024, combined too many features and relied on an architecture that was difficult to maintain. I set it aside, then returned with a narrower scope focused on a coherent MVP, completed in April 2026.

Approach

I developed three complementary modes: typing, swiping, and fill-in-the-blank.

Fill-in-the-blank mode automatically masks certain elements deemed important in the answer so the user can retrieve them without rewriting the entire response. Their selection relies on a scoring heuristic that takes into account proper nouns, numbers, technical terms, and word length.

The repetition engine is based on an SM-2 implementation that adapts review intervals according to answers. The different modes produce different evaluations to adapt interval calculation to the type of interaction.

The application adopts a local-first approach: decks, cards, and progress data are persisted in an IndexedDB database managed with Dexie.js. The database is versioned to allow the data model to evolve.

Typing mode validation is configurable per deck. Three tolerance levels adapt answer comparison to content type: a vocabulary list may favor exact matching, while a theoretical knowledge list may tolerate certain typos or spelling errors through Levenshtein distance comparison.

Results

The application allows creating and managing multiple decks, importing cards from CSV, JSON, or TSV files, and reviewing according to cards due by SM-2.

Progress is preserved between sessions directly in the browser, without a user account or backend. A dedicated page visualizes card distribution according to mastery level and progress.

The three learning modes, keyboard navigation, and free training mode allow adapting application use to different review situations.

I also added unit tests with Vitest, especially around fill-in-the-blank word selection logic.

Limits

Fill-in-the-blank mode relies on heuristics based on lexical and positional characteristics. This approach enables fully local operation, but it does not truly understand the semantic context of an answer.

The quality of selected words can therefore vary depending on content formulation.

Next steps

Improve fill-in-the-blank word selection with more contextual linguistic analysis.

Strengthen test coverage around the SM-2 algorithm and its edge cases.

Enrich progress statistics to provide more detailed tracking of review habits.