This repository includes a sample application that demonstrates how to use the Blueprint Partner API v2 to integrate Blueprint into your application.
- Clone the repository.
- Make sure you have
nodeandnpminstalled. This sample application has been built and tested with Node.js v22. - Run
npm installto install the dependencies. - Configure your environment settings in a new
.env-cmdrc.jsonfile based on the sample with your Blueprint Partner API v2 credentials:cp .env-cmdrc.json.sample .env-cmdrc.json - Set up the environment-specific configuration (see Environment Configuration below).
- Run
npm run start:stagingto start the application using the Blueprint Partner API v2 sandbox environment (or see "Running the Application" section below to see setups for local/staging/prod).
Local Environment (default):
npm run start- Uses
localenvironment configuration - Loads patient data from
data/patients.local.json - Runs on port 3333
Staging Environment:
npm run start:staging- Uses
stagingenvironment configuration - Loads patient data from
data/patients.staging.json - Runs on port 3333
Production Environment:
npm run start:production- Uses
productionenvironment configuration - Loads patient data from
data/patients.production.json - Runs on port 3333
Once running, access the application at: http://localhost:3333
The application will redirect you to the login page where you can authenticate with the configured clinician credentials.
The application uses environment-specific configurations stored in .env-cmdrc.json:
local- Local development environmentstaging- Blueprint Partner API v2 sandbox environmentproduction- Blueprint Partner API v2 production environment
Each environment loads patient data from corresponding JSON files in the data directory:
data/patients.local.jsondata/patients.staging.jsondata/patients.production.json
You can update these files with patients that match the clients in the Blueprint clinic that you are connecting your partner application to.
This sample application demonstrates typical integration scenarios:
- Host the embedded UI in your application and let Blueprint take care of the rest ("drop-in UI Only").
- Host the embedded UI in your application customize how the UI integrates with your application front end ("UI Only").
- Host the embedded UI in your application and deepen the integration by using the API ("UI + API").
- Build your own UI and completely customize the integration via the API ("API Only").
Review Blueprint Partner API v2 documentation at https://developer.blueprint.ai for more information and API reference.