🔗 Get It Here : Muslim Prayer Reminder - Chrome Web Store
A lightweight and intelligent Chrome Extension that provides accurate daily prayer times, real-time updates, and smart notifications to help you stay consistent with your prayers.
-
Accurate Prayer Times
- Fetches daily prayer timings based on your selected city, country, and calculation method using the Aladhan API.
-
Smart Notifications
- On-time prayer reminders
- Optional snooze functionality
- Prevents outdated or incorrect notifications
-
Real-Time Prayer Tracking
- Displays current prayer
- Shows time remaining until next prayer
-
Automatic Data Refresh
- Updates prayer data at midnight
- Includes fallback hourly refresh for reliability
-
Manual Refresh
- Retry fetching data instantly if an error occurs
-
Custom Settings
- Select country & city
- Choose calculation method
- Adjust prayer timing offsets
-
Resilient System Design
- Handles offline scenarios
- Recovers automatically after browser restart
- Prevents duplicate alarms
- Frontend: React + TypeScript
- Extension APIs: Chrome Extensions API (Storage, Alarms, Notifications, Runtime)
- UI Components: Custom + shadcn/ui
- API: Aladhan Prayer Times API
-
User sets location and preferences
-
Extension fetches:
- Today’s prayer times
- Yesterday’s Isha
- Tomorrow’s Fajr
-
A timeline engine determines:
- Current prayer
- Next prayer
-
Background script:
- Schedules alarms for each prayer
- Handles notifications and snooze logic
-
System auto-recovers:
- On browser restart
- If data becomes stale
- If API fails
-
Clone the repository:
git clone https://github.com/KhanRameen/Prayer-Reminder-Chrome-Extension cd Prayer-Reminder-Chrome-Extension -
Install dependencies:
npm install
-
Build the extension:
npm run build
-
Load into Chrome:
- Go to
chrome://extensions/ - Enable Developer Mode
- Click Load unpacked
- Select the
distfolder
- Go to
src/
│
├── background/ # Background service worker
├── components/ # React UI screen components
├── popup/ # Extension popup UI
Builds a continuous timeline including:
- Yesterday’s Isha
- Today’s prayers
- Tomorrow’s Fajr
Ensures correct behavior across:
- Midnight transitions
- Late app openings
- Time comparisons
-
Uses
chrome.alarms -
Each alarm contains:
- Prayer time
- Next prayer time
-
Prevents:
- Duplicate alarms
- Stale notifications
The extension:
- Detects stale or missing data
- Automatically refetches
- Allows manual refresh from UI
-
Displays an error screen when data fails to load
-
Provides a manual refresh button
-
Automatically retries API calls
-
Gracefully handles:
- No internet
- API failures
- Missing user settings
- Aladhan API for prayer timings
- Open-source community for tools and inspiration