Skip to content

mars-manjs/models

Repository files navigation

Mars Man Models Logo

Description

Data Model / Form / Repository Pattern

Table of Contents

  1. Design Overview
  2. Installation
  3. API Documentation
  4. Examples

Development

System Requirements

  • Dependencies:
    • node: >14.15
    • npm: >6.14

Commands

# 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published