- Node.js 20+
- npm 10+
- Windows 10/11 (primary target) · macOS 13+ (supported)
git clone <repo>
cd miqaat
npm installThe root installs workspaces: /server, /client, /electron.
Note:
better-sqlite3is a native module.npm installtriggerselectron-rebuildvia electron-builder on first package. In dev, it runs against system Node.
npm run devThis spins up, in parallel:
- NestJS on
http://127.0.0.1:3001with--watch - Vite dev server on
http://localhost:5173 - Electron shell (waits for Vite, then loads
http://localhost:5173)
DB file is created at server/miqaat.db in dev, and %APPDATA%/Miqaat/miqaat.db in packaged builds. If upgrading from the pre-rebrand "Mothern Athan" build, the Electron main process copies the legacy %APPDATA%/Mothern Athan/mothern-athan.db over on first launch.
- Splash → Onboarding opens automatically.
- Pick a location (GPS or search).
- Prayer times render using the local
adhanlibrary (works offline). - If online, the backend verifies against Aladhan in the background and updates the cache.
DB_PATH— override SQLite path (Electron sets it automatically)PORT— override server port (dev default 3001)VITE_API_URL— override API URL for web-only testing
| Symptom | Likely cause / fix |
|---|---|
| Blank screen in packaged app | base: './' missing in vite.config.ts — already set |
ENOENT on server launch in prod |
Module._resolveFilename shim not installed before require('server/main.js') |
| Tray icon blurry | tray-32.png must be exactly 32×32 — no runtime resize() |
| CSP blocks fetches in packaged app | Add origin to connect-src in client/index.html |
| Prayer times differ from Aladhan | Expected < 2 min delta between adhan local and Aladhan API |