Your first publishing workflow
From first-time Setup to editing, public pages and an actual SDK read.
1. Set up and sign in
Start Core, Portal and Administration using the installation guide. Redis is optional. Open Administration /setup, enter a site name and your own administrator credentials, then sign in with the actual captcha. An installed instance does not need Setup again.
2. Edit, preview and publish
Choose or create a category in Administration. In Articles, provide a title, slug, language, summary and body. Upload images to Media, choose a public image for the body or cover, save the draft, inspect the authorized preview and publish.
Open /{language}/blog/{slug}. Saving a later draft keeps the previous publication public; withdrawal makes the anonymous detail return 404.
3. Read through the SDK
Standard Compose initializes the reference mappings. Source development and custom applications build and register their selected modules. Browsers obtain SDKs from Shell using same-origin /api; Node reads authorized bootstrap and creates/disposes a Shell for each read.
import type { Shell } from '@mosaic-base/shell';
import type { ArticleSDK, SiteSDK, I18nSDK } from '@mosaic-base/client-sdk';
import type { AuthClient, ServerAuthClient } from '@mosaic-base/auth-sdk';
// Declare once in your application's type contract, never import SDK implementations.
declare module '@mosaic-base/shell/contracts' {
interface SdkRegistry {
'site.config': Pick<SiteSDK, 'getConfig'>;
'content.articles': Pick<ArticleSDK, 'list' | 'getBySlug' | 'getPreview' | 'search'>;
'i18n.messages': Pick<I18nSDK, 'load' | 't' | 'clearCache' | 'refresh'>;
'auth.client': AuthClient | ServerAuthClient;
}
}
import { createModuleLoader, readPublicBootstrap, startShell } from '@mosaic-base/shell/bootstrap';
export async function createBrowserApplication(appId: string) {
const bootstrap = await readPublicBootstrap(appId);
return startShell({ bootstrap, loader: createModuleLoader({ target: 'browser' }),
host: { apiBaseUrl: new URL('/api', location.origin).href } });
}
export async function readPublishedArticles(shell: Shell) {
const articles = await shell.getSdk('content.articles');
return articles.list({ language: 'en-US', page: 1, pageSize: 10 });
}4. Add another language
Enable the language in Site settings, create an article translation, and edit and publish it separately. Managed application copy lives in Translations; it is a different data model.