Skip to content

Ihkam

An Arabic web platform for people who have memorized the Quran. It finds exactly which near-identical verses a memorizer mixes up, shows them side by side with the difference highlighted, and schedules daily review until they stick.

Project data

Type
Website
Platforms
Web
Status
Live
Year
2026
Stack
  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • PostgreSQL
  • Neon
  • Drizzle ORM
  • Better Auth
  • Python
  • MiniSearch
  • Vercel
Ihkam
Plate 1Ihkam

Part 1 of 3

The challenge

Many verses of the Quran repeat almost word for word in different surahs and differ by a single letter, particle or word, and even strong memorizers swap them under pressure. Existing apps test recitation in general; none pinpoints the exact places a person confuses, explains why the wording differs, or brings those spots back for review. The content also had to be trustworthy: the Quran text could never be edited or generated, and every explanation had to come from recognized classical works.

Part 2 of 3

What we built

An offline Python pipeline pins the Tanzil Uthmani text with a hash for every ayah, finds repeated word sequences across all 6,236 ayat, clusters them into groups, classifies each difference (a particle, an addition, an omission, a substitution, word order or a verse ending) and generates a question bank in four types and five difficulty levels. It also links passages from five classical books on the mutashabihat to the groups they explain. The Next.js app is built on that data: an adaptive placement test that needs no account, practice by surah, juz or group, spaced daily review of each user's own mistakes, a competition-prep mode with a daily plan and a timed mock exam, and search over normalized Arabic. Answers never reach the browser before the user submits.

Part 3 of 3

The result

Ihkam has been live at ihkamquran.com since September 2026, free and without ads. It publishes 1,090 groups, each confirmed by a classical source, with the difference highlighted and a memorization rule, and its engine covers 85.4% of all ayat (5,327 of 6,236). Visitors can sign in with Google or an email code, or practice as guests, and install it as a web app.

Ihkam in numbers

documented similar-verse groups
1,090
of the Quran's ayat covered
85.4%
generated practice questions
43,201
classical books linked as sources
5

How it fits together

  1. Content pipeline

    • Python
    • Tanzil Uthmani text
    • n-gram matching

    Owned by Mahmoud Hamdy

  2. Web app

    • Next.js
    • React
    • Tailwind CSS

    Owned by Mahmoud Hamdy

  3. API and data

    • Server actions
    • Drizzle ORM
    • PostgreSQL on Neon

    Owned by Mahmoud Hamdy

  4. Sign-in

    • Better Auth: Google
    • email code
    • guest

    Owned by Mahmoud Hamdy

  5. Search

    • MiniSearch over normalized Arabic

    Owned by Mahmoud Hamdy

Who built it

Who built it
NameRoleWhat they did
Mahmoud HamdyFull-Stack EngineerBuilt Ihkam end to end: the Python pipeline that detects and classifies similar verses and generates the question bank, the Next.js app with its placement test, practice, spaced review and competition mode, the database and sign-in, and the admin tools for reviewing groups and error reports.
About this service