Free & open-source dashboard for your next ICO, crowdsale or tokensale
Clone or download
hlogeon [ Closes #189 ] Remove networking settings for docker-compose (#190)
* [ Closes #189 ] Remove networking settings for docker-compose, add  * to whitelist instead of static IP's
Latest commit 827c110 Oct 24, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contracts/default Closes #137. Moved ABI of smart-contracts into separated json files. May 18, 2018
docs Closes #159. Renaming. May 25, 2018
scripts Closes #124. Changed settings of travis. (#125) May 14, 2018
src Updated changing password Aug 20, 2018
storage/mongodb Closes #1. Add typeorm integration. Oct 26, 2017
test Closes #168. Added setting for the recreate new KYC session. May 28, 2018
.dockerignore Closes #71 #73 (#74) Dec 27, 2017
.env.stage Closes #172. The phone number is an optional property. (#173) May 31, 2018
.env.test Closes #172. The phone number is an optional property. (#173) May 31, 2018
.gitignore Closes #137. Sort content of .env* files. May 17, 2018
.npmrc Closes #1. First commit. Oct 11, 2017
.nycrc Closes #126. Added dob field. May 12, 2018
.travis.yml Add ability for image to read env from a file by _FILE suffix #175 (#176 Jul 3, 2018
Dockerfile [ Closes #189 ] Remove networking settings for docker-compose (#190) Oct 24, 2018
Dockerfile.prod Add ability for image to read env from a file by _FILE suffix #175 (#176 Jul 3, 2018
Jenkinsfile Closes #1. First commit. Oct 11, 2017
LICENSE Closes #159. Renaming. May 25, 2018
Logo.png Closes #1. First commit. Oct 11, 2017
README.md Closes #159. Renaming. May 25, 2018
apiary.apib Closes #159. Renaming. May 25, 2018
custom-entrypoint.sh Add ability for image to read env from a file by _FILE suffix #175 (#176 Jul 3, 2018
docker-compose.prod.yml Closes #71 #73 (#74) Dec 27, 2017
docker-compose.stage.yml Closes #71 #73 (#74) Dec 27, 2017
docker-compose.yml [ Closes #189 ] Remove networking settings for docker-compose (#190) Oct 24, 2018
package.json Fixed yarn test script Jun 22, 2018
rpc.dev.Dockerfile Closes #71 #73 (#74) Dec 27, 2017
rpc.mainnet.Dockerfile Closes #71 #73 (#74) Dec 27, 2017
rpc.ropsten.Dockerfile Closes #71 #73 (#74) Dec 27, 2017
tsconfig.build.json Closes #1. Add typeorm integration. Oct 26, 2017
tsconfig.json Closes #1. Add typeorm integration. Oct 26, 2017
tslint.json Closes #1. First commit. Oct 11, 2017
yarn.lock Fixed all errors format Jun 22, 2018

README.md

secret_tech ICO Dashboard Backend

This is backend module of secret_tech ICO dashboard: https://demo.icodashboard.space.

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) and Sufti Pro service (https://shuftipro.com).
  4. Token purchase.
  5. Displaying Investor's transaction history.
  6. All important actions are protected with 2FA (email or google authenticator) by integration with secret_tech Backend Verify service (https://github.com/JincorTech/backend-verify)
  7. For more info check API docs: https://secret-tech.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 yarn.
  6. Run tests docker-compose exec ico yarn 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\": \"test@test.com\",
    \"password\": \"Password1\"
}" \
'http://auth:3000/tenant'
curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data-binary "{
    \"email\": \"test@test.com\",
    \"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.

Email

How to configure email notifications