Skip to content
pmLet’s talk
All projects

Anki

A study habit that fits in your pocket.

Anki turns the lectures and book pages I’ve reached into a small daily review. Every card keeps its source, so I can return to the passage when an answer needs more context.

Anki home and calculus review screens in two iPhones on stone
Role
Product design and engineering
Year
2026
Platform
Mobile PWA
Status
live

The problem

Course files arrive before the class reaches them. Books contain hundreds of unread pages. Generating cards from the whole file would fill the deck with material I haven’t learned yet. The app needed to respect my place in each course and book.

What I built

A working mobile PWA with source-linked cards, a daily queue, reading checkpoints, and review history. It runs privately from my Mac and keeps the study database in SQLite.

The choices behind it.

I designed the mobile interface and built the review scheduler, local study store, Cortex connection, and tools that prepare new cards. I also built the monitor that catches a missed morning run.

Start from what’s been reached

Class dates and reading checkpoints decide which passages are eligible. A generated card must include quoted evidence and a supported answer before it enters the deck.

Give the day a finish line

Due cards come first. The queue caps distinct reviews at 30 per day, while cards that need another attempt can still return within the same session.

Make the review work with one thumb

Reveal the answer with a swipe, choose one of five grades, and undo a grade when needed. The interface respects reduced motion and keeps the source alongside the card.

Anki calculus review with a tangent graph on an angled iPhone
A review card tied to its source

From start to finish.

  1. Reading context

    Cortex supplies class dates, course material, and book checkpoints.

  2. Cited cards

    The generation tools submit questions with evidence and an answer for validation.

  3. Daily review

    SQLite holds the cards and FSRS schedules when they return to the phone.

distinct reviews per day
30
review grades
5
MCP tools
14

Under the surface.

Pocket PWA

Review, books, decks, and statistics in a phone interface with an offline app shell.

Study store

Cards, reading progress, FSRS schedules, history, and daily run records in SQLite.

Cortex reader

Read-only access to the course timeline and reached book passages.

Daily monitor

Checks for a missed or failed morning generation run.

Build details Stack, scope, and implementation

Built with

  • React 19
  • TypeScript 7
  • Vite 8
  • Hono 4
  • SQLite
  • ts-fsrs 5
  • MCP SDK 1.30
  • Tailscale

Areas

  • spaced repetition
  • MCP
  • local-first
  • study
  • PWA
  • Cortex

Problem context

Lecture files arrive early, while the class moves week by week. A book file can contain hundreds of unread pages. Turning all of that into cards at once makes a review deck noisy and easy to abandon. This app uses the class date and reading checkpoint to decide what is ready.

More about the project

I wanted a study deck that starts from what I have actually reached. Anki reads my course schedule and materials from Cortex, tracks my place in each book, and keeps every card tied to a source page or section. The daily review stays small enough to finish on a phone.

The app runs on my Mac with a private Tailscale address. ChatGPT can reach a separate MCP server through a private tunnel, and a scheduled task prepares a small set of cited cards each morning. The study database stays local in SQLite.

Implementation notes

  • Thirty distinct reviews a day. server/store/reviews.ts puts due cards first, tracks the backlog, and leaves same-day relearning available after the cap.
  • Five grades with a deliberate extra step. server/store/reviews.ts maps Again, Hard, Mid, and Easy to FSRS; EZ extends the Easy interval.
  • Sources travel with every card. server/cortex/index.ts uses dated class material and reached book passages; server/generation/submit.ts checks the quoted evidence and answer before saving.
  • Fourteen small MCP tools. server/mcp/ exposes 7 reads and 7 writes for context, cards, progress, grading, and daily run records.
  • A pocket-sized review flow. src/LiveReview.tsx supports swipe-up reveal, five visible grade buttons, undo, and reduced-motion preferences.
  • A daily run you can inspect. server/store/cards.ts records success, zero-card, and rejected results; server/monitor/check.ts alerts after 8:00 a.m. Bogota when a run is missing or failed.

Build figures

  • 30 distinct cards per day
  • 5 new cards a day

Parts of the project

Pocket PWA app
Phone-first review, books, decks, statistics, swipe reveal, and offline app shell.
Study store library
SQLite cards, reading progress, FSRS schedules, history, and daily generation records.
Cortex reader service
Read-only course timeline and book passage eligibility, bound to class dates and reading checkpoints.
Anki MCP service
Fourteen tools for grounded generation and study actions through a private ChatGPT tunnel.
Daily monitor worker
A local check for missed or failed morning card generation.