Flashcards Alarm
The alarm you can only silence by spelling the word correctly.
Overview
Flashcards Alarm turns the most reliable moment of your day — waking up — into study time: the alarm only stops when you spell the word correctly. Words are scheduled with an SM-2 style algorithm across six mastery levels, results sync offline-first, and the whole app ships in eight languages.
The AI layer runs three Gemini models routed by task: Flash for definitions, Flash vision for Smart Scan (photograph any word list and it imports everything, auto-categorized), and Pro for generating a level-matched starter pack after an adaptive placement quiz.
Full stack
- Flutter 3 · Dart 3 · Riverpod 3 · go_router
- Firebase Auth · Cloud Firestore + security rules
- Firebase AI (3 Gemini models: text, vision, generation)
- Cloud Functions v2 (TypeScript, Node 24)
- RevenueCat subscriptions · Unity Ads rewarded
- SwiftUI WidgetKit extensions · flutter_tts
- Mocktail · GitHub Actions CI



Engineering highlights
The parts a code review would find interesting.
01Clean Architecture, enforced
A pure-Dart domain layer with zero Flutter or Firebase imports, behind a strict 4-layer dependency rule (Screens → Notifiers → Use Cases → Repository interfaces) with implementations injected via Riverpod DI.
02No exceptions cross layer boundaries
Typed error handling end to end: a sealed Result<T> plus a 9-subtype sealed failure hierarchy consumed with Dart 3 pattern matching — every failure mode is explicit at the type level.
03Production serverless billing
A TypeScript Cloud Functions v2 webhook syncs RevenueCat entitlements into Firestore documents that clients can read but only the Admin SDK can write — enforced by security rules, authenticated via Secrets Manager, with PII-safe shape-only logging.
04Offline-first sync engine
Quiz results queue locally with corrupt-entry tolerance and drain automatically on reconnect, so a missed network window never loses a study session.
05Native work beyond Flutter
SwiftUI WidgetKit lock-screen widgets (next alarm, today's reviews) bridged into the Flutter app, OS-level alarm scheduling, and App Tracking Transparency integration.
06Tested like a backend
82+ unit tests with Mocktail and ProviderContainer overrides covering optimistic-update rollback, dedup, and cache fallback — plus node:test suites for the webhook. CI enforces a zero-warnings analyze policy on every push.