Tutorial 10: Ayah Topics End-to-End
This tutorial is for users who want to browse Quran content by topics and concept groups.
1) What This Resource Is
Ayah Topics resources map topics/concepts to related ayahs and often include topic taxonomy details.
Typical content includes:
- Topic entities (name, category, description)
- Topic-to-ayah mappings
- Topic counts and searchable labels
Primary category:
2) When to Use It
Use ayah-topics data when building:
- Topic-first discovery experiences
- Educational thematic study flows
- Search interfaces by concept/theme
3) How to Get Your First Example Resource
- Open https://qul.tarteel.ai/resources/ayah-topics.
- Keep default listing order and open the first published card.
- Confirm page sections include:
- Topics listing/search area
-
Helptab
- Confirm available download formats (commonly
sqliteon this resource type).
This keeps onboarding concrete without hardcoded IDs.
4) What the Preview Shows (Website-Aligned)
On ayah-topics detail pages:
- Topics pane:
- Search input for topic names/metadata
- Topic list with ayah counts
- Topic detail navigation
-
Helptab:- Explains topic families and usage
- Documents mapping behavior between topics and ayahs
Practical meaning:
- Topic rows and topic-ayah mapping rows should be treated as separate layers.
- Build topic indexes first, then resolve ayah lists for display.
5) Download and Use (Step-by-Step)
- Download the package (commonly
sqlite). - Import topic tables and mapping tables.
- Normalize topic IDs and ayah keys.
- Build searchable topic index.
- On topic selection, fetch mapped ayah keys and join with script/translation.
Starter integration snippet (JavaScript):
JavaScript
const buildTopicIndex = (topics) =>
topics.reduce((index, topic) => {
index[topic.topic_id] = topic;
return index;
}, {});
const ayahKeysForTopic = (topicAyahMappings, topicId) =>
topicAyahMappings
.filter((row) => row.topic_id === topicId)
.map((row) => row.ayah_key);
6) Real-World Example: Browse by Topic
Goal:
- User picks a topic and sees related ayahs.
Inputs:
- Ayah Topics package
- Quran Script package
Processing:
- User searches/selects topic.
- App loads mapped ayah keys.
- App resolves ayah text and displays results.
Expected output:
- Topic-driven ayah browsing works with stable mapping.
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
- Mixing topic metadata and topic-ayah mapping tables.
- Assuming topic IDs are globally stable across different resources.
- Rendering topic results without pagination for large topic sets.
8) When to Request Updates or Changes
Open an issue if you find:
- Broken topic-to-ayah mappings
- Missing topic labels/descriptions
- Broken download links
Issue tracker: