
Quran Word-Sync Reader
A Next.js Quran reader with real-time word-by-word audio highlighting. Each word lights up in sync with the reciter using binary search over time-sorted audio segments. User listening progress is saved per-session via Supabase.
- Binary search O(log n) for word-timing lookup
- Memoized word components — only the highlighted word re-renders
- Paginated chapter fetches (100 verses/page) to fix a silent Next.js 2MB cache bug
- OAuth2 client-credentials for content API, Supabase Auth for user state — two separate concerns
- Debounced progress writes + sendBeacon on tab close




