!Mars Man Models Logo
Description
Data Model / Form / Repository Pattern
Table of Contents
1.
Design Overview2.
Installation3.
API Documentation3.
ExamplesDevelopment
System Requirements
- Dependencies:
- node: >14.15
- npm: >6.14
Commands
``
bash
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 buildpublish
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