Skip to content

Repository files navigation

Ω†Ψ―Ψ§Ψ‘ - Islamic Prayer Times Desktop App

Cover(1)

A modern Islamic prayer times desktop application built with Next.js and Electron. Features real-time prayer notifications, prayer tracking, statistics, and a beautiful Arabic interface.

✨ Features

  • πŸ•Œ Accurate Prayer Times - Real-time calculation using Aladhan API
  • πŸ”” Smart Notifications - Configurable prayer time alerts
  • πŸ“Š Prayer Tracking - Mark completed prayers and view statistics
  • πŸ“… Hijri Calendar - Display Islamic dates alongside Gregorian
  • πŸŒ… Sunrise Times - Additional astronomical information
  • πŸ“ˆ Weekly Heatmap - Visual prayer completion tracking
  • 🎨 Arabic Interface - RTL support with beautiful Arabic typography
  • πŸ–₯️ Desktop Integration - Tray icon, background operation, system notifications
  • πŸ”’ Secure & Private - No data collection, local storage only
  • πŸŒ™ Dark Theme - Modern black/white color scheme

πŸ“± How It Works

Core Functionality

  1. Location-Based Times: Select your city and country to get accurate prayer times
  2. Real-Time Updates: Prayer times are calculated daily using astronomical data
  3. Smart Notifications: Get notified before each prayer with customizable timing
  4. Prayer Tracking: Mark prayers as completed and track your daily progress
  5. Statistics Dashboard: View streaks, completion rates, and weekly summaries

Technical Architecture

  • Frontend: Next.js 16 with React 19, TypeScript, and Tailwind CSS
  • Backend: Electron 39 for desktop functionality
  • Storage: Local electron-store (no cloud sync)
  • API: Aladhan API for prayer time calculations
  • Security: Context isolation, CSP headers, input validation

πŸš€ Getting Started

Prerequisites

  • Node.js 18.x or higher
  • npm, yarn, pnpm, or bun

Installation

  1. Clone the repository:
git clone https://github.com/mohamedhanydawood/nidaa.git
cd nidaa
  1. Install dependencies:
npm install

πŸ› οΈ Development

Running the Development Server

Start the development environment:

npm run dev

This will:

  • Start Next.js dev server on http://localhost:3000
  • Compile Electron TypeScript files
  • Launch the desktop application
  • Enable hot reload for UI changes

Development Workflow

  • UI Changes: Edit files in app/ directory - changes auto-refresh
  • Electron Logic: Edit files in electron/ directory - requires app restart
  • Settings: Modify app/settings/page.tsx for configuration UI
  • Styling: Update app/globals.css for theme changes

πŸ“ Project Structure

nidaa/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ components/              # React Components
β”‚   β”‚   β”œβ”€β”€ CountdownTimer.tsx   # Prayer countdown display
β”‚   β”‚   β”œβ”€β”€ PrayerChecklist.tsx  # Prayer marking interface
β”‚   β”‚   └── WeeklyHeatmap.tsx    # Statistics visualization
β”‚   β”œβ”€β”€ settings/                # Settings page
β”‚   β”‚   └── page.tsx            # Configuration interface
β”‚   β”œβ”€β”€ globals.css             # Global styles & theme
β”‚   β”œβ”€β”€ layout.tsx              # Root layout with CSP
β”‚   └── page.tsx                # Main prayer times display
β”œβ”€β”€ electron/                    # Electron main process
β”‚   β”œβ”€β”€ ipcHandlers.ts          # IPC communication handlers
β”‚   β”œβ”€β”€ main.ts                 # Application entry point
β”‚   β”œβ”€β”€ prayerService.ts        # Aladhan API integration
β”‚   β”œβ”€β”€ scheduler.ts            # Prayer notification scheduler
β”‚   β”œβ”€β”€ store.ts                # Local data persistence
β”‚   β”œβ”€β”€ types.ts                # TypeScript definitions
β”‚   β”œβ”€β”€ validators.ts           # Input validation
β”‚   └── window.ts               # Window & tray management
β”œβ”€β”€ build-electron/             # Compiled Electron files
β”œβ”€β”€ public/                     # Static assets
β”‚   └── icon.ico               # Application icon
└── out/                       # Next.js production build

Codebase Architecture

Frontend (app/)

  • Modern React: Uses Next.js 16 App Router with React 19
  • TypeScript: Fully typed components and hooks
  • Tailwind CSS: Utility-first styling with custom Arabic theme
  • RTL Support: Right-to-left layout for Arabic text
  • Responsive Design: Works on different window sizes

