An AI-grounded Quran knowledge graph — search a verse, drop it on an infinite canvas, and let AI surface the real connections between verses.
Open Hikmah is an AI-grounded Quran knowledge graph. Rather than reading the Qur'an linearly, page by page, it lets you explore verses as a connected graph: search for a verse, place it on an infinite canvas, and expand it to surface related verses — by shared root word, by theme, or by meaningful contrast.
Connections are grounded, not hallucinated: canonical data — shared Arabic roots and embedding-based semantic similarity — identifies the candidate verses first. The AI's role is limited to explaining why a connection holds; it never invents a reference. Every edge on the canvas links to that explanation.
Verses can be found by direct reference (2:255), by keyword, or by meaning — describing a
concept in your own words and retrieving verses about it even when no words are shared with the
query.
2:255), full-text keyword search, or semantic
search by meaning.git clone https://github.com/OpenHikmah/openhikmah-web
cd openhikmah-web
bun install
cp .env.example .env.local
# fill in .env.local — see the comments in .env.example for what each value needs
bun run dev
Open http://localhost:3000.
At minimum you'll need ANTHROPIC_API_KEY to test AI connections; the Quran Foundation OAuth
variables are only required to test sign-in, bookmarks, and social features.
For the full contributor setup (running tests, Docker requirement for pushing, commit conventions), see CONTRIBUTING.md.
| Layer | Choice |
|---|---|
| Framework | Next.js 16 (App Router), React 19, TypeScript |
| Canvas | @xyflow/react |
| State | Zustand |
| Styling | Tailwind CSS v4 |
| AI | Anthropic Claude (adaptive thinking) with Gemini fallback; Gemini embeddings for semantic search |
| Quran data | alquran.cloud + Quran Foundation API; canonical morphology for root grounding |
| Auth | Quran Foundation OAuth2 PKCE |
| Database | PostgreSQL + pgvector + Drizzle ORM |
| Testing | Vitest, Playwright |
| CI | GitHub Actions |
Read CONTRIBUTING.md before opening a PR. The project touches sacred content — theological changes (AI prompts, divine name data, verse framing) have extra requirements detailed in Theological Standards.
Report vulnerabilities privately to security@openhikmah.com. See SECURITY.md.
$ claude mcp add openhikmah-web \
-- python -m otcore.mcp_server <graph>