Serves offers for the kin ecosystem client SDK
Clone or download
Latest commit 8d3f8cc Dec 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Eco 289 backoffice (#126) Jul 31, 2018
data Create script overhaul (#218) Dec 11, 2018
examples add smpl keyid:1 secret key Jun 19, 2018
jwt return the rs512 keys for testing - this needs to be removed some oth… Aug 29, 2018
operational run create-jwt-keys before building the docker image (#181) Oct 10, 2018
scripts remove expiration Dec 17, 2018
statics update offer mock html Feb 28, 2018
tests checked the exp and iat props of the jwt (#204) Dec 12, 2018
.dockerignore Doody/docker (#97) May 14, 2018
.github rename create script and add option to only update offer's meta image ( Dec 13, 2018
.gitignore p2p support (#156) Aug 29, 2018
.travis.yml Create script overhaul (#218) Dec 11, 2018
Dockerfile upgrade node in docker image Dec 10, 2018
Makefile rename create script and add option to only update offer's meta image ( Dec 13, 2018
README.md Fix report wallet address update event (#213) Nov 26, 2018
code_style_scheme.xml add tests to show that offerId filter works (#219) Dec 9, 2018
docker-compose.deps.yaml update payment-service Dec 13, 2018
docker-compose.tests.yaml rename create script and add option to only update offer's meta image ( Dec 13, 2018
docker-compose.yaml use new payment-service watchers (#212) Nov 22, 2018
node-console.js Create script overhaul (#218) Dec 11, 2018
package-lock.json Create script overhaul (#218) Dec 11, 2018
package.json rename create script and add option to only update offer's meta image ( Dec 13, 2018

README.md

Kin ecosystem Marketplace server

Disclaimer

Any data that appears in the repo does not reflect real partnerships or product integrations. We use real company names and products for the sole sake of mocking data to populate our SDK client.

Install/Run

Clone this repo, and then in a terminal:

marketplace-server> npm i
marketplace-server> npm run restart

Development

Please make sure that you follow the code conventions which are described/enforced by the IDE and tslint.
In any jetbrains based IDE (webstorm, pycharm, intellij, etc):

  • Code style

    1. Go to the Preferences > Editor > Code Style
    2. Click the small gears icon besides the Scheme drop down box
    3. Import Scheme > IntelliJ IDEA code style XML
    4. Select the code_style_scheme.xml file in the root of this project.
  • TSLint

    1. Go to Preferences > Languages & Frameworks > TypeScript > TSLint
    2. Check the Enable box
    3. Make sure that the Search for tslint.json options is selected under Configuration file.

Testing

First compile the source:

make build

then create the DB:

make db

Then run the tests:

make test

Running in Docker

To run and test using docker follow the instructions bellow:

Setup

Download docker + docker-compose for your environment.

If you DON'T have a wallet with XLM and KIN: Run the following command to generate a secrets/.secrets file with a pre-funded wallet:

make generate-funding-address

Note that this command will overwrite any existing file secrets/.secrets.

If you have a wallet with XLM and KIN: You need to have a stellar account with funds and create a secrets/.secrets file locally with the following content:

export STELLAR_BASE_SEED=SXXX
export STELLAR_ADDRESS=GXXX
Create JWT encryption keys
make create-jwt-keys:

will create the dir jwt/ with random encryption keys. You can add other keys if you'd like. the keys in the public_keys dir will be exported via /v1/config call.

Run docker servers and system tests

Run the following command:

make up  # start all services

And in a separate shell:

make test-system-docker  # run tests

To stop the services

make down

Run with mounted code for development

You will need to install the dependencies and build the code locally using:

make install build

Then when you want to run your local version, instead of make up, run:

make up-dev