|
| 1 | +--- |
| 2 | +name: quran-foundation-api-docs |
| 3 | +description: Use Quran Foundation docs and tutorials to choose the correct API family, authentication flow, endpoint, font rendering approach, request-access prerequisite, and official references for content, search, OAuth2/OIDC, user-related, and Quran Reflect integrations. |
| 4 | +--- |
| 5 | + |
| 6 | +# Quran Foundation API Docs |
| 7 | + |
| 8 | +## Use When |
| 9 | + |
| 10 | +- The task involves Quran Foundation APIs, api-docs.quran.foundation, Quran.com integrations, or quranreflect.com integrations. |
| 11 | +- The user needs official endpoint selection, request or response details, auth guidance, scopes, quickstarts, or migration help. |
| 12 | +- The user needs font rendering or Mushaf page-layout guidance. |
| 13 | +- The user needs OAuth2 or OIDC setup guidance across web or mobile platforms. |
| 14 | +- The user needs onboarding details such as client provisioning or Request Access. |
| 15 | +- The task involves Quran Reflect or quranreflect.com features backed by Quran Foundation APIs. |
| 16 | +- The user wants links to official documentation or OpenAPI specifications. |
| 17 | + |
| 18 | +## Do Not Use When |
| 19 | + |
| 20 | +- The task is unrelated to Quran Foundation APIs. |
| 21 | +- The user needs live production data, account-specific secrets, or environment access that is not present in the docs. |
| 22 | + |
| 23 | +## Route The Request First |
| 24 | + |
| 25 | +1. Identify the correct API family. |
| 26 | + - Content APIs v4: Quran text, translations, tafsir, audio, recitations, verses, chapters, pages, juz, hizb, ruku, manzil, and related content. |
| 27 | + - Search APIs v1: Quran search queries and search-related integration. |
| 28 | + - OAuth2 APIs v1 and OIDC docs: authentication, authorization, tokens, discovery, and login flows. |
| 29 | + - User-related APIs v1: bookmarks, collections, notes, profiles, reading sessions, rooms, posts, and related user features. |
| 30 | + - Font and page-layout tutorials: script rendering, Mushaf layouts, and page-based display guidance. |
| 31 | + - Quran Reflect integrations: posts, comments, feeds, likes, saves, room/page/community features, and related scopes. |
| 32 | +2. Prefer stable production docs by default. |
| 33 | +3. Only use pre-live user-related docs when the user explicitly asks for upcoming or unreleased behavior. |
| 34 | + |
| 35 | +## Canonical Sources |
| 36 | + |
| 37 | +- Docs home: `https://api-docs.quran.foundation/` |
| 38 | +- Content OpenAPI: `https://api-docs.quran.foundation/openAPI/content/v4.json` |
| 39 | +- Search OpenAPI: `https://api-docs.quran.foundation/openAPI/search/v1.json` |
| 40 | +- OAuth2 OpenAPI: `https://api-docs.quran.foundation/openAPI/oauth2-apis/v1.json` |
| 41 | +- User-related OpenAPI (production): `https://api-docs.quran.foundation/openAPI/user-related-apis/v1.json` |
| 42 | +- User-related OpenAPI (pre-live): `https://api-docs.quran.foundation/openAPI/user-related-apis/pre-live/v1.json` |
| 43 | +- User APIs OIDC quickstart: `https://api-docs.quran.foundation/docs/tutorials/oidc/user-apis-quickstart/` |
| 44 | +- OAuth2 getting started: `https://api-docs.quran.foundation/docs/tutorials/oidc/getting-started-with-oauth2/` |
| 45 | +- OpenID Connect tutorial: `https://api-docs.quran.foundation/docs/tutorials/oidc/openid-connect/` |
| 46 | +- OIDC client setup: `https://api-docs.quran.foundation/docs/tutorials/oidc/client-setup/` |
| 47 | +- OAuth2 web integration example: `https://api-docs.quran.foundation/docs/tutorials/oidc/example-integration/` |
| 48 | +- Mobile apps overview: `https://api-docs.quran.foundation/docs/tutorials/oidc/mobile-apps/` |
| 49 | +- Android mobile OIDC guide: `https://api-docs.quran.foundation/docs/tutorials/oidc/mobile-apps/android/` |
| 50 | +- iOS mobile OIDC guide: `https://api-docs.quran.foundation/docs/tutorials/oidc/mobile-apps/iOS/` |
| 51 | +- React Native OIDC guide: `https://api-docs.quran.foundation/docs/tutorials/oidc/mobile-apps/react-native/` |
| 52 | +- Content API quickstart: `https://api-docs.quran.foundation/docs/quickstart/` |
| 53 | +- Font rendering tutorial: `https://api-docs.quran.foundation/docs/tutorials/fonts/font-rendering/` |
| 54 | +- Page layout tutorial: `https://api-docs.quran.foundation/docs/tutorials/fonts/page-layout/` |
| 55 | +- Request access: `https://api-docs.quran.foundation/request-access/` |
| 56 | +- FAQ: `https://api-docs.quran.foundation/docs/tutorials/faq/` |
| 57 | +- API catalog: `https://api-docs.quran.foundation/.well-known/api-catalog` |
| 58 | + |
| 59 | +## Working Rules |
| 60 | + |
| 61 | +- Cite official Quran Foundation docs or OpenAPI specs when giving implementation guidance. |
| 62 | +- Prefer the most specific doc page for the endpoint in question, not just the docs home page. |
| 63 | +- Do not invent endpoints, scopes, parameters, headers, or response fields. Confirm them from the docs or OpenAPI. |
| 64 | +- Distinguish documentation URLs from API base URLs. |
| 65 | +- For auth questions, call out whether the answer belongs to OAuth2/OIDC or to an application API. |
| 66 | +- For setup questions, mention if Request Access and registered redirect URIs are prerequisites. |
| 67 | +- For Quran font questions, choose between Unicode text rendering and page-based glyph rendering based on the user's display requirements. |
| 68 | +- For Quran Reflect-related questions, check post, comment, feed, room, and scope docs before answering. |
| 69 | +- If multiple endpoints could fit, explain the best match and mention the alternative only if it materially changes implementation. |
| 70 | +- If the user asks for sample code, keep it aligned with documented auth and base URL expectations. |
| 71 | + |
| 72 | +## Fast Routing Hints |
| 73 | + |
| 74 | +- "Get verses, translations, tafsir, chapters, audio, or recitations" -> Content APIs v4 |
| 75 | +- "Search the Quran" -> Search APIs v1 |
| 76 | +- "Login, tokens, discovery, issuer metadata, OAuth2, OIDC" -> OAuth2 APIs v1 plus OIDC docs |
| 77 | +- "Bookmarks, collections, notes, reading sessions, profile, rooms, posts" -> User-related APIs v1 |
| 78 | +- "Web login flow, PKCE, callback, mobile auth, redirect URIs" -> OIDC tutorial pages plus OAuth2 APIs |
| 79 | +- "Fonts, glyph codes, Mushaf pages, script rendering, Tajweed display" -> Font rendering and page-layout tutorials plus relevant content endpoints |
| 80 | +- "Quran Reflect feed, post, comment, like, save, room, or community behavior" -> User-related posts and rooms docs, and content feed/read docs where applicable |
| 81 | +- "Upcoming user API behavior" -> Pre-live user-related docs, and clearly label them as pre-live |
| 82 | + |
| 83 | +## Expected Output |
| 84 | + |
| 85 | +- Name the API family first. |
| 86 | +- Link the exact doc page or OpenAPI spec used. |
| 87 | +- State any auth requirement or prerequisite clearly. |
| 88 | +- If relevant, mention whether the guidance is production or pre-live. |
0 commit comments