Ramadan Ku is a Malaysia-focused Ramadan companion web app built with Next.js. It helps users follow daily worship routines with location-aware prayer times, Ramadan countdowns, daily duas, Quran verses, and a digital tasbeeh.
- Malaysia-first experience with geolocation and manual city/state selection
- Prayer times powered by Aladhan API with next-prayer and time-remaining indicators
- Ramadan status panel with live countdown and Hijri date display
- Suhoor and iftar section based on Fajr and Maghrib timings
- Daily dua and daily Quran verse cards (Arabic, transliteration/translation)
- Built-in digital tasbeeh counter (33-count rounds)
- Mobile-first UI with animations and PWA metadata/manifest support
- Background prayer push notifications (Web Push + PostgreSQL + scheduled worker)
- Next.js 16 (App Router)
- React 19
- TypeScript
- Tailwind CSS 4
- Framer Motion
- PostgreSQL (
pg) for push subscriptions and delivery logs - Web Push (
web-push) for background notifications
app/page.tsx- Main page composition and location flowapp/sections/*- Feature sections (Hero, Prayer Times, Suhoor/Iftar, Dua, Quran, Tasbeeh)app/hooks/*- Client hooks for location, prayer times, and Ramadan countdown logicapp/data/*- Static dua and Quran verse datasetspublic/manifest.json- PWA manifest
- Node.js 20+ (recommended)
- npm, pnpm, yarn, or bun
npm installnpm run devOpen http://localhost:3000.
npm run build
npm run startnpm run dev- Start development servernpm run build- Build production bundlenpm run start- Run production servernpm run lint- Run ESLint
- Prayer times and Hijri conversion use JAKIM e-Solat API.
- Ramadan date windows are currently hardcoded for 2025-2028 in
app/hooks/useCountdown.ts.
Set these in Dokploy (web service + worker service):
DATABASE_URL- PostgreSQL connection stringNEXT_PUBLIC_VAPID_PUBLIC_KEY- VAPID public key (build-time for browser)PUSH_VAPID_PUBLIC_KEY- VAPID public key (runtime for worker/API)PUSH_VAPID_PRIVATE_KEY- VAPID private keyPUSH_VAPID_SUBJECT- mailto URL, e.g.mailto:admin@example.com
Generate VAPID keys once:
npx web-push generate-vapid-keysRun SQL in docs/sql/push_notifications.sql on your PostgreSQL database.
Create a Dokploy worker/cron service that runs every minute:
npm run push:send-dueThis checks current Kuala Lumpur minute and sends due prayer push notifications.
The same scheduled worker also sends special push messages on:
- 1 Ramadan (Ramadan start)
- 1 Syawal (Aidilfitri greeting)
- Android: works after user grants push permission.
- iOS: user must install the PWA to Home Screen first (iOS 16.4+) and then allow notifications.
You can send a manual push from the server terminal:
npm run push:test -- --allTarget specific zone:
npm run push:test -- --zone=WLY01Target one endpoint:
npm run push:test -- --endpoint=https://example.push/abcOptional custom message:
npm run push:test -- --zone=WLY01 --title="Ujian" --body="Ini notifikasi ujian"The interface is primarily in Bahasa Melayu with Arabic and English support in selected UI labels and content.
This app can be deployed to Vercel or any Node-compatible hosting that supports Next.js.