apiUrl you give it, over
the frozen /v1 contract. Self-hosting means
implementing that contract on your own backend and pointing the SDK at it.
What your backend must provide
1
The /v1 document endpoints
List/create/read/update/delete plus the shared-token read, exactly as
specified in the Documents API. Paths are rooted at
<apiUrl>/v1/….2
Bearer-token auth
The editor sends
Authorization: Bearer <token> with whatever your
getToken returns. On your own backend you control both sides, so this
can be the standard embed-token exchange or any
token scheme of yours — the SDK only requires that a 401 means “refresh
via getToken and retry once”. If the token is a JWT with an exp claim,
the SDK also refreshes proactively before expiry.3
Signature verification (renderers only)
For cross-user reads, verify
?sig=&exp= as HMAC-SHA256 over
"<doc_id>|<exp>" — see
Signatures.4
Quran / hadith content
The editor’s insertion dialogs read
/v1/quran/… and /v1/hadith/…, so
your backend needs to serve those endpoints and source the underlying
datasets. On the managed cloud they are hosted and kept current for you.5
Image storage
The upload/confirm/url image endpoints backed by S3-compatible storage,
if your documents include images.
When to choose this
While Qirtaas seems simple, the backend that powers it isn’t. To self-host it, you need:- Elasticsearch for content API
- S3-compatible storage
- Background job processing for content API syncing
