daptin

Self-hosted application server for schema-driven APIs, identity, files, automation, integrations, realtime, metering, and protocols.

Automatically checked · GitHub checked 2026-11-12

daptin

Overview

Daptin logo

Daptin

A self-hosted application server built around your data model.

Define resources once. Daptin runs their APIs, identity, permissions, files, automation, integrations, realtime delivery, and operational controls.

Latest release License: LGPL v3 Go Report Discord

Website · Quickstart · Feature map · Automation explained · Documentation


One model, many backend surfaces

Daptin loads schema files into its runtime configuration. Each configured table is recorded as world metadata and becomes a permission-aware JSON:API resource at /api/{entity}. The running server attaches its other API, automation, storage, integration, and protocol surfaces around that resource runtime.

Many capabilities are configured as ordinary data. Rows in tables such as action, task, smd, cloud_store, site, integration, llm_provider, and api_plan tell the running server what to execute or expose.

PartPlain-English meaning
SchemaDescribes the records, fields, relationships, validation, and optional behavior flags your application needs.
Resource runtimeTurns every configured table into stored data plus CRUD and relationship APIs.
Permission gatesCheck access to the table, individual row, relation, or action before work is performed.
System tablesConfigure Daptin itself—actions, schedules, state definitions, storage, sites, integrations, mail, plans, and more.
Attached surfacesExpose the same model through JSON:API, optional GraphQL, WebSockets, feeds, files, OAuth/OIDC, LLM routes, and built-in protocols.

Read the source-oriented application server feature map for the runtime components behind this diagram.

Start in a minute

Docker

docker run --pull=always --rm -p 127.0.0.1:6336:8080 daptin/daptin:latest

For a durable local stack with PostgreSQL:

cp .env.example .env
docker compose up --wait

The Compose stack binds Daptin only to 127.0.0.1:6336 and keeps PostgreSQL inside its private network. Database and asset data are stored in named volumes. Change the development password in .env before using the stack beyond local evaluation. Kubernetes users should start with the Kustomize deployment guide.

Linux binary

curl -L -o daptin https://github.com/daptin/daptin/releases/latest/download/daptin-linux-amd64
chmod +x daptin
./daptin -port=6336

Open http://localhost:6336, create the first administrator, and continue with the Getting Started Guide.

The complete feature map

The table below groups the implemented surface by responsibility.

CapabilityWhat Daptin providesLearn more
Schema and data runtimeYAML or JSON schema; 41 column types; relations and joins; composite keys; validation and conformation; translations; audit, state, and metering flags; import, export, and generated test data.Core concepts · Relationships · Validation
APIs and discoveryJSON:API CRUD and relationships with filtering, sorting, and pagination; a separate aggregation API; optional GraphQL queries, mutations, and actions; OpenAPI, metadata, and JavaScript model discovery routes.API overview · GET reference · GraphQL
Identity and permissionsUsers, groups, ownership, default and access groups; table, row, relation, and action permissions; JWT login flows and OTP; OAuth client connections; OAuth 2/OIDC provider endpoints and JWKS.Permissions · OAuth authentication · OAuth provider
Actions and orchestrationActions with inputs, validation, conformations, conditions, ordered outcomes, CRUD steps, Go performers, client responses, and chained work; scheduled action invocation; state tracking; data exchange.Actions overview · Action reference · Task scheduling
Files, sites, and templatesEncrypted credentials; rclone-backed local or cloud stores; asset columns and uploads; direct and presigned file flows; caching, ETags, gzip, and storage sync; sites, subsites, host/path routing, and Go templates.Cloud storage · Asset columns · Subsites · Templates
Realtime and protocolsCRUD events over Olric PubSub and /live WebSockets; topic permissions and optional YJS collaboration; streams and RSS/Atom/JSON feeds; HTTP(S), SMTP/IMAP, FTP/FTPS, and WebDAV-style CalDAV/CardDAV routes.WebSocket API · Feeds · FTP server
Integrations and LLM routingOpenAPI v2/v3 operations installed as Daptin actions; REST, GraphQL, short-lived WebSocket, and unary gRPC transports; OAuth or custom credentials; multi-deployment LLM routing with OpenAI-compatible chat, Responses, embeddings, image generation, model discovery, streaming, tools, and structured output.Integrations · LLM gateway · Compose example
Metering, clustering, and operationsPlans, memberships, usage, quotas, credit hooks, and rate limits; metering for CRUD, actions, and LLM tokens; Olric cache, PubSub, counters, clustering, and outbox deduplication; audit logs, TLS, ping, statistics, config, logs, and profiles.API metering · Clustering · Audit logging · Production

