Study App

Vocis: How I Built a Study App Around Spaced Repetition

There are plenty of flashcard apps. I built Vocis anyway — a study app structured the way school actually works: you don't study “cards”, you study for an exam. Here I explain the decisions behind it.

Subject, exam, study set

Most apps only know decks. In Vocis everything hangs on a fixed order: a subject contains exams, an exam contains study sets. On top of that there is an exam calendar. Each exam can have a date, a target grade and milestones, and a countdown shows how much time is left. So the app answers not only “What do I know already?” but also “What do I need to know by when?”.

The database does the scheduling

The core is spaced repetition: cards you know well come back at ever longer intervals, difficult cards more often. Vocis uses the well-known SM-2 algorithm for this. What is unusual is where it runs: not in the browser, but as a function directly in the database. Every answer is reported there, and the database updates the card and writes the study log in a single transaction. Either both are saved or neither — half a learning state cannot exist. Cards I rate “Again” reappear in the same session after three other cards.

Six ways to study

Merely flipping cards gets monotonous quickly, and it mostly tests recognition. That is why there are six study modes:

  • Flashcards — swipe: right means known, left means still learning.
  • Learn — rounds of seven terms, first multiple choice, then writing.
  • Write — type the answer; capitalisation and punctuation don't matter, and a single typo counts as “almost right”.
  • Spell — the word is read aloud and you write it down.
  • Test — true/false, multiple choice, matching and writing mixed together, with an evaluation.
  • Match — six pairs against the clock, and every mistake costs a second.

Reading aloud is handled by the browser's own speech output. It costs nothing and needs no additional service.

Import without retyping

Nobody wants to type in a hundred vocabulary items by hand. So the import understands almost any format: exports from Quizlet or Anki with tabs, CSV files from Excel with semicolons, simple word lists with a hyphen, equals sign or colon, and whole Excel files with several sheets. Parsing happens entirely in the browser, and a preview flags empty rows and duplicates before anything is saved. The library for Excel files is only loaded when someone actually drops an Excel file — if you never need it, you never load it.

Security lives in the database

For an app with accounts the most important question is: can anyone see someone else's data? In Vocis that is decided not by the application code but by the database itself. Every row belongs to an account, and a rule in the database (row level security) only permits access to your own rows. Composite foreign keys also prevent anyone from creating an exam under somebody else's subject. Even if there is a bug in the code, that boundary holds.

Technically Vocis runs on Next.js and React, the data is stored with Supabase in the Zurich region, and it is delivered through Cloudflare. What I learned above all: the things you cannot see in an app — a clean data structure, rules in the database, an import that forgives mistakes — decide whether you really use it every day. You can try it at learn.patchy.ch; more of my work is on the projects page.

Get in touch