GithubHelp home page GithubHelp logo

smart-on-fhir / smart-launcher Goto Github PK

View Code? Open in Web Editor NEW
36.0 8.0 35.0 14.82 MB

Launcher for SMART apps

License: Other

JavaScript 57.66% HTML 34.52% CSS 2.57% TypeScript 4.96% Dockerfile 0.30%

smart-launcher's Introduction

SMART/FHIR proxy server and app launcher

Launcher for SMART apps

Installation

Make sure you have Git and NodeJS 16 or higher, and then run:

git clone https://github.com/smart-on-fhir/smart-launcher.git
cd smart-launcher
npm i

Usage

You can use existing NPM scripts from within the project folder for common tasks:

Start the server

npm start

Note that this will fail until you create a .env file with some required settings. Minimal example (only the required settings):

FHIR_SERVER_R2="https://r2.smarthealthit.org"
FHIR_SERVER_R3="https://r3.smarthealthit.org"
FHIR_SERVER_R4="https://r4.smarthealthit.org"
PICKER_CONFIG_R2="r2"
PICKER_CONFIG_R3="r3"
PICKER_CONFIG_R4="r4"

Test

To run the tests execute

npm test

# or this to also generate a coverage report
npm run test:cover

Develop

If you want to modify something run

npm run dev

This will watch for changes and restart the server automatically. It will also run the tests on every change.

OIDC Keys generation

To generate new private and public keys make sure you have openssl (comes pre-installed on Mac), cd to the project root and execute:

npm run cert

Then re-start the server and it will use the new keys.

Notes about jwt.io

People often use https://jwt.io/ to generate and validate tokens. However, it seems that the RS256 signature verification feature expects you to paste x.509 formatted public key or certificate and does not work with PEM-encoded PKCS#1 public keys. For that reason, if you want to manually verify your token at https://jwt.io/, you will need to provide the original x.509 version of the public key that you can find at the /public_key endpoint of the server.

Using Docker

docker run -t -p 9009:80 smartonfhir/smart-launcher:latest

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.