Documentation Index
Fetch the complete documentation index at: https://mintlify.com/adelpro/quran-search-engine/llms.txt
Use this file to discover all available pages before exploring further.
Stateless Quran search for modern applications
A UI-agnostic Quran (Qur’an) search engine for Arabic text in pure TypeScript. Built to be stateless, deterministic, and strongly typed.Quick start
Get started with a working search example in minutes
Installation
Install via npm, yarn, or pnpm
API Reference
Explore the complete API documentation
GitHub
View source code and contribute
Why this library
Most Quran search solutions are tightly coupled to a UI, server-bound or stateful, hard to customize or extend, and weakly typed. quran-search-engine is designed to be:- UI-agnostic - Works with React, Vue, React Native, Node, or vanilla JavaScript
- Fully client-side or server-side - No server required, runs anywhere JavaScript runs
- Stateless and deterministic - Pure functions, no side effects
- TypeScript-first - Strongly typed with full type inference
Key features
Arabic normalization
Unify Arabic text variations for consistent search results. Handles alef variants, tashkeel removal, and text standardization.Exact text search
Fast, deterministic matching against normalized Arabic text.Lemma and root matching
Linguistic search using morphology data from Quranic Arabic Corpus v4.0. Match words by their lemma (dictionary form) or trilateral root.UI-agnostic highlighting
Get highlight ranges as pure data structures. No HTML injection, no framework lock-in. You control the rendering.Search scoring
Results are scored based on match quality:| Match type | Score per hit |
|---|---|
| Exact | +3 |
| Lemma | +2 |
| Root | +1 |
| Fuzzy | +0.5 (fallback only) |
Fuzzy matching (powered by Fuse.js) is only used as a fallback when no exact, lemma, or root matches are found.
Multi-word search with AND logic
All query tokens are combined with AND logic. Results must match every token via exact, lemma, root, or fuzzy matching.Next steps
Installation
Install the library in your project
Quick start
Build your first search in 5 minutes