Legacy Migration Guide
Purpose: Move from the legacy QuranClient shape to the recommended runtime-specific entrypoints.
Use this when: Your code still imports QuranClient from @quranjs/api and you want clearer runtime boundaries.
Do not use this when: You are starting a new integration.
Backend required: Depends on your API family.
Allowed runtimes: Node.js, serverless functions, workers, browser apps, mobile apps.
Required credentials: client_id always. client_secret only on the server.
Minimal import: @quranjs/api/server or @quranjs/api/public.
Existing QuranClient imports remain supported for backwards compatibility. This migration is recommended cleanup, not a breaking upgrade requirement.
Read the short version here:
Still supported legacy shape:
import { QuranClient } from "@quranjs/api";
Recommended runtime-specific shape:
import { createServerClient } from "@quranjs/api/server";
import { createPublicClient } from "@quranjs/api/public";