{"id":13494539,"url":"https://github.com/daptin/daptin","last_synced_at":"2025-05-14T09:08:34.192Z","repository":{"id":25932138,"uuid":"92829622","full_name":"daptin/daptin","owner":"daptin","description":"Daptin - Backend As A Service - GraphQL/JSON-API Headless CMS","archived":false,"fork":false,"pushed_at":"2025-03-31T13:33:16.000Z","size":143291,"stargazers_count":1857,"open_issues_count":20,"forks_count":112,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-04-03T18:59:40.925Z","etag":null,"topics":["cloud-storage","content-management","crud-apis","graphql","graphql-api","graphql-server","headless-cms","json-api","static-site"],"latest_commit_sha":null,"homepage":"https://daptin.github.io/daptin/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daptin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"COPYING.LESSER","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-05-30T12:16:00.000Z","updated_at":"2025-04-01T13:26:25.000Z","dependencies_parsed_at":"2023-07-13T04:21:07.886Z","dependency_job_id":"88512fe8-2372-4813-82fa-ea6c899e7b0c","html_url":"https://github.com/daptin/daptin","commit_stats":{"total_commits":2699,"total_committers":17,"mean_commits":"158.76470588235293","dds":0.1689514635050019,"last_synced_commit":"be7edc83ebf8dc1f2fd36e8092b2c8f5a8cf3eee"},"previous_names":["artpar/goms"],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daptin%2Fdaptin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daptin%2Fdaptin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daptin%2Fdaptin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daptin%2Fdaptin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daptin","download_url":"https://codeload.github.com/daptin/daptin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248334950,"owners_count":21086477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-storage","content-management","crud-apis","graphql","graphql-api","graphql-server","headless-cms","json-api","static-site"],"created_at":"2024-07-31T19:01:25.877Z","updated_at":"2025-04-11T03:27:03.266Z","avatar_url":"https://github.com/daptin.png","language":"Go","readme":"\n\u003ch1 align=\"left\"\u003e\n  daptin\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://travis-ci.org/daptin/daptin\"\u003e\u003cimg alt=\"Travis\" src=\"https://img.shields.io/travis/daptin/daptin.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href='https://semaphoreci.com/artpar/daptin'\u003e \u003cimg src='https://semaphoreci.com/api/v1/artpar/daptin/branches/master/badge.svg' alt='Build Status'\u003e\u003c/a\u003e\n    \u003ca href='https://circleci.com/gh/daptin/daptin'\u003e \u003cimg src='https://circleci.com/gh/daptin/daptin.svg?style=svg' alt='Build Status'\u003e\u003c/a\u003e\t\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"/LICENSE\"\u003e\u003cimg alt=\"Software License\" src=\"https://img.shields.io/badge/LICENSE-LGPL%20v3-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/daptin/daptin\"\u003e\u003cimg alt=\"Go Report Card\" src=\"https://goreportcard.com/badge/github.com/daptin/daptin?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"http://godoc.org/github.com/daptin/daptin\"\u003e\u003cimg alt=\"Go Doc\" src=\"https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://codecov.io/gh/daptin/daptin\"\u003e\u003cimg alt=\"Codecov branch\" src=\"https://img.shields.io/codecov/c/github/daptin/daptin/master.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/daptin/daptin/releases/latest\"\u003e\u003cimg alt=\"Release\" src=\"https://img.shields.io/github/release/daptin/daptin.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n     \u003ca href=\"https://discord.gg/t564q8SQVk\"\u003e\u003cimg src=\"https://img.shields.io/badge/JOIN-ON%20DISCORD-blue\u0026?style=for-the-badge\u0026logo=discord\"\u003e\u003c/a\u003e \n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/daptin/daptin/releases\"\u003eDownload\u003c/a\u003e •\n\t\u003ca href=\"https://daptin.github.io/daptin/\"\u003eDocumentation\u003c/a\u003e •\n\t\u003ca href=\"https://join.slack.com/t/daptin/shared_invite/enQtMzM1NTM1NTkyMDgzLTVlYzBlMmM4YjMyOTk0MDc5MWJmMzFlMTliNzQwYjcxMzc5Mjk0YzEyZDIwYTljZmE5NDU3Yjk3YzQ3MzhkMzI\"\u003eCommunity\u003c/a\u003e\n\u003c/p\u003e\n\n\n```bash\n./daptin\n.\n. // logs truncated for brevity\n.\nINFO[2024-10-16 11:08:58] Listening websocket server at ... /live\nINFO[2024-10-16 11:08:58] Our admin is [artpar@gmail.com]\nINFO[2024-10-16 11:08:58] [ProcessId=86403] Listening at port: :6336\nINFO[2024-10-16 11:08:58] Get certificate for [Parths-MacBook-Pro.local]: true\nINFO[2024-10-16 11:08:58] Listening at: [:6336]\nINFO[2024-10-16 11:08:58] TLS server listening on port :6443\nINFO[2024-10-16 11:09:03] Member says: Message\u003cmembers: Joining from 192.168.0.125:5336\u003e\n```\n\nServer is up, sqlite database is used since we did not specify mysql or postgres.\n\n\n### signup, signin, user_account and usergroup\n\n## signup \n\ncall the signup \"action\" api to create a new user_account\n\n```bash\ncurl 'http://localhost:6333/action/user_account/signup' -X POST \\\n--data-raw '{\"attributes\":{\"email\":\"artpar@gmail.com\",\"password\":\"artpar@gmail.com\",\"name\":\"artpar@gmail.com\",\"passwordConfirm\":\"artpar@gmail.com\"}}'\n```\n\nOn a fresh instance all actions are allowed to be executed by guests, so you shouldn't see this\n\n```json\n[\n    {\n        \"Attributes\": {\n            \"message\": \"http error (403) forbidden and 0 more errors, forbidden\",\n            \"title\": \"failed\",\n            \"type\": \"error\"\n        },\n        \"ResponseType\": \"client.notify\"\n    }\n]\n```\n\nYou should see this\n\n```json\n[\n  {\n    \"ResponseType\": \"client.notify\",\n    \"Attributes\": {\n      \"__type\": \"client.notify\",\n      \"message\": \"Sign-up successful. Redirecting to sign in\",\n      \"title\": \"Success\",\n      \"type\": \"success\"\n    }\n  },\n  {\n    \"ResponseType\": \"client.redirect\",\n    \"Attributes\": {\n      \"__type\": \"client.redirect\",\n      \"delay\": 2000,\n      \"location\": \"/auth/signin\",\n      \"window\": \"self\"\n    }\n  }\n]\n```\n\n#### Sign in to get a JWT Bearer token\n\n```bash\ncurl 'http://localhost:6336/action/user_account/signin' \\\n--data-raw '{\"attributes\":{\"email\":\"artpar@gmail.com\",\"password\":\"artpar@gmail.com\"}}'\n\n[\n    {\n        \"Attributes\": {\n            \"key\": \"token\",\n            \"value\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFydHBhckBnbWFpbC5jb20iLCJleHAiOjE3MjkzMjExMjIsImlhdCI6MTcyOTA2MTkyMiwiaXNzIjoiZGFwdGluLTAxOTIyOCIsImp0aSI6IjAxOTI5NDFmLTI2MGUtN2I0Ni1hMWFlLWYxMGZhZTcwMDE3OSIsIm5hbWUiOiJhcnRwYXJAZ21haWwuY29tIiwibmJmIjoxNzI5MDYxOTIyLCJzdWIiOiIwMTkyMmUxYS1kNWVhLTcxYzktYmQzZS02MTZkMjM3ODBmOTMifQ.H-GLmXCT-o7RxXrjo5Of0K8Nw5mpOOw6jgoXnd5KUxo\"\n        },\n        \"ResponseType\": \"client.store.set\"\n    },\n    {\n        \"Attributes\": {\n            \"key\": \"token\",\n            \"value\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFydHBhckBnbWFpbC5jb20iLCJleHAiOjE3MjkzMjExMjIsImlhdCI6MTcyOTA2MTkyMiwiaXNzIjoiZGFwdGluLTAxOTIyOCIsImp0aSI6IjAxOTI5NDFmLTI2MGUtN2I0Ni1hMWFlLWYxMGZhZTcwMDE3OSIsIm5hbWUiOiJhcnRwYXJAZ21haWwuY29tIiwibmJmIjoxNzI5MDYxOTIyLCJzdWIiOiIwMTkyMmUxYS1kNWVhLTcxYzktYmQzZS02MTZkMjM3ODBmOTMifQ.H-GLmXCT-o7RxXrjo5Of0K8Nw5mpOOw6jgoXnd5KUxo; SameSite=Strict\"\n        },\n        \"ResponseType\": \"client.cookie.set\"\n    },\n    {\n        \"Attributes\": {\n            \"message\": \"Logged in\",\n            \"title\": \"Success\",\n            \"type\": \"success\"\n        },\n        \"ResponseType\": \"client.notify\"\n    },\n    {\n        \"Attributes\": {\n            \"delay\": 2000,\n            \"location\": \"/\",\n            \"window\": \"self\"\n        },\n        \"ResponseType\": \"client.redirect\"\n    }\n]\n\n```\n\nWe will use\n\n```bash\nexport TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFydHBhckBnbWFpbC5jb20iLCJleHAiOjE3MjkzMjExMjIsImlhdCI6MTcyOTA2MTkyMiwiaXNzIjoiZGFwdGluLTAxOTIyOCIsImp0aSI6IjAxOTI5NDFmLTI2MGUtN2I0Ni1hMWFlLWYxMGZhZTcwMDE3OSIsIm5hbWUiOiJhcnRwYXJAZ21haWwuY29tIiwibmJmIjoxNzI5MDYxOTIyLCJzdWIiOiIwMTkyMmUxYS1kNWVhLTcxYzktYmQzZS02MTZkMjM3ODBmOTMifQ.H-GLmXCT-o7RxXrjo5Of0K8Nw5mpOOw6jgoXnd5KUxo \n```\n\nfor the rest of the api calls. This is a JWT token with following data\n\n```json\n{\n  \"email\": \"artpar@gmail.com\",                    // user email\n  \"exp\": 1729321122,                              // token expiry\n  \"iat\": 1729061922,                              // token issued at time\n  \"iss\": \"daptin-019228\",                         // token issuer (your daptin instance)\n  \"jti\": \"0192941f-260e-7b46-a1ae-f10fae700179\",  // unique identifier for this token\n  \"name\": \"artpar@gmail.com\",                     // user name\n  \"nbf\": 1729061922,                              // token valid not before timestamp\n  \"sub\": \"01922e1a-d5ea-71c9-bd3e-616d23780f93\"   // user reference id\n}\n```\n\n\n---\n\nSo you have an account and a token to authenticate as that account. But do you need it? No. \nCall to fetch all user accounts works without any authorization\n\n```bash\ncurl http://localhost:6333/api/user_account\n```\n\n```json\n{\n  \"links\": {\n    \"current_page\": 1,\n    \"from\": 0,\n    \"last_page\": 1,\n    \"per_page\": 10,\n    \"to\": 10,\n    \"total\": 1\n  },\n  \"data\": [\n    {\n      \"type\": \"user_account\",\n      \"id\": \"01929429-3d8f-7e53-8f15-a663e05fb01b\",\n      \"attributes\": {\n        \"__type\": \"user_account\",\n        \"confirmed\": 0,\n        \"created_at\": \"2024-10-16T07:09:43.86360642Z\",\n        \"email\": \"artpar1@gmail.com\",\n        \"name\": \"artpar1@gmail.com\",\n        \"password\": \"\",\n        \"permission\": 2097151,\n        \"reference_id\": \"01929429-3d8f-7e53-8f15-a663e05fb01b\",\n        \"updated_at\": \"2024-10-16T07:09:43.863622045Z\",\n        \"user_account_id\": \"01929429-3d8f-7e53-8f15-a663e05fb01b\"\n      },\n      \"relationships\": { /// ...}\n    }\n  ]\n}\n```\n\nAnd so does all the data in all other tables (eg site, cloud_store, document, usergroup). \nAnd you can call update and delete APIs as well \n(not demonstrated here, but you can try, delete the sqlite database file after you are done playing to reset it all)\n\n\nAs the first user, it is an option for you to leave it open or enable the multi-tier permission and becoming the Administrator\n\n```bash\ncurl 'http://localhost:6336/action/world/become_an_administrator' --compressed -X POST \\\n-H \"Authorization:  Bearer $TOKEN\" --data-raw '{}'\n```\n\nAt this point, all other apis are locked-down and only accessible by administrator, that is you. \nYou want to open up few or many of actions to guests or users.\n\n\n... Will be updated soon\n\n## Overview\n\n\n- [Database backed](https://daptin.github.io/daptin/setting-up/installation/#database-configuration) persistence, 3NF normalized tables\n- [JSON API](https://daptin.github.io/daptin/apis/overview/)/[GraphQL](https://daptin.github.io/daptin/features/enable-graphql/) for CRUD apis\n- [User](https://daptin.github.io/daptin/setting-up/access/) and [group management](https://daptin.github.io/daptin/setting-up/access/) and access control\n- Social login with [OAuth](https://daptin.github.io/daptin/extend/oauth_connection/): tested with google, github, linkedin\n- [Actions](https://daptin.github.io/daptin/actions/actions/) for abstracting out business flows\n- Extensive [state tracking APIs](https://daptin.github.io/daptin/state/machines/)\n- Enable [Data Auditing](https://daptin.github.io/daptin/features/enable-data-auditing/) from a single toggle\n- [Synchronous Data Exchange](https://daptin.github.io/daptin/extend/data_exchange/) with 3rd party APIs\n- [Multilingual tables](https://daptin.github.io/daptin/features/enable-multilingual-table/) support, supports Accept-Language header \n- [Cloud storage sync](https://daptin.github.io/daptin/cloudstore/cloudstore/) like gdrive, dropbox, b2, s3 and more\n- [Asset column](https://daptin.github.io/daptin/cloudstore/assetcolumns/) to hold file and blob data, backed by storage\n- [Multiple websites](https://daptin.github.io/daptin/subsite/subsite/) under separate sub-domain/sub-paths\n- [Connect with external APIs](https://daptin.github.io/daptin/integrations/overview/) by using extension points\n- [Data View Streams](https://daptin.github.io/daptin/streams/streams/)\n- Flexible [data import](https://daptin.github.io/daptin/setting-up/data_import/) (auto create new tables and automated schema generation)\n    - XLSX \n    - JSON\n    - CSV\n\nJavascript/Typescript Client\n===\n\nhttps://github.com/daptin/daptin-js-client\n\nStarter kit: https://github.com/daptin/vue_typescript_starter_kit\n\n\nDefine Schema\n\n\u003cimg src=\"https://github.com/daptin/daptin/raw/master/images/api.jpg\"\u003e\n\nFind\n\u003cimg src=\"https://github.com/daptin/daptin/raw/master/images/apigetall.png\"\u003e\n\nGet By Id\n\u003cimg src=\"https://github.com/daptin/daptin/raw/master/images/apigetbyid.png\"\u003e\n\nCreate\n\u003cimg src=\"https://github.com/daptin/daptin/raw/master/images/apicreate.png\"\u003e\n\nDelete\n\u003cimg src=\"https://github.com/daptin/daptin/raw/master/images/apidelete.png\"\u003e\n\nDelete relations\n\u003cimg src=\"https://github.com/daptin/daptin/raw/master/images/apideleterelated.png\"\u003e\n\nList relations\n\u003cimg src=\"https://github.com/daptin/daptin/raw/master/images/apifetchrelated.png\"\u003e\n\n\n\n* Versioning of the data\n* Authentication and authorization\n* JSON API endpoint\n* GraphQL endpoint\n* Actions and integrations with external services\n\n\nGet Started\n---\n\n* [Native binary](https://daptin.github.io/daptin/setting-up/installation/#native-binary)\n* [Heroku](https://daptin.github.io/daptin/setting-up/installation/#heroku-deployment)\n* [Docker image](https://daptin.github.io/daptin/setting-up/installation/#docker-image)\n* [Kubernetes YAML](https://daptin.github.io/daptin/setting-up/installation/#kubernetes-deployment)\n\n\n### APIs\n\n- CRUD APIs\n    - [Read, search, filter](https://daptin.github.io/daptin/apis/read)\n    - [Create](https://daptin.github.io/daptin/apis/create)\n    - [Update](https://daptin.github.io/daptin/apis/update)\n    - [Delete](https://daptin.github.io/daptin/apis/delete)\n    - [Relations](https://daptin.github.io/daptin/apis/relation)\n    - [Execute](https://daptin.github.io/daptin/apis/execute)\n- Action APIs\n    - [Using actions](https://daptin.github.io/daptin/actions/actions)\n    - [Actions list](https://daptin.github.io/daptin/actions/default_actions)\n- User APIs\n    - [User registration/signup](https://daptin.github.io/daptin/actions/signup)\n    - [User login/signin](https://daptin.github.io/daptin/actions/signin)\n- State tracking APIs\n    - [State machines](https://daptin.github.io/daptin/state/machines)\n\n### Users\n\n- [Guests](https://daptin.github.io/daptin/setting-up/access/#guests)\n- [Adding users](https://daptin.github.io/daptin/setting-up/access/#signup-api)\n- [User groups](https://daptin.github.io/daptin/setting-up/access/#user-groups)\n- [Data access permission](https://daptin.github.io/daptin/setting-up/access/#authorization)\n- [Social login](https://daptin.github.io/daptin/setting-up/access/#social-login)\n\n\n### Asset and file storage\n\n- [Cloud storage](https://daptin.github.io/daptin/cloudstore/cloudstore)\n\n### Sub-sites\n\n- [Create a subsite](https://daptin.github.io/daptin/subsite/subsite)\n\n\n## Client library\n\n|                                                                                |                                                                        |                                                                                |\n| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------ |\n| [Ruby](http://jsonapi.org/implementations/#client-libraries-ruby)              | [Python](http://jsonapi.org/implementations/#client-libraries-python)  | [Javascript](http://jsonapi.org/implementations/#client-libraries-javascript)  |\n| [Typescript](http://jsonapi.org/implementations/#client-libraries-typescript)  | [PHP](http://jsonapi.org/implementations/#client-libraries-php)        | [Dart](http://jsonapi.org/implementations/#client-libraries-dart)              |\n| [.NET](http://jsonapi.org/implementations/#client-libraries-net)               | [Java](http://jsonapi.org/implementations/#client-libraries-java)      | [iOS](http://jsonapi.org/implementations/#client-libraries-ios)                |\n| [Elixir](http://jsonapi.org/implementations/#client-libraries-elixir)          | [R](http://jsonapi.org/implementations/#client-libraries-r)             | [Perl](http://jsonapi.org/implementations/#client-libraries-perl)               |\n\n## API spec RAML\n\nOpenAPI V3 spec is auto generated for each endpoint exposed. This can be use to generate further documentation and clients.\n\n![YAML API documentation](docs_markdown/docs/images/api-documentation.png)\n\n```curl http://localhost/apispec.yaml```\n\n\n## Road Map\n\n\n* [x] Normalised Db Design from JSON schema upload\n* [x] Json Api, with CRUD and Relationships\n* [x] OAuth Authentication, inbuilt jwt token generator (setups up secret itself)\n* [x] Authorization based on a slightly modified linux FS permission model\n* [x] Objects and action chains\n* [x] State tracking using state machine\n* [x] Data connectors -\u003e Incoming/Outgoing data\n* [x] Plugin system -\u003e Grow the system according to your needs\n* [x] Native support for different data types (geo location/time/colors/measurements)\n* [x] Configurable intelligent Validation for data in the APIs\n* [x] Pages/Sub-sites -\u003e Create a sub-site for a target audience\n* [x] Define events all around the system\n* [x] Data conversion/exchange/transformations\n* [x] Live editor for subsites - grapesjs\n* [x] Store connectors for storing big files/subsites - rclone\n* [x] Market place to allow plugins/extensions to be installed\n* [x] Online entity designer\n* [x] Excel to entity identification\n* [x] CSV to entity identification\n\n![Alt](https://repobeats.axiom.co/api/embed/f833f4480ea5c9966619d330b90e49f882831f03.svg \"Repobeats analytics image\")\n","funding_links":[],"categories":["Go","graphql","headless-cms"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaptin%2Fdaptin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaptin%2Fdaptin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaptin%2Fdaptin/lists"}