Giter Club home page Giter Club logo

backend-ico-dashboard-old's Introduction

Jincor ICO Dashboard Backend

This is backend module of Jincor ICO dashboard: https://contribute.jincor.com.

It was implemented to provide following functionality:

  1. ICO investors sign up.
  2. Generation of Ethereum address upon user activation.
  3. KYC verification using Jumio Netverify service (https://www.jumio.com/trusted-identity/netverify).
  4. Token purchase.
  5. Displaying Investor's transaction history.
  6. All important actions are protected with 2FA (email or google authenticator) by integration with Jincor Backend Verify service (https://github.com/JincorTech/backend-verify)
  7. For more info check API docs: https://jincortech.github.io/backend-ico-dashboard

Technology stack

  1. Typescript, Express, InversifyJS (DI), TypeORM (MongoDB interaction).
  2. Web3JS - interaction with Ethereum client. ICO backend supports any JSON-RPC compliant client.
  3. Mocha/chai - unit/functional tests.
  4. Docker.

How to start development and run tests?

  1. Clone this repo.
  2. Run docker-compose build --no-cache.
  3. Run docker-compose up -d.
  4. Run cp .env.test .env.
  5. To install dependencies run docker-compose exec ico npm i.
  6. Run tests docker-compose exec ico npm test.

How to generate docs?

  1. Install aglio npm install -g aglio.
  2. Run mkdir /usr/local/lib/node_modules/aglio/node_modules/aglio-theme-olio/cache.
  3. Generate aglio --theme-variables cyborg --theme-template triple -i apiary.apib -o ./docs/index.html.

How to launch the project?

Getting Started

  1. Clone the repo.
  2. Write the necessary environment variables in .env. For a basis it is possible to take .env.stage or .env.prod.
  3. Build services docker-compose build -no-cache
  4. Run the services docker-compose up -d

Note: The auth and verify services should be accessible from the outside. More in detail with the configuration of these services can be found in their readme.

Building the Application

  1. Install dependencies and build the project docker-compose exec ico npm i && docker-compose exec ico npm run build
  2. Generate a token for a tenant:
curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data-binary "{
    \"email\": \"[email protected]\",
    \"password\": \"Password1\"
}" \
'http://auth:3000/tenant'
curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data-binary "{
    \"email\": \"[email protected]\",
    \"password\": \"Password1\"
}" \
'http://auth:3000/tenant/login'

Note: If you start it in ico service, you must install curl. This can be done with the apk add curl command.

  1. Specify the received token in .env AUTH_JWT.
  2. Copy the certificates to the dist/certs directory.
  3. Rename or delete the src directory.

Note: If the test environment is deployed and .env.test is used, files from src will be used.

  1. Run ico service:

npm run serve

Note: If the dev environment, will run npm run start command.

backend-ico-dashboard-old's People

Contributors

aleserche avatar artemii235 avatar hlogeon avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.