SDK Overview
@crowdin/serverless-apps-sdk is the typed SDK for building serverless Crowdin apps - frontend-only apps that run inside the Crowdin UI. The SDK is your bundle’s connection to Crowdin: it registers the app’s modules, exposes typed context, events, and host actions, and ships a Crowdin REST API client that works without tokens, Crowdin-hosted app storage, a UI kit styled to match Crowdin, and an i18n runtime.
Installation
Section titled “Installation”npm i @crowdin/serverless-apps-sdkpnpm add @crowdin/serverless-apps-sdkyarn add @crowdin/serverless-apps-sdkreact, react-dom, and the Lingui packages are optional peer dependencies: the core entry point works without them; install them to use the /react, /ui, or /i18n entry points. Apps scaffolded with the CLI come with all of this preconfigured.
Entry points
Section titled “Entry points”| Import | Contents |
|---|---|
@crowdin/serverless-apps-sdk | Framework-free core: module registration (prepare*), context and events, host actions (editor, project, profile, modal, …) |
@crowdin/serverless-apps-sdk/react | AppUiProvider, useCrowdinContext, useCrowdinEvent, useTheme |
@crowdin/serverless-apps-sdk/ui | React component library styled to match the Crowdin UI (also re-exports /react) |
@crowdin/serverless-apps-sdk/ui/theme.css | Tailwind theme source - for apps that run Tailwind CSS themselves (CLI-built apps do) |
@crowdin/serverless-apps-sdk/ui/styles.css | Prebuilt stylesheet - for apps that do not use Tailwind |
@crowdin/serverless-apps-sdk/i18n | AppI18nProvider - Lingui-powered translations of your app’s own UI |
@crowdin/serverless-apps-sdk/api | createCrowdinClient() - Crowdin REST API client executed by the host |
@crowdin/serverless-apps-sdk/storage | createStorage() - Crowdin Storage, the app’s key-value records hosted by Crowdin |
@crowdin/serverless-apps-sdk/manifest.schema.json | JSON Schema for manifest.json |
Upgrading
Section titled “Upgrading”The SDK and the CLI are released in lockstep - upgrade both together:
pnpm up @crowdin/serverless-apps-sdk @crowdin/serverless-apps-cliNew module types, events typings, and manifest schema entries arrive with SDK releases, so an upgrade is how the app picks up new platform placements. After upgrading and editing manifest.json, the next crowdin-serverless-apps publish (or dev) sends it to Crowdin together with the build.