Skip to content
← All projects

Learnish

An app to learn English with short lessons and vocabulary review.

My role
Design, development and QA
Status
App · In development

The problem

Learnish is about practising English in short bursts: one lesson per topic, cards to review what is hard and a clear sense of how far you have come.

From sketch to ink

The key screen, in pencil first. Scroll and it gets inked.

Decisions

  1. One card, one phrase

    Each card asks a single thing, and the answer stays hidden until you ask for it.

    1 phrase per card

  2. You decide whether you knew it

    “Review” or “Got it”: two large buttons within reach of the thumb.

    2 answers

  3. Progress, always visible

    The bar and “7 of 10” say how much of the lesson is left; the streak, how many days in a row.

    progress + streak

Code

The piece next to this is real: touch it. This is the code that drives it on this page.

src/scripts/project-demos.ts

function learnish(root: HTMLElement, target: Element) {
  const info = data<{ cards: [string, string][]; of: string; say: { answer: string; card: string } }>(root);
  const answer = root.querySelector<HTMLElement>('[data-demo-answer]');
  const reveal = root.querySelector<HTMLElement>('[data-demo-reveal]');
  const buttons = root.querySelectorAll<HTMLButtonElement>('[data-demo-next]');
  if (!answer || !reveal) return;

  if (target.closest('[data-demo-reveal]')) {
    reveal.hidden = true;
    answer.hidden = false;
    buttons.forEach((btn) => (btn.disabled = false));
    buttons[1]?.focus({ preventScroll: true });
    say(root, info.say.answer, { answer: answer.textContent?.trim() ?? '' });
    return;
  }

  const next = target.closest<HTMLElement>('[data-demo-next]');
  if (next) {
    let step = Number(root.dataset.demoStep ?? 7);
    if (next.dataset.demoNext === 'good') step = step >= 10 ? 1 : step + 1;
    root.dataset.demoStep = String(step);
    const index = (Number(root.dataset.demoCard ?? 0) + 1) % info.cards.length;
    root.dataset.demoCard = String(index);
    const [word, translation] = info.cards[index];
    root.querySelector('[data-demo-word]')!.textContent = word;
    answer.textContent = translation;
    answer.hidden = true;
    reveal.hidden = false;
    buttons.forEach((btn) => (btn.disabled = true));
    root.querySelector('[data-demo-progress]')!.textContent = `${step} ${info.of} 10`;
    root.querySelector<HTMLElement>('[data-demo-bar]')!.style.width = `${step * 10}%`;
    const card = root.querySelector('[data-demo-card]');
    if (card) replay(card, 'is-next');
    reveal.focus({ preventScroll: true });
    say(root, info.say.card, { word });
  }
}

Try it: answer a card

9-day streak
Lesson 12 · Travel 7 of 10
How do you say it? Tengo ganas de verte

Tests

Checked right now, in your browser, on the piece above.

    Result

    What it does

    1. Short lessons by topic
    2. Cards to review vocabulary
    3. Progress tracking

    One lesson per metro ride.

    What I enjoyed most: designing for short moments, which is when people actually learn.