{"id":13606014,"url":"https://github.com/ditojs/dito","last_synced_at":"2026-01-12T02:27:24.762Z","repository":{"id":33116606,"uuid":"136497604","full_name":"ditojs/dito","owner":"ditojs","description":" Dito.js is a declarative and modern web framework with a focus on API driven development, based on Objection.js, Koa.js and Vue.js – Developed at Lineto by Jürg Lehni and made available by Lineto in 2018 under the MIT license","archived":false,"fork":false,"pushed_at":"2024-04-27T07:40:10.000Z","size":1141724,"stargazers_count":80,"open_issues_count":6,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-27T17:12:55.962Z","etag":null,"topics":["api","declarative","json","koa","objection","rest","server","sql","vue"],"latest_commit_sha":null,"homepage":"https://lineto.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ditojs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2018-06-07T15:33:26.000Z","updated_at":"2024-06-18T21:15:43.820Z","dependencies_parsed_at":"2024-01-15T18:57:32.442Z","dependency_job_id":"9737a069-64a8-4ec6-b447-6f85b4a3f70d","html_url":"https://github.com/ditojs/dito","commit_stats":{"total_commits":3126,"total_committers":12,"mean_commits":260.5,"dds":0.03710812539987207,"last_synced_commit":"1b5f5121a2e8e6d3741f0bb2b81d38c2343810d6"},"previous_names":[],"tags_count":469,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ditojs%2Fdito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ditojs%2Fdito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ditojs%2Fdito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ditojs%2Fdito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ditojs","download_url":"https://codeload.github.com/ditojs/dito/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248539744,"owners_count":21121226,"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":["api","declarative","json","koa","objection","rest","server","sql","vue"],"created_at":"2024-08-01T19:01:05.212Z","updated_at":"2026-01-12T02:27:24.749Z","avatar_url":"https://github.com/ditojs.png","language":"JavaScript","readme":"# Dito.js\n\nDito.js is a declarative and modern web framework with a focus on API driven\ndevelopment, based on Koa.js, Objection.js and Vue.js\n\nDito.js consists of two main components: **Dito.js Server**, providing all\nclasses and methods to build the server architecture, and **Dito.js Admin**, a\nVue.js library that can be used to build views and forms for administration of\nthe Dito.js models in a very efficient fashion.\n\nBoth components share the key philosophy of the Dito.js framework: The use of\ndeclarative descriptions not only of the data structures themselves (the\nmodels), but also of the way they are remotely interacted with (the\ncontrollers), as well as the way they are edited (the admin views and forms).\n\nThis is then also the reason for the name *Dito.js* itself:\n\n\u003e *Ditto* originally comes from the Latin word *dictus*, \"having been said,\" the\n\u003e past participle of the verb *dīcere*, \"to say.\"\n\u003e https://www.thefreedictionary.com/ditto\n\nDito.js was developed at [Lineto](https://lineto.com/) by [Jürg\nLehni](http://juerglehni.com), and was made available by Lineto in 2018 under\nthe MIT license.\n\n## Structuring a Dito.js Application\n\nUnlike other frameworks, Dito.js is not opinionated about its folder structures\nand file naming, and does not deduce any information from such structures. With\nthe exception of the creation of migration files, there aren't any generators\nthat automatically create files for you.\n\nThere is however a recommended way to structure a Dito.js application, by\ndividing it into the following folder structure:\n\n- `src/server`: This folder contains the admin Dito.js Server app, along with all\n  models and controllers in sub-folders:\n    - `src/server/models`: The place where for the model classes.\n    - `src/server/controllers`: The place for the controller classes.\n- `src/admin`: This folder contains a declarations of all admin views and forms\n- `src/config`: The application configuration files.\n- `migrations`: The folder holding all migration files.\n- `seeds`: The folder holding all seeds files.\n\nThis structure will be explained in more detail in the documentation of each\nthese aspects separately:\n\n- [Configuration](docs/configuration.md)\n- [Application](docs/application.md)\n- [Models](docs/models.md)\n- [Controllers](docs/controllers.md)\n- [Migrations](docs/migrations.md)\n- [Seeds](docs/seeds.md)\n- [Admin](docs/admin.md)\n\n## Setting up `package.json` for a Dito.js Application\n\nDito.js server comes with its own CLI program, but it is rare to call it\ndirectly: Normally you simply set up a set of `package.json` scripts through\nwhich a selection of predefined tasks are executed:\n\n```json\n\"scripts\": {\n  \"console\": \"dito console src/server/app\",\n  \"db:seed\": \"dito db:seed src/server/app\",\n  \"db:create_migration\": \"dito db:create_migration src/server/app\",\n  \"db:migrate\": \"dito db:migrate src/config/index.js\",\n  \"db:rollback\": \"dito db:rollback src/config/index.js\",\n  \"db:reset\": \"dito db:reset src/config/index.js\"\n}\n```\n\nNote that in order to work, each of these scripts require either the path to the\napplication, or the path to the application's configuration, as specified above.\nHere a brief description of each script's purpose:\n\n- `yarn console`: Starts an interactive Read-Eval-Print-Loop console in which\n  all Dito.js models can be directly used.\n- `yarn db:seed`: Seeds the configured database with the data provided in\n  `seeds`. See [Seeds](docs/seeds.md) for more information.\n- `yarn db:create_migration`: Creates migration files for the specified models.\n   See [Migrations](docs/migrations.md) for more information.\n- `yarn db:migrate`: Migrates to the latest state of migrations.\n   See [Migrations](docs/migrations.md) for more information.\n- `yarn db:rollback`: Rolls back the last batch of applied migrations.\n   See [Migrations](docs/migrations.md) for more information.\n- `yarn db:reset`: Resets the database by rolling back all applied migrations,\n   and then reapplying all available migrations.\n   See [Migrations](docs/migrations.md) for more information.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fditojs%2Fdito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fditojs%2Fdito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fditojs%2Fdito/lists"}