Tutorial 7: Quran Metadata End-to-End
This tutorial is for users who want to use Quran structural metadata (surah/juz/hizb/manzil and related entities) for navigation and filtering.
1) What This Resource Is
Quran Metadata resources provide structural reference data for Quran navigation.
Typical metadata includes:
- Surah records
- Juz/Hizb/Rub/Manzil structures
- Ayah-range references and numeric indexes
Primary category:
2) When to Use It
Use metadata resources when you are building:
- Browse-by-Juz/Hizb flows
- Structural navigation menus
- Section headers and contextual reading controls
3) How to Get Your First Example Resource
- Open https://qul.tarteel.ai/resources/quran-metadata.
- Keep default listing order and open the first published card.
- Confirm the detail page includes:
-
Previewtab (resource-specific title likeSurah names Preview) -
Helptab
-
- Confirm available downloads (
json,sqlite).
This keeps onboarding concrete without hardcoded IDs.
4) What the Preview Shows (Website-Aligned)
On metadata detail pages:
-
Previewtab:- Displays current metadata item examples
- Provides navigation controls where relevant
-
Helptab:- Documents field definitions and enum values
- Clarifies how structural references map to Quran sections
Practical meaning:
- Metadata is the navigation layer; script/translation/tafsir are content layers.
- Build filters from metadata, then fetch ayah content via shared keys/ranges.
5) Download and Use (Step-by-Step)
- Download metadata package (
jsonorsqlite). - Import structural tables/records.
- Normalize range fields to one format in your app.
- Build indexes by structure number (e.g.,
juz_number,hizb_number). - Connect metadata filters to ayah queries.
Starter integration snippet (JavaScript):
JavaScript
// Build lookup maps for fast structure-based navigation.
const buildMetadataIndexes = ({ surahs, juzRanges }) => {
const surahById = new Map(surahs.map((s) => [s.surah_id, s]));
const juzByNumber = new Map(juzRanges.map((j) => [j.juz_number, j]));
return { surahById, juzByNumber };
};
// Resolve ayah range for selected juz.
const getJuzAyahRange = (juzByNumber, juzNumber) => {
const record = juzByNumber.get(juzNumber);
if (!record) return null;
return {
from: `${record.from_surah}:${record.from_ayah}`,
to: `${record.to_surah}:${record.to_ayah}`
};
};
6) Real-World Example: Browse by Juz
Goal:
- User selects a Juz and immediately sees its ayah range.
Inputs:
- Quran Metadata package
- Quran Script package
Processing:
- User picks
Juz 30. - App resolves range from metadata.
- App queries and renders ayahs in that range.
Expected output:
- Structural navigation works without manual ayah lookups.
Interactive preview (temporary sandbox):
You can edit this code for testing. Edits are not saved and may not persist after refresh.
JavaScript Playground
Editor
Preview
7) Common Mistakes to Avoid
- Treating metadata as text content instead of navigation data.
- Hardcoding ranges instead of using metadata package values.
- Ignoring enum fields (for example revelation place) during filtering.
8) When to Request Updates or Changes
Open an issue if you find:
- Incorrect structural ranges
- Missing metadata records
- Broken json/sqlite links
Issue tracker: