Code Monkey home page Code Monkey logo

dhp-verify-admin-api's Introduction

Digital Healthpass Verifier AdminAPI service

Introduction

This service provides an api for Verifier onboarding and verifier's user DHP credential management.

The Verifiers are onboarded as a Customer with multiple sub Organizations. The users within customer organization are isssued Verifiable Credentials (VC) for login to DHP Verification mobile app. These VC can be managed via admin portal and this service supports the backend API.

Development Setup

General Environment Variables

The following environment variables must be set before starting the application regardless of the deployment environment.

Environment Variable Value
AUTH_STRATEGY DEVELOPMENT or PROD
PORT Server port, default 3000
USE_HTTPS true or false. If true, then endpoints must be accessed via https, otherwise http
TLS_FOLDER_PATH Default ./config/tls , Path to tls certs for https enabling

The rest of app configuration is set in config file config/app/config.json.

Environment Variables for IBM Cloud deployment

The following environment variables must be set to execute the service in IBM Cloud

Environment Variable Value
POSTGRES_HOST PgSQL server host
POSTGRES_USER PgSQL user
POSTGRES_USERPWD PgSQL user password
POSTGRES_DB_NAME PgSQL database name
POSTGRES_PORT PgSQL server port
POSTGRES_SSLMODE PgSQL ssl mode, e.g. prefer
POSTGRES_CACERT Server CA cert, with newline escaped, for e.g. "-----BEGIN CERTIFICATE-----\nMIID....nRmk\n-----END CERTIFICATE-----"
APP_ID_URL The App ID URL found in IBM Cloud service credentials oauthServerUrl value
APP_ID_TENANT_ID The App ID URL found in IBM Cloud service credentials tenantId value
APP_ID_AUTH_SERVER_HOST The App ID appidServiceEndpoint value, for e.g. https://us-east.appid.cloud.ibm.com
APP_ID_CLIENT_ID App ID instance ClientID
APP_ID_SECRET App ID instance secret
APP_ID_IAM_KEY IAM Key for App ID

Build and Run

npm install
npm run start

Local Postgres setup

  • Start pg in docker
docker pull postgres:12
docker run --name dev-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres:12

# CREATE db 
docker exec dev-postgres psql -U postgres -c"CREATE DATABASE verifier_admin" postgres

Library Licenses

This section lists license details of libraries / dependencies.

Name License type Link
axios MIT git+https://github.com/axios/axios.git
bcryptjs MIT git+https://github.com/dcodeIO/bcrypt.js.git
body-parser MIT git+https://github.com/expressjs/body-parser.git
cors MIT git+https://github.com/expressjs/cors.git
crypto ISC git+https://github.com/npm/deprecate-holder.git
dotenv BSD-2-Clause git://github.com/motdotla/dotenv.git
express MIT git+https://github.com/expressjs/express.git
express-validator MIT git://github.com/express-validator/express-validator.git
generate-password MIT git+https://github.com/brendanashworth/generate-password.git
helmet MIT git://github.com/helmetjs/helmet.git
ibmcloud-appid Apache-2.0 git+https://github.com/ibm-cloud-security/appid-serversdk-nodejs.git
jsonschema MIT git://github.com/tdegrunt/jsonschema.git
jsonwebtoken MIT git+https://github.com/auth0/node-jsonwebtoken.git
log4js Apache-2.0 git+https://github.com/log4js-node/log4js-node.git
moment MIT git+https://github.com/moment/moment.git
morgan MIT git+https://github.com/expressjs/morgan.git
newrelic Apache-2.0 git+https://github.com/newrelic/node-newrelic.git
passport MIT git://github.com/jaredhanson/passport.git
pg MIT git://github.com/brianc/node-postgres.git
qrcode MIT git://github.com/soldair/node-qrcode.git
querystring MIT git://github.com/Gozala/querystring.git
retry-axios Apache-2.0 git+https://github.com/JustinBeckwith/retry-axios.git
sequelize MIT git+https://github.com/sequelize/sequelize.git
swagger-ui-express MIT git+ssh://[email protected]/scottie1984/swagger-ui-express.git
uuid MIT git+https://github.com/uuidjs/uuid.git
babel-eslint MIT git+https://github.com/babel/babel-eslint.git
chai MIT git+https://github.com/chaijs/chai.git
chai-http MIT git+ssh://[email protected]/chaijs/chai-http.git
eslint MIT git+https://github.com/eslint/eslint.git
eslint-config-airbnb MIT git+https://github.com/airbnb/javascript.git
eslint-config-airbnb-base MIT git+https://github.com/airbnb/javascript.git
eslint-config-node ISC git+https://github.com/kunalgolani/eslint-config.git
eslint-config-prettier MIT git+https://github.com/prettier/eslint-config-prettier.git
eslint-plugin-chai-friendly MIT git+https://github.com/ihordiachenko/eslint-plugin-chai-friendly.git
eslint-plugin-import MIT git+https://github.com/import-js/eslint-plugin-import.git
eslint-plugin-jsx-a11y MIT git+https://github.com/jsx-eslint/eslint-plugin-jsx-a11y.git
eslint-plugin-node MIT git+https://github.com/mysticatea/eslint-plugin-node.git
eslint-plugin-prettier MIT git+https://github.com/prettier/eslint-plugin-prettier.git
eslint-plugin-react MIT git+https://github.com/jsx-eslint/eslint-plugin-react.git
eslint-plugin-react-hooks MIT git+https://github.com/facebook/react.git
husky MIT git+https://github.com/typicode/husky.git
mocha MIT git+https://github.com/mochajs/mocha.git
moxios MIT git+https://github.com/mzabriskie/moxios.git
node-mocks-http MIT git://github.com/howardabrams/node-mocks-http.git
nodemon MIT git+https://github.com/remy/nodemon.git
nyc ISC git+ssh://[email protected]/istanbuljs/nyc.git
prettier MIT git+https://github.com/prettier/prettier.git
rewire MIT git://github.com/jhnns/rewire.git
sinon BSD-3-Clause git+ssh://[email protected]/sinonjs/sinon.git
sqlite3 BSD-3-Clause git+https://github.com/TryGhost/node-sqlite3.git

dhp-verify-admin-api's People

Contributors

opendhp avatar

Watchers

Sijo Cherian avatar Bonnie Ishiguro avatar Pravesh Patel avatar Alan O'Neill avatar

Forkers

nearform

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.