Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,299 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

Quickstart · Feature map · Automation explained · Documentation


Daptin runtime architecture: schema and runtime settings feed a shared resource graph, which supplies APIs, identity, automation, storage, integrations, protocols, and operations

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 --rm -p 6336:8080 -p 6443:6443 daptin/daptin:v0.12.34

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

This map groups the implemented surface by responsibility. Open the image for a full-size view.

Daptin feature map covering schema and data, APIs, identity, actions and schedules, files and sites, realtime protocols, integrations and LLM routing, metering, clustering, and operations

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-provider LLM routing with OpenAI-compatible chat, streaming, completion, embedding, model, and tool-call surfaces. Integrations · LLM providers
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, permissions, assets, or audit history as the resource needs them.

Actions, scheduled tasks, and state tracking

Daptin automation model: an action executes ordered outcomes, a scheduled task invokes that same action handler as a selected user, and state tracking separately validates and records allowed transitions

These are related building blocks, not one workflow engine:

Term What it actually stores What happens at runtime
Action Inputs, 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.
Task A 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 exchange A mapping for synchronizing resource data with another source or destination. Exchange middleware runs before and after configured resource operations.

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 Daptin Installation · First admin setup
Model resources and query them Core concepts · API reference
Secure users, rows, and actions Permissions · Authorization scenario
Build reusable backend operations Actions · Custom actions
Schedule work or track record states Task scheduling · State machines
Connect external services or LLMs Integrations · LLM providers
Store files or host a subsite Cloud storage · Subsites
Meter or run Daptin in production API metering · Production deployment · Database setup

Ecosystem

Project Purpose
Daptin CLI Manage data, actions, OAuth, integrations, storage, and assets.
JavaScript client · Go client Connect applications to Daptin.
Schema samples Start from working schema examples.
LLM demo · Metering demo Explore metered AI and API products.
Integration auth demo · OAuth provider demo Explore integrations and identity.
Dadadash A larger application built on Daptin.

About

Daptin - Backend As A Service - GraphQL/JSON-API Headless CMS

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.9k stars

Watchers

41 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages