dnb-ai
Islamic-knowledge AI service for DeenBridge — FastAPI + Gemini assistant with verified Qur'an/Hadith citations, scholar-review fallback, and guidance for Stella
What is dnb-ai?
Islamic-knowledge AI service for DeenBridge — FastAPI + Gemini assistant with verified Qur'an/Hadith citations, scholar-review fallback, and guidance for Stellar/USDC payments.
Overview of dnb-ai
What it is
Deen Bridge AI Service is a FastAPI service behind Deen Bridge's Islamic-knowledge AI assistant, powered by Google Gemini. It wraps Gemini with an Islamic-knowledge system prompt, content safety filters, and per-session conversation history, exposing a chat API consumed by the web app. It is one of three services: dnb-frontend (Next.js web application), dnb-backend (REST API for auth, content, and Stellar payments), and dnb-ai (this repository). Stellar-aware chat supports wallet USDC zakat estimates, factual answers about the signed-in user's Stellar purchases, and exact USDC/stroop and user-specified percentage calculations. Calculations are informational; the AI service never signs or submits a Stellar transaction.
Key features
- Islamic context-aware responses grounded in a curated system prompt
- Multilingual support for Arabic, English, Urdu, Malay, French, and more; always quotes the Quran in Arabic script with translation
- Conversation history per chat session and per-user long-term memory with privacy controls
- Confidence-aware answers that abstain or hedge instead of guessing, and route doubtful religious answers to a scholar
- Tafsir-grounded ayah explanations from named classical works and a Hadith Research Agent across ten major collections
- Structured citations returned as validated, typed objects and bounds-checked against the 114-surah index
- FastAPI with automatic OpenAPI docs at /docs
Use cases
- Chat sessions for Islamic-knowledge questions with Qur'an and Hadith citations
- Scholar-review fallback for doubtful religious answers
- Tafsir lookup and Hadith research, including isnad analysis, rijal cross-referencing, grading, and variants
- Stellar and USDC informational calculations, fee-bump explanation, and contract event decoding
- Quran recitation analysis and answer feedback and review workflows
Getting started
The README does not include install or quick-start commands; see the repository README.
License and pricing
MIT license. The project is open source. No pricing information is stated.
Based on the project's public README and repository metadata.