Appearance
Content Delivery Overview
The Content Delivery module acts as a Headless CMS and Configuration hub for your frontend application.
Instead of hardcoding layouts, themes, or promotional text, the frontend dynamically fetches these elements from the backend. This allows casino operators to configure and update their platform's UI and content from their back-office without requiring a frontend redeployment.
Key Features
- Schema-less Key-Value Store: Operators can define any configuration key they want. The SDK doesn't enforce a rigid structure; it simply delivers the JSON payload.
- Content Separation: Large data payloads (like arrays of banner images, HTML blocks, or file metadata) are stored as
ContentBlobs. The namespace config holds a reference ID, which the frontend uses to fetch the specific blob only when needed. - In-Memory Caching: Content rarely changes minute-to-minute. The SDK automatically caches all configurations and content blobs in memory. Subsequent calls return instantly (0ms) without hitting the network.
- Instant DOM Theming: The SDK provides an
applyThemeToDom()helper that takes a dynamic config object and automatically converts camelCase keys (e.g.,primaryColor) into CSS variables (e.g.,--primary-color) on the browser's:rootelement.
Discovering Available Configurations
To see what content the operator has configured, you can fetch a list of all available namespaces. This is highly useful for building dynamic routing or debugging what content is available for the current platform.
javascript
const namespaces = await sdk.content.getAllNamespaces();
console.log(namespaces);
// Output: ['theme', 'home_page', 'casino_lobby', 'translations']Once you know the namespace name, you can fetch its specific configuration data.