GithubHelp home page GithubHelp logo

veriff's Introduction

Description

The project acts like a crypto wallet service with user authentication.

It has different modules separated by business logic.

The kyc module has the veriff integration logic, which is used to verify the age of a user. Based on the age, a user is allowed to login to the platform.

The app has also been deployed to aws apprunner. This is the url: https://tpibaq33xi.eu-west-1.awsapprunner.com/. The routes can be checked using this url in some API client like postman.

This is the flow for testing the api (note that the post request body requirement can be seen by dto and filled accordingly):

  1. POST request to: https://tpibaq33xi.eu-west-1.awsapprunner.com/user
  2. Take the 'verification' item from the previous response or database and use that to verify email with GET request: https://tpibaq33xi.eu-west-1.awsapprunner.com/user/verify-email/:verification
  3. Now your email is verified and you can start kyc process, make POST request to https://tpibaq33xi.eu-west-1.awsapprunner.com/kyc
  4. You will be redirected to veriff for submitting documents and after that you can try to login with POST request: https://tpibaq33xi.eu-west-1.awsapprunner.com/user/login
  5. Depending on verification status you will get login response. If you can successfully login, then you can use the 'accessToken' in the header as Authorization to visit protected routes
  6. Now the protected wallet routes can be checked. Wallet needs to be imported first with POST request: https://tpibaq33xi.eu-west-1.awsapprunner.com/wallet/import
  7. In the end the wallet balance can be checked by GET request: https://tpibaq33xi.eu-west-1.awsapprunner.com/wallet/:userId

The environment variables can be provided on request (but will not be needed to test in this case). Here are the list of environment variables:

  • MONGO_PASSWORD
  • MONGO_USER
  • JWT_SECRET
  • VERIFF_API_PRIVATE_KEY
  • VERIFF_API_PUBLIC_KEY
  • APP_URL

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

veriff's People

Contributors

tajikee avatar

Watchers

 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.