https://github.com/clevertech/datamodel
CLI tool that creates cross-platform typed APIs
https://github.com/clevertech/datamodel
Last synced: 24 days ago
JSON representation
CLI tool that creates cross-platform typed APIs
- Host: GitHub
- URL: https://github.com/clevertech/datamodel
- Owner: clevertech
- License: mit
- Created: 2018-01-08T16:44:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-08T17:08:51.000Z (over 8 years ago)
- Last Synced: 2025-03-06T06:48:22.195Z (over 1 year ago)
- Language: TypeScript
- Size: 64.5 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Datamodel
**This is an experiment which is work in progress**.
This is a datamodel definition tool that at this moment generates:
- TypeScript code for defining your data model
- Joi validations that validate user input and any defined entity
- REST interface with input already validated and type checking for the output
- Database migrations (knex)
- Swift code (still in the early stages)
Generating frontend code (redux and redux sagas) is on the works.
# Benefits
Having in sync the data model across all your apps (backend, frontend, mobile,...). Not having to worry about validations, not having to write migrations by hand, frontend networking layer already implemented and type-safe.
# Running
`yarn run build`
```
cd your-project
node path-to-datamodel-working-copy/compiled/datamodel.js
```