Adapter SDK
Build an adapter that teaches DSUI to connect to a service, read its data, run its commands, and show it in the workspace.
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#
Build your first adapter
Write, load, and run a small adapter in a few steps.
Choose adapter or plugin
Check that an adapter is the right kind of extension.
What an adapter is made of#
| Part | What it does | Page |
|---|---|---|
| Connection and context | Defines how people connect, and holds the clients that your code shares | Connections and context |
| Health | Reports whether the service is healthy. Required | Health checks |
| Resources | Read data, with a refresh policy | Resources |
| Actions | Run commands that change something | Actions |
| Jobs | Run background work for each service | Jobs |
| Routes | Publish HTTP endpoints for each service | Routes |
| Signals | Publish typed events | Signals |
| Pages | Compose components into screens | Pages |
| Stores | Keep state for an adapter or a page | Stores |
| Components | Use 33 builtin components, or add your own | Custom 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.