criterion.life

Search Quran verses by topicSearch Hadith by topic
ChatQuranHadithTopics
AboutFAQPrivacy

Developers

Criterion is fully open source. Built to help people understand Islam through authentic sources using modern AI technology.

Open Source on GitHub

Explore our code, contribute, or learn how we built it

View on GitHub →

What is Criterion?

An AI assistant that helps people learn about Islam through:

  • 6,236 Quran verses - Full Arabic text with English translations
  • 21,641 Hadiths - From 6 major authentic collections (Sahih Bukhari, Muslim, Tirmidhi, Abu Dawud, Nawawi40, Riyad as-Salihin)
  • Semantic search - Find verses and hadiths by meaning, not just keywords
  • RAG technology - Grounded responses with citations

Why Open Source?

  • Transparency - Anyone can verify our sources and methodology
  • Trust - Open code builds confidence in authenticity
  • Education - Learn how to build AI applications with RAG
  • Collaboration - Community can improve and extend the project
  • Islamic values - Knowledge should be shared freely

Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
  • AI: XAI/Anthropic/Gemini, Gemini embeddings, Vercel AI SDK
  • Search: PostgreSQL + pgvector (HNSW index)
  • Hosting: Vercel, Neon Database

How to Contribute

  1. Fork the repository on GitHub
  2. Clone and set up locally (see README)
  3. Pick an issue or suggest a feature
  4. Make your changes and test
  5. Submit a pull request

All contributions welcome - features, bug fixes, documentation, or ideas!

Public API

Access Quran and Hadith search through our RESTful API. Perfect for building your own Islamic applications.

Quick Example

// Search Quran verses
fetch('https://criterion.life/api/v1/quran/search?q=patience&limit=5')
  .then(r => r.json())
  .then(data => console.log(data));

// Search Hadiths
fetch('https://criterion.life/api/v1/hadith/search?q=charity&collections=bukhari')
  .then(r => r.json())
  .then(data => console.log(data));

API Endpoints

  • GET /api/v1/quran/search - Semantic search across 6,236 verses
  • GET /api/v1/hadith/search - Hybrid search across 21,641 hadiths (6 collections)

Features

  • Semantic search powered by AI embeddings
  • Authenticity filtering (Sahih-only by default)
  • RESTful JSON responses
  • CORS enabled for web apps
  • Rate limited (10 req/min per IP)
View Full API Documentation →

Documentation

  • README.md - Quick start guide
  • CRITERION.md - System overview

Report Issues

Found a bug? Have a feature request? Let us know

Join Discussions

Ask questions, share ideas, or help others

License

Criterion is open source. Check the LICENSE file for details.

© 2025 Criterion. Open source Islamic knowledge assistant.

PrivacyDevelopersGitHub