npm package: @powrhub/mms
Description: Application for marketplace management system
Author: heartyoh
Latest version: 4.4.3

## Operato MMS

- Operato : Solution family brand of hatiolab.com(http://www.hatiolab.com)
- MMS : Marketplace Management Service

## prerequisites

- nodejs version 12

## how to make & publish docker image

- release new version with updated source, and publish to npm

```
$ git pull    # should sync with github before start
$ yarn install && yarn build
$ yarn release
  ? Select a new version (currently 3.0.0-beta.30) Custom Prerelease
  ? Enter a prerelease identifier (default: "beta", yielding 3.0.0-beta.31) # just enter
  ? Are you sure you want to publish these packages? (ynH) # enter 'y'
```

- make docker image

```
$ yarn workspace @powrhub/mms-app run build:client # should build client before making docker-image
$ yarn workspace @powrhub/mms-app run docker
```

- publish to docker-hub

```
$ docker login # login into docker-hub with hatiolab user with password (required only once)
$ docker push hatiolab/mms-app:latest
```

## install from docker

- mms-app installation

  - create a folder for the application and change directory to your folder.
  - the script will download a& install mms-app

    ```
    # install script for mms-app
    curl -fsSL https://raw.githubusercontent.com/things-factory/things-factory/master/packages/mms-app/installer/install.sh | bash -s
    ```

  - run 'start.sh' to start mms-app and 'stop.sh' to stop the running applicaton.
  - on initial start, run 'migrate.sh' first to migrate database.

  ```
  # data migration
  $ ./start.sh
  $ ./migrate.sh
  $ ./stop.sh

  # restart
  $ ./start.sh
  ```

- mms-app upgrade

```
# upgrade
$ ./stop.sh
$ ./upgrade.sh

# restart
$ ./start.sh
```

# process

[MMS Process](https://app.diagrams.net/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&page-id=eIJGDO9ujmShpJ2Mohh7&title=mms-app#R%3Cmxfile%3E%3Cdiagram%20id%3D%22jwlfmBB4tNtaeqab1DEU%22%20name%3D%22Integration%22%3E7Vpdd5s4EP01fvQ5IAyOHxPbSdMm62y93uxbj2pkoBHIK%2BSv%2FvodYckEo8Rua0NJ9sWG0Qg0d66uNEDL6cfrG47n4T3zCW0hy1%2B3nEELIdvtduFPWjbKYmlLwCNf2XLDOPpOtKOyLiKfpAVHwRgV0bxonLIkIVNRs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