A high-performance, AI-driven assistant for Somali Quranic Tafsiir.
An AI-powered Somali Quran Tafsiir assistant that provides grounded, accurate answers from Somali Quranic interpretation. Designed for the Somali AI community to make religious knowledge more accessible through state-of-the-art retrieval technology.
The intelligence of this agent is anchored by data/trained.json. This dataset serves as the primary source for creating the model's semantic memory, ensuring that every response is derived from authenticated Somali Tafsiir.
- Current AI Agent Focus: Optimized for Surah Al-Fatiha and the 30th Juz (Juz Amma).
- System Capability: While the AI agent is currently tuned for these sections, the underlying API and architecture support the entire Holy Quran (all 114 Surahs). You can easily extend the agent's memory to include the full Quran.
- π― Semantic Precision: Leverages
gemini-embedding-001to understand deep religious context and Somali nuances. - β‘ Hybrid Retrieval: Integrates Memvid for a powerful combination of vector similarity and lexical matching, ensuring exact verse lookups.
- π‘οΈ Hallucination-Free: strictly grounded in provided tafsiir data. If the information isn't in the context, the agent won't invent it.
- π± Premium Experience: A modern, responsive interface with Islamic-inspired aesthetics, smooth micro-animations, and full dark mode support.
- Core: Next.js 15 (App Router, React 19)
- Styling: Tailwind CSS 4 (Modern CSS engine)
- Vector Memory: @memvid/sdk (Local
.mv2storage) - Intelligence: Google Gemini 2.0 Flash
- Data Source: Custom Somali Tafsiir JSON (
data/trained.json)
βββ data/ # Model memory source (trained.json) & Memvid DB βββ src/ β βββ app/ # Chat API logic and application routes β βββ components/ # UI Components (Sidebar, Messaging, etc.) βββ scripts/ # Ingestion and development tools βββ public/ # Static assets and religious icons
- Node.js 18+
- Google Gemini API Key
git clone https://github.com/your-repo/tafsiir-agent.git
cd tafsiir-agent
npm installCreate a .env file in the root:
GOOGLE_API_KEY=your_gemini_api_key_here
Process the trained.json data into the high-speed Memvid vector database:
npm run ingest
npm run dev
The platform includes a robust Public REST API for accessing the Quran (Arabic + Somali translation) programmatically.
| Endpoint | Action |
|---|---|
GET /api/quran/surahs |
List all 114 Surahs |
GET /api/quran?surah=X |
Get all verses of Surah X |
GET /api/quran?surah=X&ayah=Y |
Get single verse (Surah X, Ayah Y) |
Full documentation available at /docs in the running application.
Created for the Somali AI Community. Help us bridge tradition and technology.
Distributed under the MIT License. See LICENSE for more information.