Skip to content

m-yavuz/iftar-time

Repository files navigation

Iftar Time — Prayer Times Web App

A simple, client-side web app for Ramadan that shows daily prayer times and sunset (Iftar) time for your location or selected country/city. It uses the Adhan library for precise calculations and Moment.js for locale and Hijri date support. No backend required.

Live Website

Features

  • Daily prayer times (Fajr, Dhuhr, Asr, Maghrib, Isha)
  • Iftar time (sunset) based on selected calculation method
  • Multiple calculation methods and madhabs
  • Locale + Hijri date display
  • Lightweight, static site — deploy anywhere

Quick Start (Local)

You can open the app directly or serve it locally for best results (recommended for geolocation and CORS behavior).

Option 1: Open directly

  • Double-click index.html to open in your browser.

Option 2: Serve locally (recommended)

Requirements: Node.js 18+

# From the project root
npm run start
# Then open http://localhost:5500

Firebase Hosting

This repo includes Firebase Hosting configuration.

# One-time: initialize hosting (choose 'dist' or root as needed)
npm run firebase:init

# Run locally with the Hosting emulator
npm run firebase:serve

# Deploy to Firebase Hosting
npm run deploy

Project Structure

assets/
  css/styles.css      # App styles
  imgs/               # Images and flags
libs/                 # Adhan + Moment libraries
  README.md           # Docs for vendor libraries
data/
  countries.json      # Country and city metadata
  calc-methods.json   # Calculation method presets
src/
  README.md           # Docs for app source files
  app.js              # App bootstrap and UI logic
  prayer-times.js     # Prayer/Iftar time calculations and formatting
  vendor-loader.js    # Loader for external libs
  adhan-loader-esm.js # Adhan ESM loader
index.html            # Main page
firebase.json         # Firebase Hosting config
package.json          # Scripts for local serve + deploy

Configuration

  • Countries and cities: edit data/countries.json
  • Calculation methods: edit data/calc-methods.json

Tech Stack

Contributing

  • Issues and pull requests are welcome.
  • Keep changes focused and consistent with the existing code style.

License

This project’s license is not specified in this repository. Please open an issue if you need clarity.

About

Simple web site for Iftar Time table (Arabic)

Topics

Resources

Stars

Watchers

Forks

Contributors