Schema files
A YAML or JSON schema can define tables, columns, indexes, relationships, validation rules, default values, and table settings.
Feature reference
Define tables in YAML or JSON. Daptin creates API routes for their records and applies the same user, group, and row permissions to actions, files, events, and integrations.
FOUNDATION
Define tables, columns, relationships, validation, and indexes in YAML or JSON.
A YAML or JSON schema can define tables, columns, indexes, relationships, validation rules, default values, and table settings.
Each record receives a public reference_id, creation and update times, a version number, and permission bits.
Use fields for text, numbers, dates, JSON, locations, ratings, measurements, files, images, audio, and video.
Use SQLite locally or connect Daptin to MySQL, MariaDB, or PostgreSQL.
Model belongs-to, has-one, has-many, and many-to-many relationships with generated relationship APIs.
Import CSV, XLSX, JSON, or YAML; export records; generate test records; and enable multilingual fields, auditing, status tracking, or metering.
HTTP APIS
Daptin creates JSON:API routes, optional GraphQL, aggregation queries, an OpenAPI document, and routes that list the configured tables and fields.
Create, read, update, and delete records and relationships. Requests support filtering, sorting, pagination, includes, and sparse fields; responses omit records the user cannot read.
Enable GraphQL queries and mutations for configured tables, relationships, aggregates, and actions.
Group, join, filter, sample, order, and calculate count, sum, average, minimum, maximum, first, or last values.
Download an OpenAPI description of the available tables, fields, actions, integrations, authentication requirements, and request examples.
Metadata routes list the configured tables, fields, relationships, and actions so clients can build requests from the running server.
Call the API from web, mobile, server, automation, or agent clients. The JavaScript and Go clients are optional.
ACCESS CONTROL
Users, groups, ownership, and permission bits control access to records, relationships, actions, topics, and integrations.
Create users and groups, assign memberships, set record owners, and use groups for teams or tenant accounts.
Set read, create, update, delete, refer, execute, and peek permissions for a table, record, relationship, or action.
Support password signup and signin, JWT sessions, reset flows, and TOTP-based two-factor authentication.
Redirect users to an external OAuth provider, handle the callback, and save the resulting token in an encrypted credential record.
Issue, refresh, revoke, and introspect tokens through authorization, JWKS, userinfo, and discovery endpoints.
Combine ownership, usergroups, relations, and row permissions to isolate tenant workspaces on one Daptin deployment.
BACKEND LOGIC
Define server-side actions, call them through the API, or run them on a cron schedule.
Define an action’s input fields, validation, conditions, ordered steps, response, and whether it requires an existing record.
Create or change records, call registered Go functions, render content, download files, set headers or cookies, and run further steps.
Call the same actions on cron schedules under a selected user identity and permission context.
List the status changes a record may make, reject changes that are not listed, and keep a version and audit history.
Before or after an action, map fields and copy records to or from a configured external source.
Daptin includes actions for sign-in, OAuth, file storage, mail, sites, integrations, certificates, publishing, imports, exports, and administration.
Current scope: state tracking records allowed transitions. Hierarchical states, parallel branches, and implicit entry or exit actions are outside its scope.
Build with actions →CONTENT
Attach files to records, store them locally or through rclone, and serve websites by host name or path.
Attach images, video, audio, documents, or other blobs to records with dedicated retrieval and upload routes.
Save files on the local filesystem or connect an rclone-supported service with encrypted credentials.
Upload through Daptin, use multipart uploads, or obtain a provider URL for direct upload when the storage service supports it.
Serve files with ETags, cache headers, gzip, in-memory caching, and negative caching for missing files.
Route sites by host or path, sync content from storage, apply basic auth, and serve multiple frontends from Daptin.
Render records into hosted HTML pages with Go templates.
CONNECTIONS
Enable WebSockets, feeds, YJS, SMTP, IMAP, FTP, or WebDAV-style routes from the Daptin process.
Publish create, update, and delete events through a worker pool. Multiple instances can exchange the events through Olric PubSub.
Subscribe to table or topic updates through /live. Daptin checks that the user may read the requested records or topic.
Enable YJS endpoints on selected columns for collaborative document editing.
Expose selected data through stream definitions and RSS, Atom, or JSON-style feed routes.
Enable database-backed SMTP, IMAP, FTP, and FTPS services alongside the HTTP application server.
Enable CalDAV/CardDAV routes for basic file storage and discovery.
Current scope: CalDAV/CardDAV routes provide basic WebDAV-style file storage. Full calendar and contact protocol compatibility is outside their current scope.
Explore events and protocols →EXTERNAL APIS
Import operations from OpenAPI, store the required OAuth or API credentials, and call those operations through Daptin. OpenAI-compatible routes send model requests to the configured provider.
Import operations from an OpenAPI v2 or v3 document. Daptin creates routes to list and call the imported operations.
Imported integrations can call REST, GraphQL, short-lived WebSocket, and unary gRPC endpoints.
Daptin loads OAuth tokens or encrypted credentials when it calls an integration. Callers submit operation fields and do not receive the stored secret.
Serve chat completions, streaming chat, completions, embeddings, models, and tool-call-compatible payloads under /v1.
Map model names to configured providers and credentials. Clients send requests to Daptin’s /v1 routes.
Daptin adds installed provider operations to its OpenAPI document.
OPERATIONS
Configure usage plans and quotas, inspect health and statistics, and coordinate caches and events across instances.
Create API plans, assign users to them, and set prices, request limits, compute limits, overage rules, and quotas for each billing period.
Record calls that read or change records, run actions, or use an LLM. LLM records include input and output token counts. An action can debit credits after the call.
Count calls with Olric across instances and reject a call when its rate or quota limit has been reached.
Use embedded Olric, LRU or file caches, event queues, and distributed PubSub across Daptin instances.
Check liveness and readiness endpoints and inspect server statistics, configuration, logs, profiles, table metadata, and optional audit records.
Daptin reports listener and TLS errors during startup. On shutdown, it drains HTTP and protocol sessions, flushes events, and then closes the database.
CLIENTS AND TOOLS
Call Daptin with HTTP, its CLI, the JavaScript client, or the Go client. Schema samples and demo repositories provide working examples.
Switch server contexts, sign in, list tables, inspect action inputs, read related records, run actions, and manage integrations, OAuth, storage, and files.
Use typed entities, JSON:API, action calls, authentication, asset URLs, and direct or multipart storage uploads.
Read and change Daptin records and call actions from a Go application.
Install the CLI through Homebrew, Scoop, Go, Linux packages, or downloadable binaries; run the server through Docker or a release binary.
Start with YAML or JSON table definitions for blogs, FAQs, stores, payments, construction projects, transactions, styles, and todos.
Example repositories test the OpenAI-compatible API, OAuth/OIDC, per-user integration credentials, metering, quotas, and credit accounting.