Skip to content

Connectors

A connector is a data-source plugin that maps dashin's table query (filter / sort / search / pagination / CRUD / bulk) to a specific backend's API. Swap the connector import to change backends — the table UI is unchanged.

Available connectors

BackendPackageAPI
PocketBase@dashin-dev/source-pocketbaseREST /api/collections
Appwrite@dashin-dev/source-appwriteDatabases REST
Supabase / Postgres@dashin-dev/source-supabasePostgREST
Directus@dashin-dev/source-directusREST /items
Payload@dashin-dev/source-payloadREST /api
Turso / libSQL@dashin-dev/source-tursoSQLite over HTTP (SQL)
Strapi@dashin-dev/source-strapiREST
GraphQL@dashin-dev/source-graphqlany GraphQL API

Common shape

Every connector exports dataCtrl, editableCtrl, and bulkDeleteCtrl:

tsx
import { dataCtrl, editableCtrl, bulkDeleteCtrl } from "@dashin-dev/source-<backend>"

<Table
  data={query => dataCtrl({ t, tableQuery: query, path: "<collection-or-table>" })}
  editable={editableCtrl({ t, SchemaName: "<collection-or-table>" })}
  actions={[bulkDeleteCtrl({ t, SchemaName, tableRef })]}
/>

GraphQL-native CMSes (Keystone, Hasura, …)

CMSes and backends that expose a GraphQL API — including KeystoneJS, Hasura, and GraphQL-mode Strapi — are supported through the @dashin-dev/source-graphql connector rather than a dedicated package. Point it at the GraphQL endpoint and map your query/mutations; no separate connector is needed.

Writing a connector

Mirror an existing source-* package: a pure filter module (operators → the backend's query language, unit-tested), listSer + CRUD/bulk services, and the three controllers. Add a vite.config.ts alias to the .ts source (so Vite gets clean ESM rather than the CJS lib/).