Esc
Documentation
On this page

An adapter is a TypeScript package that teaches DSUI to work with one kind of service. You describe how to connect, what to read, what to run, and what to show. DSUI builds your package from source, runs it in a separate process, and renders your pages in the workspace.

You write the adapter with the @northgraindata/dsui-adapter-sdk package. Pin its exact version. The SDK works with DSUI through an API marker, described in versions and compatibility.

Start here#

What an adapter is made of#

PartWhat it doesPage
Connection and contextDefines how people connect, and holds the clients that your code sharesConnections and context
HealthReports whether the service is healthy. RequiredHealth checks
ResourcesRead data, with a refresh policyResources
ActionsRun commands that change somethingActions
JobsRun background work for each serviceJobs
RoutesPublish HTTP endpoints for each serviceRoutes
SignalsPublish typed eventsSignals
PagesCompose components into screensPages
StoresKeep state for an adapter or a pageStores
ComponentsUse 33 builtin components, or add your ownCustom components

Keep reads in resources and changes in actions. DSUI can then refresh, cache, and authorize them correctly.

How DSUI runs your adapter#

DSUI doesn’t run your adapter in its own process. See the runtime model for how processes are created and reused, and image dependencies if your adapter needs a program such as dbt in the Docker image.

Share your adapter#

DSUI loads an adapter from a GitHub repository with source: git, or from a directory with source: local. See release.