You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"What du'a do I read before sleeping?" "Is there an authentic du'a for anxiety?" "What are the morning adhkar?" These are among the most useful, most-repeated requests an Islamic assistant gets — and exactly where a model that half-remembers a du'a, garbles the Arabic, or serves a fabricated supplication does real harm. This issue adds a contextual du'a and adhkar recommender backed by an authenticated collection (e.g. Hisnul Muslim / Fortress of the Muslim, with graded sources): match a user's situation or time of day to the right supplications, and return the Arabic, transliteration, translation, source, and grading — never an invented du'a. This is a concrete capability, not a prompt tweak.
Current state
There is no du'a/adhkar data or endpoint. main.py exposes /chat, /ping, /chat/{chat_id}; stellar.py adds zakat. No supplication corpus exists in the repo.
A du'a question today goes straight to chat.send_message (main.py, lines 143–151), so the Arabic text, transliteration, and — critically — the authenticity of the supplication are whatever the model produces, with no source and no grading.
ISLAMIC_CONTEXT (lines 57–71) asks the model to "Cite sources when possible," but there is no du'a corpus to cite and nothing enforces authenticity for supplications specifically.
What to build
An authenticated adhkar corpus — bundle a du'a/adhkar dataset with, per entry: Arabic text, transliteration, translation, category (morning, evening, before sleep, travel, distress, after salah, etc.), source reference, and grading. Prefer a well-known authenticated compilation (e.g. Hisnul Muslim) with documented provenance and licensing; where a du'a is Quranic or from the two Sahihs, mark it accordingly. Reuse the hadith-grading layer from #ai-16 for grading rather than a parallel scheme.
A recommender endpoint (e.g. POST /adhkar/recommend) that takes a situation/time/category (and optional free-text like "I'm feeling anxious") and returns the matching supplications with full metadata. Support both category lookup and semantic matching of free-text situations (embedding similarity is fine — coordinate with [Enhancement] Semantic response cache with embedding-similarity matching for repeated questions #27's embedding infra if it lands).
Tests — offline tests asserting category and free-text lookups return the right authenticated entries with complete metadata, and that a no-authentic-match case declines rather than fabricates. No live API calls in CI.
Acceptance criteria
A bundled authenticated adhkar corpus ships with Arabic, transliteration, translation, category, source, and grading per entry, with documented provenance/licensing.
POST /adhkar/recommend returns matching supplications by category and by free-text situation, each with full metadata.
stellar.py — typed router/endpoint pattern (lines 25, 65–81, 106–170) as the template; its DISCLAIMER (lines 50–54) is a good model for a "consult a scholar for specific rulings" note.
CI (.github/workflows/ci.yml) lints/compiles only main.py and has no pytest step — extend flake8 to new modules and add a pytest step.
PRs target the dev branch (see CONTRIBUTING.md).
Difficulty
Medium — the engineering (typed endpoint, corpus lookup, optional embedding match) is moderate and well-precedented by stellar.py; the real work is sourcing a properly authenticated, well-graded adhkar corpus with clean provenance and wiring the authenticity/display concerns to the issues that own them rather than reinventing them.
🏆 GrantFox OSS — Official Campaign | FWC26. Apply for this issue through the GrantFox campaign page. The maintainer assigns one contributor before work starts; unassigned PRs may not be reviewed. PRs target the dev branch. Quality bar: CI must stay green.
💬 Questions or need help? Reach the maintainers and other contributors on the DeenBridge Telegram: https://t.me/+nst9lXNj1wc4ZDE0
Summary
"What du'a do I read before sleeping?" "Is there an authentic du'a for anxiety?" "What are the morning adhkar?" These are among the most useful, most-repeated requests an Islamic assistant gets — and exactly where a model that half-remembers a du'a, garbles the Arabic, or serves a fabricated supplication does real harm. This issue adds a contextual du'a and adhkar recommender backed by an authenticated collection (e.g. Hisnul Muslim / Fortress of the Muslim, with graded sources): match a user's situation or time of day to the right supplications, and return the Arabic, transliteration, translation, source, and grading — never an invented du'a. This is a concrete capability, not a prompt tweak.
Current state
main.pyexposes/chat,/ping,/chat/{chat_id};stellar.pyadds zakat. No supplication corpus exists in the repo.chat.send_message(main.py, lines 143–151), so the Arabic text, transliteration, and — critically — the authenticity of the supplication are whatever the model produces, with no source and no grading.ISLAMIC_CONTEXT(lines 57–71) asks the model to "Cite sources when possible," but there is no du'a corpus to cite and nothing enforces authenticity for supplications specifically.What to build
POST /adhkar/recommend) that takes a situation/time/category (and optional free-text like "I'm feeling anxious") and returns the matching supplications with full metadata. Support both category lookup and semantic matching of free-text situations (embedding similarity is fine — coordinate with [Enhancement] Semantic response cache with embedding-similarity matching for repeated questions #27's embedding infra if it lands).Acceptance criteria
POST /adhkar/recommendreturns matching supplications by category and by free-text situation, each with full metadata.Pointers
main.py— router wiring (line 24),/chathandler (lines 118–184),ISLAMIC_CONTEXT(lines 57–71).stellar.py— typed router/endpoint pattern (lines 25, 65–81, 106–170) as the template; itsDISCLAIMER(lines 50–54) is a good model for a "consult a scholar for specific rulings" note..github/workflows/ci.yml) lints/compiles onlymain.pyand has no pytest step — extend flake8 to new modules and add a pytest step.devbranch (seeCONTRIBUTING.md).Difficulty
Medium — the engineering (typed endpoint, corpus lookup, optional embedding match) is moderate and well-precedented by
stellar.py; the real work is sourcing a properly authenticated, well-graded adhkar corpus with clean provenance and wiring the authenticity/display concerns to the issues that own them rather than reinventing them.🏆 GrantFox OSS — Official Campaign | FWC26. Apply for this issue through the GrantFox campaign page. The maintainer assigns one contributor before work starts; unassigned PRs may not be reviewed. PRs target the
devbranch. Quality bar: CI must stay green.💬 Questions or need help? Reach the maintainers and other contributors on the DeenBridge Telegram: https://t.me/+nst9lXNj1wc4ZDE0