Protocol scope: Daptin’s CalDAV/CardDAV routes provide standards-based discovery, calendar/address-book collections, query and multiget reports, ETags, and authenticated user isolation. Scheduling, sync tokens, delegation, COPY, MOVE, and property mutation are not implemented.

A small schema becomes a permission-aware API

Place schema_product.yaml beside the Daptin binary:

Tables:
  - TableName: product
    Columns:
      - Name: name
        DataType: varchar(200)
        ColumnType: label
        IsIndexed: true
      - Name: price
        DataType: float
        ColumnType: measurement
      - Name: published
        DataType: bool
        ColumnType: truefalse
        DefaultValue: "false"

When Daptin starts, it creates the table and exposes the resource through JSON:API:

GET    /api/product
POST   /api/product
PATCH  /api/product/{reference_id}
DELETE /api/product/{reference_id}

The shared middleware checks table and row access, validates and conforms data, applies metering when configured, and publishes successful CRUD events. Discover entity definitions through /api/world, the API specification through /openapi.yaml, JavaScript models through /jsmodel/{typename}, and available column types through /meta?query=column_types. GraphQL offers an optional query surface.

Add relations, permissions, assets, or audit history as the resource needs them.

Actions, scheduled tasks, and state tracking

These are related building blocks, not one workflow engine:

TermWhat it actually storesWhat happens at runtime
ActionInputs, validation/conformation rules, conditions, permissions, and ordered output fields attached to a world entity.A call to /action/{type}/{name} or a GraphQL action can run CRUD outcomes, registered Go performers, and client-response outcomes.
TaskA schedule, entity name, action name, attributes, active flag, job type, and an as_user relation.At server startup it is loaded into the cron scheduler. When due, Daptin loads that user’s identity and groups, then calls the same action handler inside a database transaction.
State machine definition (smd)An initial state and named events with allowed source and destination states./track/start creates an {entity}_state record. /track/event verifies the current source state, records the transition, increments its version, writes audit data, and publishes an event.
Data exchangeA mapping for synchronizing resource data with an action or HTTP destination.Exchange middleware runs before and after configured resource operations. Failures continue by default; each exchange can instead request transactional error propagation or durable retry. See Data Exchange.

State tracking does not provide guards, entry/exit actions, parallel states, or hierarchical states. If a transition should perform work, invoke an action separately. See State Machines for the exact supported model.

Choose a starting point

I want to…Start here
Install and configure DaptinInstallation · First admin setup
Model resources and query themCore concepts · API reference
Secure users, rows, and actionsPermissions · Authorization scenario
Build reusable backend operationsActions · Custom actions
Schedule work or track record statesTask scheduling · State machines
Connect external services or LLMsIntegrations · LLM providers
Sell a paid plan through provider checkoutPayments and checkout · Runnable example
Store files or host a subsiteCloud storage · Subsites
Meter or run Daptin in productionAPI metering · Production deployment · Database setup

Ecosystem

ProjectPurpose
Daptin CLIManage data, actions, OAuth, integrations, storage, and assets.
JavaScript client · Go clientConnect applications to Daptin.
Schema samplesStart from working schema examples.
LLM demo · Metering demoExplore metered AI and API products.
Integration auth demo · OAuth provider demoExplore integrations and identity.
DadadashA larger application built on Daptin.