Skip to main content

Documentation

How Sakīnah works

Sakīnah is an accessibility-first Qur'ān companion. Tell it what's on your mind in plain words — it finds a fitting passage, recites it, and explains it. Designed for people who can't read a screen, can't use a mouse, or simply want a calmer way to engage with the Qur'ān.

← Back to app

The 30-second tour

  1. Type or speak what you're thinking — “I feel anxious”, “studying for an exam”, “tell me about animals”.
  2. Sakīnah listens. If you typed a number or a surah name (e.g. 36, Yasin, Al-Ikhlās) it loads that whole surah. Otherwise it checks a curated catalogue of authentic du'ās from the Qur'ān; if nothing fits, it does a semantic search across the Qur'ān via the Qur'ān Foundation MCP server.
  3. It plays the passage. Arabic recitation, then English translation, ayah by ayah. Tafsīr Ibn Kathīr is one tap away.

Features

  • 30-day reading plan

    Start a khatm: one juzʾ per day, in mushaf order. The card on the home screen shows today's juzʾ, ayah range, and progress; finishing it credits your Qurʾān Foundation streak.

  • Play any surah by number or name

    Type "36", "Surah 36", "Yasin", "Al-Ikhlās", or even "the cave" — and Sakīnah skips the semantic step and plays the whole surah from ayah 1.

  • Mood-first search

    Describe how you feel or what you're thinking — no need to know surah numbers or Arabic.

  • Curated du'ā catalogue

    Authentic Qur'ānic du'ās matched to common intents (anxiety, gratitude, knowledge, forgiveness…) before falling back to broad search.

  • Consecutive passages

    Plays surahs in their natural order — never jumps between unrelated verses.

  • Tafsīr Ibn Kathīr

    One click reveals the classical commentary for the ayah you're on. Lazy-loaded, cached, scrollable.

  • Voice & keyboard control

    Speak your mood; control playback with the keyboard alone.

  • Ayah of the day

    A verse picked deterministically each day appears on the home screen — same ayah for everyone, refreshed at midnight UTC.

  • Surprise me

    Random shuffle: a complete short surah, picked for you.

  • Streaks that follow you

    Sign in to record reading sessions to the Qur'ān Foundation Activity Days API — your streak is yours, not ours.

  • Bookmarks (synced)

    Tap B on any ayah to save it. The /bookmarks page shows every saved verse with full Arabic + English text and a Delete button. Bookmarks survive sign-out, cookie-clears, and device switches — they're stored in your Quran.Foundation Favorites collection.

  • Reflections

    Press N on any ayah to write a private reflection. They sync to your Quran.Foundation account and the /library page lists every reflection alongside the verse it belongs to.

Keyboard shortcuts

SpacePlay / pause
← / →Previous / next ayah
RRepeat current ayah
BBookmark / unbookmark
NWrite / edit reflection for this ayah
TShow / hide tafsīr
EToggle English narration (TTS) on / off
EscClose player

Accessibility

Sakīnah is built to WCAG 2.1 AA standards and tested with eyes-closed mode — every flow can be completed without seeing the screen.

  • Full keyboard navigation; visible focus rings on every control
  • Screen-reader announcements via aria-live regions for play state and search results
  • Voice input (Web Speech API) for users who can't type
  • Arabic recitation by Mishary Alafasy (Quran.com CDN); English translation narrated by the browser's Web Speech API with a male voice forced on every platform. Press E to mute the English narration when you only want the recitation.
  • High-contrast palette (slate + amber), minimum 16 px body text
  • Respects prefers-reduced-motion for the ambient hero glow

Grounding & citations

Sakīnah never paraphrases the Qur'ān from memory. Every ayah, translation, and tafsīr you see comes directly from a tool call to the Qur'ān Foundation content server, and the exact tool calls are printed under each result:

✓ Grounded in mcp.quran.ai:
  search_quran("anxious heart", translations=en-sahih-international) ·
  fetch_quran(13:28-30, ar-simple-clean) ·
  fetch_translation(13:28-30, en-sahih-international) ·
  fetch_tafsir(13:28, en-ibn-kathir)

If you don't see a citation line, the answer wasn't grounded — but Sakīnah always shows one.

Quran Foundation APIs we use

  • MCP Content Server (mcp.quran.ai)

    search_quran · fetch_quran · fetch_translation · fetch_tafsir

    Semantic search and canonical Arabic / English / tafsīr text

  • OAuth2 (authorization_code + PKCE)

    prelive-oauth2.quran.foundation

    Sign-in so user data (streaks, bookmarks, reflections) is portable across devices

  • Activity Days API

    POST /auth/v1/activity-days

    Records each reading session so streaks count toward the user's overall Qur'ān engagement, not just our app

  • Streaks API

    GET /auth/v1/streaks/current-streak-days

    Reads the user's current streak from the source of truth

  • Bookmarks API (default collection)

    GET / POST / DELETE /auth/v1/collections/__default__/bookmarks

    Saved ayahs are written to the user's Quran.com-style Favorites collection — they persist across devices and survive cookie clears

  • Notes API

    GET / POST / DELETE /auth/v1/notes

    Reflections are stored as notes against verse ranges; the /library page lists every reflection alongside its verse

  • Verse content (Sahih International + Arabic)

    MCP fetch_quran + fetch_translation

    Re-fetches the Arabic and English text for any bookmark or reflection so it always renders even after a sign-out → sign-in round-trip

Privacy

  • Guests: bookmarks and reflections stay in your browser's localStorage. Nothing leaves your device.
  • Signed-in users: reading sessions, bookmarks, and reflections sync to your Qur'ān Foundation account so they follow you across devices and survive cookie clears. Your search queries are never stored.
  • No third-party analytics. No trackers, no ads, no fingerprinting.
  • Voice input uses your browser's built-in Web Speech API — audio is processed by your browser vendor (typically Google), never by Sakīnah.

Tech stack

  • FrameworkNext.js 15 (App Router)
  • LanguageTypeScript (strict)
  • StylingTailwind CSS 4
  • MCP client@modelcontextprotocol/sdk
  • AudioQuran.com CDN (verse-by-verse)
  • TTSWeb Speech Synthesis API
  • Voice inputWeb Speech Recognition API
  • HostingVercel

A note on scholarly authority

Sakīnah is a study tool, not a mufti. It surfaces canonical Qur'ān text, verified translations, and classical tafsīr. It deliberately does not issue fatwās, give personal rulings, or speculate beyond its sources. For matters of fiqh, please consult a qualified scholar.