MCPcopy Index your code
hub / github.com/OpenHikmah/openhikmah-web

github.com/OpenHikmah/openhikmah-web @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
720 symbols 2,043 edges 258 files 30 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Open Hikmah logo  Open Hikmah

An AI-grounded Quran knowledge graph — search a verse, drop it on an infinite canvas, and let AI surface the real connections between verses.

CI License: GPL-3.0 Contributor Covenant PRs Welcome

TypeScript GitHub stars Open issues

Try it live →


Overview

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.


Features

  • Canvas — Infinite graph of verse nodes connected by AI-generated edges. Expand any verse by Theme, Root Word, or Contrast. Connections are grounded in real Arabic roots and embedding similarity — the AI only explains the reasoning, never the reference.
  • Search — Direct reference lookup (2:255), full-text keyword search, or semantic search by meaning.
  • Find similar verses — From any verse, surface the closest verses by meaning.
  • Shareable canvases — Every canvas state serializes to a single URL you can copy and share.
  • Audio — Play all canvas verses in Qur'an order with a single button.
  • 99 Divine Names — Full Asma'ul Husna with Arabic script, root morphology, taxonomy, verse feed, and contemplative reflections.
  • Bookmarks — Save verses to your account; syncs across devices via the Quran Foundation API.
  • Social — Daily engagement streaks, a friends leaderboard, and head-to-head challenges (24h / 48h / 7d).

Getting Started

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.


Tech Stack

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

Contributing

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.

Security

Report vulnerabilities privately to security@openhikmah.com. See SECURITY.md.

License

GPL-3.0


Star History

Star History Chart

Extension points exported contracts — how you extend this code

PreviewNode (Interface)
* A faithful, purely-decorative recreation of the real canvas for the landing — * so a first-time visitor sees what "a
components/home/CanvasPreview.tsx
Verse (Interface)
(no doc)
types/quran.ts
HeaderProps (Interface)
(no doc)
components/layout/Header.tsx
EnrichedChallenge (Interface)
(no doc)
components/social/ChallengeList.tsx
EmptyStateProps (Interface)
(no doc)
components/canvas/EmptyState.tsx
SearchDialogProps (Interface)
(no doc)
components/search/SearchDialog.tsx
InteractiveVerse (Interface)
(no doc)
components/morphology/InteractiveArabic.tsx
ButtonProps (Interface)
(no doc)
components/ui/Button.tsx

Core symbols most depended-on inside this repo

GET
called by 109
app/api/names/route.ts
POST
called by 100
app/api/notes/route.ts
cn
called by 51
lib/utils.ts
PATCH
called by 49
app/api/social/me/route.ts
requireUser
called by 39
lib/social-auth.ts
requireAdmin
called by 30
lib/admin-auth.ts
getConnections
called by 23
lib/graph-service.ts
isValidRef
called by 20
lib/quran-corpus.ts

Shape

Function 615
Interface 81
Class 14
Method 10

Languages

TypeScript100%

Modules by API surface

lib/social-auth.ts15 symbols
components/social/ChallengeList.tsx12 symbols
__tests__/api/connections.test.ts11 symbols
__tests__/api/workspace.test.ts10 symbols
__tests__/api/social/challenges.test.ts10 symbols
__tests__/api/social/activity.test.ts10 symbols
app/admin/votd/page.tsx9 symbols
__tests__/lib/redis.test.ts9 symbols
__tests__/api/bookmarks.test.ts9 symbols
store/canvas.ts8 symbols
lib/rate-limit.ts8 symbols
lib/ai.ts8 symbols

Datastores touched

open_hikmahDatabase · 1 repos

For agents

$ claude mcp add openhikmah-web \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page