Prayer Times & Qibla — Astronomical Offline Utility

A high-performance, offline-first mobile utility delivering precise astronomical prayer calculations, sensor-driven real-time Qibla compass tracking, and a full-text searchable Qur'an with synchronized audio recitation using SQLite FTS5 and Hive.

9:41
5G
Prayer Times & Qibla — Astronomical Offline UtilityFlutter Cross-Platform
Clean Architecture60 FPS
Cloud SyncActive
Explore Workflow

Project Overview

Prayer Times & Qibla is a high-performance, offline-first mobile utility engineered in Flutter and Dart, built for worldwide Muslim users requiring dependable spiritual schedules with zero mandatory internet dependency.

The application combines mathematical astronomical algorithms for location-based prayer timing, real-time sensor fusion for accurate Qibla compass orientation, and an embedded SQLite FTS5 database enabling instant full-text search across the entire Qur'an alongside synchronized audio recitations.

My Engineering Role

Lead Flutter Developer responsible for astronomical calculation math, device magnetometer and gyroscope sensor fusion, SQLite FTS5 indexing, audio streaming/caching with Just Audio, and offline architecture.

The Challenge

Providing exact prayer times and sensor-accurate compass bearings across international time zones and fluctuating magnetic fields while ensuring 100% functionality in offline airplane mode without battery drain.

The Solution

Implemented local mathematical calculation models (Muslim World League, ISNA, Umm al-Qura) directly in Dart, paired with low-pass filtered device magnetometer sensors and an embedded SQLite database with FTS5 search tables.

High-Level Architecture

  • Pure Dart astronomical calculation engine computing prayer times locally based on latitude, longitude, and elevation.
  • Sensor fusion algorithm reading device magnetometer and accelerometer data with low-pass noise filtering for smooth compass rotation.
  • Embedded SQLite database with Full-Text Search (FTS5) extension delivering sub-10ms query results across Arabic text and translations.
  • Audio playback pipeline with Just Audio supporting background recitation, byte-range streaming, and local caching.
  • Hive local key-value store for user bookmarks, recitation progress, and calculation preferences.

Key Features & Workflows

  • Astronomical Calculation Engine: Precise Fajr, Dhuhr, Asr, Maghrib, and Isha timings with support for all major calculation conventions.
  • Real-Time Qibla Compass: Smooth animated compass dial pointing directly toward the Kaaba using live GPS coordinates and magnetic sensor calibration.
  • FTS5 Searchable Holy Qur'an: Instant keyword search across Arabic verses, English translations, and phonetic transliterations.
  • Synchronized Audio Recitation: Verse-by-verse audio playback with highlighting and offline download management.
  • Localized Adhan Alerts: Background system alarms that wake the device and trigger acoustic reminders at exact prayer intervals.
  • Customizable Islamic Calendar: Hijri date tracking with moon phase calculation and major observance notifications.

Technical Challenges Overcome

  • Correcting for magnetic declination and sensor drift on varied budget Android devices to ensure the Qibla compass points accurately.
  • Indexing complex Arabic script with diacritics in SQLite FTS5 without degrading database file size or search performance.
  • Guaranteeing scheduled background prayer alarms fire reliably across aggressive OEM battery optimization software (MIUI, Samsung OneUI).

Production Results & Impact

  • High-speed utility app fully operational without cell connectivity or data usage.
  • Sub-second launch time with zero cold-start delay due to pre-compiled local database assets.
  • Complete video demonstration publicly accessible on YouTube.

Need a similar architecture shipped?

Let's translate your product workflows, real-time requirements, and cloud infrastructure into a dependable production app.