Data Model / Form / Repository Pattern
- Dependencies:
- node: >14.15
- npm: >6.14
# installation
npm i
# tests
# run full test suite
`jest`
# run specific test suite
`jest forms.test.ts`
# run specific test
`jest model.test.ts -t "async true"`
# build
npm run build
# publish
npm publish
The goal of the form is
- to use the same DTO object the server expects to validate the input
- this requires formatting the data to/from frontend and backend data structure
- to abstract
Repos are the data sources, implemented with the repository pattern.
They can effectively be any data source (GraphQL, Firestore, Clod Storage...) but as of right now only APIRepo is implemented
Models orchestrate the forms and repos