Daptin

Daptin -- GraphQL/JSON-API 无头 CMS。(Daptin - GraphQL/JSON-API Headless CMS)

Github星跟蹤圖

Daptin

无头 CMS 服务器

下载文档社区

  • 数据的版本控制
  • 身份验证和授权
  • JSON API 端点
  • GraphQL 端点
  • 与外部服务的操作和集成

入门

特性

  • 声明性数据建模系统
    • 唯一/主键
    • 单/多关系
    • 规范化和构象(Normalizations and conformations)
    • 使用 JS 编写脚本
  • 适用于所有表的 CRUD JSON API
    • 创建,读取,更新,删除
    • 排序,过滤,搜索,按单列/多列分组
    • 身份验证和基于组的授权
    • 可插入的中间件,构造和规范化
    • 触发操作/管道
  • GraphQL API
    • 所有表的读取和变异 API(Mutations API)
    • 一级关系提取
  • 适用于所有平台的客户端 SDK 库
  • 丰富的数据类型
    • 列类型从数字到 json 到文件/图像资产
  • 子站点托管
    • 从单个实例中公开多个网站
    • 连接多个域/子域
  • 可插入的社交身份验证,基本身份验证或用户名/密码身份验证
  • 云存储
    • 无缝连接到外部云存储服务
    • 拉数据/推送数据
  • 操作 API
    • 定义工作流程
    • 为其他服务公开自定义端点
  • 准备使用 Web 仪表板
    • 响应式桌面、移动和桌面
  • 跨平台
    • Windows、Mac、Linux 等

APIs

Users

Asset and file storage

Sub-sites

Client library

Ruby Python Javascript
Typescript PHP Dart
.NET Java iOS
Elixir R Perl

API spec RAML

OpenAPI V3 规范为每个公开的端点自动生成。这可以用来生成进一步的文档和客户机。

curl http://localhost/apispec.yaml

<code>{
    "data": [
        {
            "type": "tableName",
            "attributes": {
                "col1": "",
                "col2": "",
            },
            "id": "",
        }
    ],
    "included": [
        {
            "type": "tableName",
            "attributes": {},
            "id": "",
        },
        .
        .
    ],
    "links": {
        "current_page": 1,
        "from": 0,
        "last_page": 100,
        "per_page": 50,
        "to": 50,
        "total": 5000
    }
}
</code>

Web Dashboard

Sign up and Sign in Create entity and add item Generate random data to show tables

为什么选择 Daptin?

Daptin 是为了帮助在数据上构建更快、更强大的 API,这些 API 可以跨所有类型的前端工作。

虽然 Daptin 主要针对 Web 应用,但 Android 和 iOS 应用作为开发人员快速增长的目标的出现,需要一种不同的方法来构建后端。随着开发人员对传统框架和捆绑技术的经典使用,我们很难在业务和前端需求上投入足够的时间,从而满足各种应用程序的前端需求。这些应用程序提供一致且可预测的 API,在不同的平台和设备上,这些 API 在快负载和慢负载上的性能都一样好。

此外,框架碎片化还造成了 API 开发互操作性的噩梦,为一个目的构建的后端需要大量样板文件,并以一致的方式与系统的其他部分集成。

围绕 JSON API 的组件系统为这两个问题提供了解决方案,允许将更多时间投入到前端和业务构建中,并针对所有前端都可以使用基于标准的 JSON/实体模型。

然而,仅使用 JSON API 进行数据操作是不够的。构建应用程序需要大量的自定义操作、工作流、数据完整性、事件订阅以及与外部服务的集成,这些服务以前都被锁定在传统 web 框架中。构建 Daptin 的目的是将这些特性从传统框架中提取出来,并以自动化的方式将它们带到快速出现的 JSON API 标准中。

入门

  • 在服务器上部署 Daptin 实例
  • 上传 JSON/YAML/TOML/HCL 文件,该文件描述您的实体(或使用市场开始)
  • 或上传 XLS 文件以创建实体和上传数据
  • 成为实例的管理员(在此之前它是开放访问的,这就是您能够创建帐户的原因)

技术目标

  • 零配置启动(sqlite db 用于无配置安装,建议使用 mysql/postgres)
  • 紧密结合的功能集协同工作
  • 运行时可完全配置
  • 无状态(横向可扩展)
  • 利用已知的标准
  • 可在所有类型的设备上运行
  • 使用 qt 跨平台应用(非常长期的目标。一个响应式网站。)

路线图

  • 从 JSON 架构上传规范化 Db 设计
  • √ Json Api,带 CRUD 和关系
  • √ OAuth 身份验证,内置 jwt 令牌生成器(设置机密本身)
  • √ 基于稍加修改的 linux FS 权限模型的授权
  • √ 对象和操作链
  • √ 使用状态机进行状态跟踪
  • √ 数据连接器 -> 传入/传出数据
  • √ 插件系统 -> 根据您的需要扩展系统
  • √ 对不同数据类型(地理位置/时间/颜色/测量)的原生支持 (geo location/time/colors/measurements)
  • √ API 中数据的可配置智能验证
  • √ 页面/子网站 -> 为目标受众创建子网站
  • √ 定义系统周围的事件
  • √ 数据转换/交换/转换
  • √ 子网站的实时编辑器 -- grapesjs
  • √ 存储用于存储大型文件/子站点的连接器 -- rclone
  • √ 允许安装插件扩展的市场
  • √ 在线实体设计器
  • √ Excel 到实体识别
  • √ CSV 到实体标识

文档

(First edition: vz edited at 2019.09.01)

主要指標

