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.
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.
| Part | Plain-English meaning |
|---|---|
| Schema | Describes the records, fields, relationships, validation, and optional behavior flags your application needs. |
| Resource runtime | Turns every configured table into stored data plus CRUD and relationship APIs. |
| Permission gates | Check access to the table, individual row, relation, or action before work is performed. |
| System tables | Configure Daptin itself—actions, schedules, state definitions, storage, sites, integrations, mail, plans, and more. |
| Attached surfaces | Expose 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.
| Capability | What Daptin provides | Learn more |
|---|---|---|
| Schema and data runtime | YAML 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 discovery | JSON: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 permissions | Users, 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 orchestration | Actions 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 templates | Encrypted 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 protocols | CRUD 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 routing | OpenAPI 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. The normalized three-resource gateway is available from v0.13.0. | Integrations · LLM gateway · Compose example |
| Metering, clustering, and operations | Plans, 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 basic WebDAV-style file storage. They are not documented as complete calendar/contact protocol implementations.
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. Optional GraphQL, /openapi.yaml, /meta, and /jsmodel/{typename} expose additional ways to query or discover the same model.
Add [relations](https://github.com/