I'll research pronunciation conventions and spaced-repetition intervals first, then rebuild the app as a multi-file, fully offline system.
Now I'll build the new architecture. First, the types and a large offline vocabulary library.
Now the helper libraries: text/fuzzy search + pronunciation generator, speech synthesis, and the offline store with SRS + backup.
Now the shared UI kit (buttons, fields, icons, toasts, speak button).
Now the main views — starting with Learn (library browser) and the improved Add flow.
Now the practice engine with four review modes and Leitner scheduling.
Now the pronunciation studio and the backup/settings view.
Now the app shell that ties everything together.
Rebuilt Petit Carnet as a complete, offline-first French learning system across multiple files.
What's new
📚 Big built-in library (src/data/library.ts) — ~190 words & phrases in 17 categories (Greetings, Politeness, Essentials, Numbers, Time, People, Food, Travel, Shopping, Home, Work, Health, Weather, Verbs, Adjectives, Questions, Small talk), each with meaning, English respelling and usage notes. Fuzzy search tolerates typos and accents ("bonjur" still finds Bonjour).
🔊 Pronunciation everywhere — a speaker button on every card, plus a dedicated Sounds tab: a "Sound lab" (type any French → get an auto-generated respelling + spoken audio, adjustable speed and voice), a rules guide (nasal vowels, silent letters, letter combos, liaison — from the research), and tricky minimal pairs to compare.
➕ Much better "Add" flow — French/meaning/pronunciation/category/type/example/tags/note, a live preview card, auto-suggested pronunciation from a French→respelling engine, library autocomplete that fills fields for you, duplicate detection, ⌘/Ctrl+Enter save, undoable "just added" list, and a bulk paste mode (le chien = the dog | luh SHYAN).
🧠 Real spaced repetition — Leitner boxes 1–5 (daily → 2 → 4 → 9 → 14 days), due counts, day streak, daily goal, accuracy, box distribution, and four practice modes: flashcard, multiple choice, type-it (accent/article-tolerant matching) and listening dictation, in both FR→EN and EN→FR.
📓 Notebook — search, filters (due/learning/mastered/favourites), sorting, categories, favourites, inline edit dialog, reset and delete.
💾 Backup & restore — download a JSON backup, copy to clipboard, drag-and-drop or paste to import with merge or replace, plus settings and a guarded danger zone.
🎨 UI/UX — new design system (buttons, panels, fields, badges, meters, toasts), sticky top nav with tab shortcuts 1–6, mobile bottom nav, soft ambient gradients, light/dark mode with system detection, and reduced-motion support. Everything runs 100% locally — no network calls, no fonts fetched, data in localStorage (with migration from your old notebook).
Files built: src/types.ts, src/data/library.ts, src/lib/text.ts, src/lib/speech.ts, src/lib/store.ts, src/components/ui.tsx, src/components/LearnView.tsx, src/components/AddView.tsx, src/components/NotebookView.tsx, src/components/PracticeView.tsx, src/components/SoundView.tsx, src/components/BackupView.tsx, src/App.tsx, src/index.css, index.html