概覽
名稱與所有者daptin/daptin
主編程語言Go
編程語言Go (語言數: 10)
平台Linux, Mac, Windows, Docker, Heroku, Kubernetes, Raspbian
許可證GNU Lesser General Public License v3.0
所有者活动
創建於2017-05-30 12:16:00
推送於2025-04-24 10:33:56
最后一次提交2025-04-24 16:03:52
發布數55
最新版本名稱v0.11.3 (發布於 )
第一版名稱v0.1.0 (發布於 2017-06-30 04:07:01)
用户参与
星數1.9k
關注者數46
派生數113
提交數3k
已啟用問題?
問題數87
打開的問題數17
拉請求數43
打開的拉請求數2
關閉的拉請求數15
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Define Schema

Find

Get By Id

Create

Delete

Delete relations

List relations

  • Versioning of the data
  • Authentication and authorization
  • JSON API endpoint
  • GraphQL endpoint
  • Actions and integrations with external services

Get Started

Features

  • Declarative Data Modeling system
    • Unique/Primary keys
    • Single/Multiple Relation
    • Normalizations and conformations
    • Scripting using JS
  • CRUD JSON APIs' for all tables
    • Create, Read, Update, Delete
    • Sort, filter, search, group by single/multiple columns
    • Authentication and Group based authorization
    • Pluggable middleware, conformations and normalizations
    • Trigger actions/pipelines
  • GraphQL APIs
    • Read and Mutations APIs for all tables
    • One level of relationship fetching
  • Client SDK libraries for all platforms
  • Rich data types
    • Column types ranging from number to json to file/image assets
  • Sub sites hosting
    • Expose multiple websites from a single instance
    • Connect multiple domains/sub-domains
  • Pluggable Social Auth, Basic Auth or Username/Password Auth
  • Cloud storage
    • Connect to external cloud storage services seamlessly
    • Pull data/Push data
  • Action APIs
    • Define work-flows
    • Expose custom endpoints for other services
  • Ready to use web dashboard
    • Responsive to desktop, mobile and table
  • Cross platform
    • Windows, Mac, Linux and more

APIs

Users

Asset and file storage

Sub-sites

Client library, ------------------------------------------------------------------------------, ----------------------------------------------------------------------, ------------------------------------------------------------------------------, Ruby, Python, Javascript, Typescript, PHP, Dart, .NET, Java, iOS, Elixir, R, Perl, ## API spec RAML

OpenAPI V3 spec is auto generated for each endpoint exposed. This can be use to generate further documentation and clients.

YAML API documentation

curl http://localhost/apispec.yaml

{
    "data": [
        {
            "type": "tableName",
            "attributes": {
                "col1": "",
                "col2": "",
            },
            "id": "",
        }
    ],
    "included": [
        {
            "type": "tableName",
            "attributes": {},
            "id": "",
        },
        .
        .
    ],
    "links": {
        "current_page": 1,
        "from": 0,
        "last_page": 100,
        "per_page": 50,
        "to": 50,
        "total": 5000
    }
}

Web Dashboard

Sign up and Sign in
Create entity and add item
Generate random data to show tables

Why Daptin?

Daptin was to help build faster, more capable APIs over your data that worked across for all types of frontend.

While Daptin primarily targeted Web apps, the emergence of Android and iOS Apps as a rapidly growing target for developers demanded a different approach for building the backend. With developers classic use of traditional frameworks and bundling techniques, we struggle to invest enough time in the business and frontend demands for all sorts of Apps that provide consistent and predictable APIs which perform equally well on fast and slow load, across a diversity of platforms and devices.

Additionally, framework fragmentation had created a APIs development interoperability nightmare, where backend built for one purpose needs a lot of boilerplate and integration with the rest of the system, in a consistent way.

A component system around JSON APIs offered a solution to both problems, allowing more time available to be invested into frontend and business building, and targeting a standards-based JSON/Entity models that all frontends can use.

However, JSON APIs for data manipulation by themselves weren't enough. Building apps required a lot of custom actions, workflows, data integrity, event subscription, integration with external services that were previously locked up inside of traditional web frameworks. Daptin was built to pull these features out of traditional frameworks and bring them to the fast emerging JSON API standard in an automated way.

Getting started

  • Deploy instance of Daptin on a server
  • Upload JSON/YAML/TOML/HCL file which describe your entities (or use marketplace to get started)
  • or upload XLS file to create entities and upload data
  • Become Admin of the instance (until then its a open for access, that's why you were able to create an account)

Tech Goals

  • Zero config start (sqlite db for no-config install, mysql/postgres is recommended for serious use)
  • A closely knit set of functionality which work together
  • Completely configurable at runtime
  • Stateless (Horizontally scalable)
  • Piggyback on used/known standards
  • Runnable on all types on devices
  • Cross platform app using qt (very long term goal. A responsive website for now.)

Road Map

  • Normalised Db Design from JSON schema upload
  • Json Api, with CRUD and Relationships
  • OAuth Authentication, inbuilt jwt token generator (setups up secret itself)
  • Authorization based on a slightly modified linux FS permission model
  • Objects and action chains
  • State tracking using state machine
  • Data connectors -> Incoming/Outgoing data
  • Plugin system -> Grow the system according to your needs
  • Native support for different data types (geo location/time/colors/measurements)
  • Configurable intelligent Validation for data in the APIs
  • Pages/Sub-sites -> Create a sub-site for a target audience
  • Define events all around the system
  • Data conversion/exchange/transformations
  • Live editor for subsites - grapesjs
  • Store connectors for storing big files/subsites - rclone
  • Market place to allow plugins/extensions to be installed
  • Online entity designer
  • Excel to entity identification
  • CSV to entity identification

Documentation