Backend (electron/)

  • Modular Architecture: Split into focused modules
  • IPC Communication: Secure renderer-main process communication
  • Local Storage: electron-store for settings and prayer records
  • Background Operation: Tray icon allows app to run minimized
  • Security: Context isolation and CSP protection

Key Components

Prayer Times Display (app/page.tsx)

  • Real-time prayer schedule
  • Next prayer highlighting
  • Statistics dashboard
  • Weekly heatmap visualization

Settings Management (app/settings/page.tsx)

  • Location configuration (country/city)
  • Prayer calculation method selection
  • Notification preferences
  • Time format options

Prayer Scheduler (electron/scheduler.ts)

  • Notification timing logic
  • Prayer time calculations
  • Background scheduling

IPC Handlers (electron/ipcHandlers.ts)

  • Settings CRUD operations
  • Prayer data fetching
  • Statistics calculations
  • Prayer marking logic

πŸ“‹ Available Scripts

Command Description
npm run dev Start development with hot reload
npm run build Build for production
npm start Run production build locally
npm run dist Create distributable packages
npm run lint Run ESLint code quality checks

πŸ”§ Configuration

Prayer Calculation Methods

The app supports multiple Islamic prayer time calculation methods:

  1. Egyptian General Authority (Default)
  2. Islamic Society of North America
  3. Muslim World League
  4. Umm Al-Qura, Makkah
  5. Other regional methods

Supported Locations

Middle East & North Africa:

  • Egypt (Cairo, Alexandria, etc.)
  • Saudi Arabia (Riyadh, Mecca, Medina)
  • UAE (Dubai, Abu Dhabi)
  • Kuwait, Qatar, Bahrain, Oman
  • Jordan, Lebanon, Syria, Iraq
  • Palestine, Yemen
  • Morocco, Algeria, Tunisia, Libya, Sudan

Notification Settings

  • Pre-prayer Alert: Configure minutes before prayer (0-60)
  • Madhab Selection: Hanafi (1) or Shafi (0) for Asr prayer
  • Time Format: 12-hour or 24-hour display

πŸ—οΈ Building for Production

Create Production Build

npm run build

Test Production Build

npm start

Create Distributables

npm run dist

Output:

  • Windows: .exe installer and portable version
  • macOS: .dmg installer
  • Linux: .AppImage and package formats

🀝 Contributing

We welcome contributions! Here's how you can help:

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Code Guidelines

  • TypeScript: Strict typing required
  • ESLint: Follow the configured linting rules
  • Commits: Use conventional commit format
  • Testing: Test on Windows, macOS, and Linux
  • Security: No external dependencies without review

Areas for Contribution

  • 🌐 Localization: Add more languages
  • 🎨 Themes: Additional color schemes
  • πŸ“± Features: New Islamic features (Qibla, Quran, etc.)
  • πŸ”§ Performance: Optimize memory usage
  • πŸ› Bug Fixes: Report and fix issues
  • πŸ“š Documentation: Improve docs and guides

Reporting Issues

When reporting bugs, please include:

  • Operating system and version
  • App version
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots if applicable

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Permissions

  • βœ… Commercial use
  • βœ… Modification
  • βœ… Distribution
  • βœ… Private use

Limitations

  • ❌ No liability
  • ❌ No warranty

Conditions

  • ℹ️ License and copyright notice must be included

🧹 Clean Build

Before rebuilding, clean these folders:

# Windows PowerShell
Remove-Item -Path "dist",".next","out","build-electron" -Recurse -Force

# Linux/macOS
rm -rf dist .next out build-electron

❓ Troubleshooting

Common Issues

App won't start:

  • Ensure Node.js 18+ is installed
  • Clear node_modules: rm -rf node_modules && npm install

Prayer times incorrect:

  • Check location settings
  • Verify internet connection for API calls
  • Try different calculation methods

Notifications not working:

  • Check system notification permissions
  • Verify notification settings in app
  • Restart the application

Build errors:

  • Clear all build artifacts
  • Reinstall dependencies
  • Check TypeScript compilation: npx tsc -p electron/tsconfig.json

Support

For questions or issues:

  1. Check existing GitHub issues
  2. Create a new issue with detailed information
  3. Include your operating system and app version

Made with ❀️ for the Muslim community

May Allah accept our prayers and guide us all to the straight path

About

Islamic prayer times desktop application built with Next.js and Electron. Features real-time prayer notifications, prayer tracking, statistics, and a beautiful Arabic interface.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages