Read
The complete Quran, two translations, adaptive typography, themes, and saved reading progress.
Offline-first product case study
A multilingual reading and listening experience designed to remain useful without a network connection.
Project overview
Many Quran apps become limited when connectivity is poor, hide essential preferences behind complex menus, or make audio storage difficult to understand. Al-Quran starts from a different premise: the core reading experience belongs on the device.
The static PWA and Capacitor Android app need no application server. Quran content and personal data remain local, while Cloudflare R2 supplies recitation only when it has not been downloaded.
The complete Quran, two translations, adaptive typography, themes, and saved reading progress.
Streaming plus deliberate per-surah downloads, repeat controls, a sleep timer, and continuous playback.
Offline multilingual search, categorized bookmarks, personal notes, and exact-ayah navigation.
Product goals
Complete offline libraryEvery surah and ayah is available without an account or connection.
Translation languagesBangla and English flow through the interface, hierarchy, and search.
Typography sizesLarger Arabic and translation choices appear with live previews.
Device-owned profileSettings, bookmarks, progress, and downloads stay private and local.
Core experience
First run introduces one decision at a time: language, Arabic and translation sizes, visible translations, and theme. Those choices shape every screen that follows.
Arabic receives visual priority. The selected primary translation follows, while a quieter secondary translation remains available. The reader remembers the most visible ayah.
A persistent player follows the reader throughout the app. Common playback stays simple; memorization and sleep controls live in a compact panel.
Users choose which surahs to store. A global queue processes one MP3 at a time and reports byte percentage alongside completed-ayah progress.
A Web Worker searches Arabic, Bangla, English, and surah names on-device. Results jump to the exact ayah; bookmarks add categories and private notes.
Technical architecture
The browser gets a versioned Quran seed, then IndexedDB becomes the local operating layer. Android contains the same static export. Only recitation audio leaves the device workflow.
Next.js App Router, React, TypeScript, Tailwind CSS, Radix primitives
Validated read-only SQLite database
Versioned seed imported transactionally into Dexie / IndexedDB
Serwist service worker with app and Quran-data precaching
Web Worker with normalized Arabic, Bangla, and English text
Cloudflare R2 streaming with explicit on-device Blob downloads
Capacitor 8 wrapper containing the static application
Data integrity
The canonical SQLite source is checked before a reproducible generator creates the browser seed. Existing installs fetch only a tiny version manifest unless the data changes or the local database is incomplete.
Engineering challenges
Transactional chunked writes, visible progress, and a lightweight version check keep thousands of records from making repeat launches expensive.
Abort controllers, queue state, active-task tracking, and a final transactional deletion check stop late writes from resurrecting deleted files.
MP3 requests remain network-only in the service worker, while explicit downloads bypass HTTP cache. Audio is never silently stored twice.
The static export ships inside the APK. Capacitor supplies the native shell while WebView storage retains personal study data through upgrades.
Outcome
One codebase.
Reading everywhere.
The completed first version works as an installable website and Android application while keeping the full reading experience offline. Users control language, readability, personal data, and audio storage without an account or backend.