diff --git a/.env b/.env
index a2d1e8c8..e0aed43a 100644
--- a/.env
+++ b/.env
@@ -1,31 +1,31 @@
HTTPS = false
HTTPS_CERT_PATH = server.cert
HTTPS_KEY_PATH = server.key
-REACT_APP_ALT_DRUG = true
-REACT_APP_AUTH = http://localhost:8180/realms
-REACT_APP_CDS_SERVICE = http://localhost:8090/cds-services
-REACT_APP_CLIENT = app-login
-REACT_APP_CLIENT_SCOPES = launch offline_access openid profile user/Patient.read patient/Patient.read user/Practitioner.read
-REACT_APP_DEFAULT_USER = pra1234
-REACT_APP_EHR_BASE = http://localhost:8080/test-ehr/r4
-REACT_APP_EHR_LINK = http://localhost:8080/ehr-server/
-REACT_APP_EHR_SERVER = http://localhost:8080/test-ehr/r4
-REACT_APP_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH = http://localhost:8080/test-ehr/r4
-REACT_APP_GENERATE_JWT = true
-REACT_APP_GH_PAGES=false
-REACT_APP_HOMEPAGE = http://localhost:8080
-REACT_APP_LAUNCH_URL = http://localhost:4040/launch
-REACT_APP_ORDER_SELECT = rems-order-select
-REACT_APP_ORDER_SIGN = rems-order-sign
-REACT_APP_PASSWORD = alice
-REACT_APP_PATIENT_FHIR_QUERY = Patient?_sort=identifier&_count=12
-REACT_APP_PATIENT_VIEW = rems-patient-view
-REACT_APP_PIMS_SERVER = http://localhost:5051/doctorOrders/api/addRx
-REACT_APP_PUBLIC_KEYS = http://localhost:3000/request-generator/.well-known/jwks.json
-REACT_APP_REALM = ClientFhirServer
-REACT_APP_RESPONSE_EXPIRATION_DAYS = 30
-REACT_APP_SERVER = http://localhost:8090
-REACT_APP_SMART_LAUNCH_URL = http://localhost:4040/
-REACT_APP_URL = http://localhost:3000
-REACT_APP_URL_FILTER = http://localhost:3000/*
-REACT_APP_USER = alice
+VITE_ALT_DRUG = true
+VITE_AUTH = http://localhost:8180
+VITE_CDS_SERVICE = http://localhost:8090/cds-services
+VITE_CLIENT = app-login
+VITE_CLIENT_SCOPES = launch offline_access openid profile user/Patient.read patient/Patient.read user/Practitioner.read
+VITE_DEFAULT_USER = pra1234
+VITE_EHR_BASE = http://localhost:8080/test-ehr/r4
+VITE_EHR_LINK = http://localhost:8080/ehr-server/
+VITE_EHR_SERVER = http://localhost:8080/test-ehr/r4
+VITE_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH = http://localhost:8080/test-ehr/r4
+VITE_GENERATE_JWT = true
+VITE_GH_PAGES=false
+VITE_HOMEPAGE = http://localhost:8080
+VITE_LAUNCH_URL = http://localhost:4040/launch
+VITE_ORDER_SELECT = rems-order-select
+VITE_ORDER_SIGN = rems-order-sign
+VITE_PASSWORD = alice
+VITE_PATIENT_FHIR_QUERY = Patient?_sort=identifier&_count=12
+VITE_PATIENT_VIEW = rems-patient-view
+VITE_PIMS_SERVER = http://localhost:5051/doctorOrders/api/addRx
+VITE_PUBLIC_KEYS = http://localhost:3000/request-generator/.well-known/jwks.json
+VITE_REALM = ClientFhirServer
+VITE_RESPONSE_EXPIRATION_DAYS = 30
+VITE_SERVER = http://localhost:8090
+VITE_SMART_LAUNCH_URL = http://localhost:4040/
+VITE_URL = http://localhost:3000
+VITE_URL_FILTER = http://localhost:3000/*
+VITE_USER = alice
diff --git a/Dockerfile b/Dockerfile
index efc4563f..4773a40c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,9 @@
-FROM node:14-alpine
+FROM node:21-alpine
+
WORKDIR /home/node/app/request-generator
COPY --chown=node:node . .
RUN npm install
-COPY --chown=node:node . .
EXPOSE 3000
+COPY --chown=node:node . .
+
CMD npm run start
diff --git a/Dockerfile.dev b/Dockerfile.dev
index 2d637e9b..c6405c95 100644
--- a/Dockerfile.dev
+++ b/Dockerfile.dev
@@ -1,7 +1,6 @@
-FROM node:14-alpine
+FROM node:21-alpine
WORKDIR /home/node/app/request-generator
COPY --chown=node:node . .
RUN npm install
EXPOSE 3000
-EXPOSE 3001
CMD ./dockerRunnerDev.sh
diff --git a/How-To-Launch-SMART-on-FHIR-Apps.md b/How-To-Launch-SMART-on-FHIR-Apps.md
index 02824ec4..0281f554 100644
--- a/How-To-Launch-SMART-on-FHIR-Apps.md
+++ b/How-To-Launch-SMART-on-FHIR-Apps.md
@@ -15,18 +15,18 @@ SMART_ENDPOINT = https://smartlauncher.interop.community/sample-app/launch?clien
Set these environment variables in your `.env.local` to overwrite the default values in the `.env`. You must be added to the REMS sandbox on Meld to log in and authenticate when running request-generator locally.
```.env
-REACT_APP_CLIENT = ed8b940e-4aaa-4209-b17d-69dfe67543b9
-REACT_APP_EHR_BASE = https://gw.interop.community/REMS/data
-REACT_APP_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH = https://gw.interop.community/REMS/data
-REACT_APP_EHR_SERVER = https://gw.interop.community/REMS/data
-REACT_APP_SMART_LAUNCH_URL = https://smartlauncher.interop.community/sample-app/launch?client_id=sampleapp&platform=meld
+VITE_CLIENT = ed8b940e-4aaa-4209-b17d-69dfe67543b9
+VITE_EHR_BASE = https://gw.interop.community/REMS/data
+VITE_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH = https://gw.interop.community/REMS/data
+VITE_EHR_SERVER = https://gw.interop.community/REMS/data
+VITE_SMART_LAUNCH_URL = https://smartlauncher.interop.community/sample-app/launch?client_id=sampleapp&platform=meld
```
### Where to grab the environment variable values if using a Meld Sandbox
-1. `REACT_APP_CLIENT`: This is taken from Apps > Request Generator > Settings > Registered App Details > Client Id. Request Generator refers to the registered mcode/request-generator app in your Meld sandbox.
-2. `REACT_APP_EHR_BASE`, `REACT_APP_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH`, `REACT_APP_EHR_SERVER`: These are taken from your Meld sandbox's sidebar, under Settings > Sandbox > Secured FHIR Server URL.
-3. `REACT_APP_SMART_LAUNCH_URL`, `SMART_ENDPOINT`: This is taken from Apps > Sample App > Settings > Registered App Details > App Launch URI\*.
+1. `VITE_CLIENT`: This is taken from Apps > Request Generator > Settings > Registered App Details > Client Id. Request Generator refers to the registered mcode/request-generator app in your Meld sandbox.
+2. `VITE_EHR_BASE`, `VITE_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH`, `VITE_EHR_SERVER`: These are taken from your Meld sandbox's sidebar, under Settings > Sandbox > Secured FHIR Server URL.
+3. `VITE_SMART_LAUNCH_URL`, `SMART_ENDPOINT`: This is taken from Apps > Sample App > Settings > Registered App Details > App Launch URI\*.
## How to run
@@ -34,7 +34,7 @@ REACT_APP_SMART_LAUNCH_URL = https://smartlauncher.interop.community/sample-app/
2. Start rems-admin normally.
3. In request-generator, click the "Select a Patient" button.
4. Select Jon Snow (id: 130803).
-5. Click the "Launch SMART on FHIR app" button. This opens the SMART on FHIR app launch page provided as values to the `REACT_APP_SMART_LAUNCH_URL` and `SMART_ENDPOINT` environment variables.
+5. Click the "Launch SMART on FHIR app" button. This opens the SMART on FHIR app launch page provided as values to the `VITE_SMART_LAUNCH_URL` and `SMART_ENDPOINT` environment variables.
6. Click the "Authorize" button.
7. You should see the expected SMART on FHIR app launch properly.
8. Go back to request-generator and issue an order-sign hook, and click on the "Patient Enrollment Form" button.
@@ -42,4 +42,4 @@ REACT_APP_SMART_LAUNCH_URL = https://smartlauncher.interop.community/sample-app/
## Running other Registered SMART on FHIR Apps from Meld
-Log in to Meld at https://meld.interop.community/. Go to My Sandboxes > REMS > Apps to try out the other Registered Apps. The example above manually tests (1). You can try the remaining options after (2) just by changing the `REACT_APP_SMART_LAUNCH_URL` and `SMART_ENDPOINT` environment variables.
+Log in to Meld at https://meld.interop.community/. Go to My Sandboxes > REMS > Apps to try out the other Registered Apps. The example above manually tests (1). You can try the remaining options after (2) just by changing the `VITE_SMART_LAUNCH_URL` and `SMART_ENDPOINT` environment variables.
diff --git a/README.md b/README.md
index b7dd2b33..2943f763 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,14 @@ This project provides a small web application that is capable of generating requ
- `npm start`
-This should open a browser window directed to the value set in `REACT_APP_URL` followed by the string `/request-generator`. The request-generator assumes the REMS Admin is running on the default value set for `REACT_APP_SERVER`. This can be changed in the properties file [.env](./.env). [The following section](./README.md#how-to-override-defaults) lists the default values for these environment variables.
+This should open a browser window directed to the value set in `VITE_URL` followed by the string `/request-generator`. The request-generator assumes the REMS Admin is running on the default value set for `VITE_SERVER`. This can be changed in the properties file [.env](./.env). [The following section](./README.md#how-to-override-defaults) lists the default values for these environment variables.
+
+## Running with docker
+
+Run the following commands
+
+- `docker build -t reqgen .`
+- `docker run -p 3000:3000 reqgen`
## Keys
@@ -31,7 +38,7 @@ Embedded in the application are the public and private keys used to generate and
### How To Override Defaults
The .env file contains the default URI paths, which can be overwritten from the start command as follows:
-a) `REACT_APP_LAUNCH_URL=http://example.com PORT=6000 npm start` or b) by specifying the environment variables and desired values in a `.env.local`.
+a) `VITE_LAUNCH_URL=http://example.com PORT=6000 npm start` or b) by specifying the environment variables and desired values in a `.env.local`.
Following are a list of modifiable paths:
@@ -40,34 +47,34 @@ Following are a list of modifiable paths:
| HTTPS | `false` |
| HTTPS_CERT_PATH | `server.cert` |
| HTTPS_KEY_PATH | `server.key` |
-| REACT_APP_ALT_DRUG | `true` |
-| REACT_APP_AUTH | `http://localhost:8180` |
-| REACT_APP_CDS_SERVICE | `http://localhost:8090/cds-services` |
-| REACT_APP_CLIENT | `app-login` |
-| REACT_APP_CLIENT_SCOPES | `launch offline_access openid profile user/Patient.read patient/Patient.read user/Practitioner.read` |
-| REACT_APP_DEFAULT_USER | `pra1234` |
-| REACT_APP_EHR_BASE | `http://localhost:8080/test-ehr/r4` |
-| REACT_APP_EHR_LINK | `http://localhost:8080/ehr-server/` |
-| REACT_APP_EHR_SERVER | `http://localhost:8080/test-ehr/r4` |
-| REACT_APP_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH | `http://localhost:8080/test-ehr/r4` |
-| REACT_APP_GENERATE_JWT | `true` |
-| REACT_APP_GH_PAGES | `false` |
-| REACT_APP_HOMEPAGE | `http://localhost:8080` |
-| REACT_APP_LAUNCH_URL | `http://localhost:4040/launch` |
-| REACT_APP_ORDER_SELECT | `rems-order-select` |
-| REACT_APP_ORDER_SIGN | `rems-order-sign` |
-| REACT_APP_PASSWORD | `alice` |
-| REACT_APP_PATIENT_FHIR_QUERY | `Patient?_sort=identifier&_count=12` |
-| REACT_APP_PATIENT_VIEW | `rems-patient-view` |
-| REACT_APP_PIMS_SERVER | `http://localhost:5051/doctorOrders/api/addRx` |
-| REACT_APP_PUBLIC_KEYS | `http://localhost:3000/request-generator/.well-known/jwks.json` |
-| REACT_APP_REALM | `ClientFhirServer` |
-| REACT_APP_RESPONSE_EXPIRATION_DAYS | `30` |
-| REACT_APP_SERVER | `http://localhost:8090` |
-| REACT_APP_SMART_LAUNCH_URL | `http://localhost:4040/` |
-| REACT_APP_URL | `http://localhost:3000` |
-| REACT_APP_URL_FILTER | `http://localhost:3000/*` |
-| REACT_APP_USER | `alice` |
+| VITE_ALT_DRUG | `true` |
+| VITE_AUTH | `http://localhost:8180` |
+| VITE_CDS_SERVICE | `http://localhost:8090/cds-services` |
+| VITE_CLIENT | `app-login` |
+| VITE_CLIENT_SCOPES | `launch offline_access openid profile user/Patient.read patient/Patient.read user/Practitioner.read` |
+| VITE_DEFAULT_USER | `pra1234` |
+| VITE_EHR_BASE | `http://localhost:8080/test-ehr/r4` |
+| VITE_EHR_LINK | `http://localhost:8080/ehr-server/` |
+| VITE_EHR_SERVER | `http://localhost:8080/test-ehr/r4` |
+| VITE_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH | `http://localhost:8080/test-ehr/r4` |
+| VITE_GENERATE_JWT | `true` |
+| VITE_GH_PAGES | `false` |
+| VITE_HOMEPAGE | `http://localhost:8080` |
+| VITE_LAUNCH_URL | `http://localhost:4040/launch` |
+| VITE_ORDER_SELECT | `rems-order-select` |
+| VITE_ORDER_SIGN | `rems-order-sign` |
+| VITE_PASSWORD | `alice` |
+| VITE_PATIENT_FHIR_QUERY | `Patient?_sort=identifier&_count=12` |
+| VITE_PATIENT_VIEW | `rems-patient-view` |
+| VITE_PIMS_SERVER | `http://localhost:5051/doctorOrders/api/addRx` |
+| VITE_PUBLIC_KEYS | `http://localhost:3000/request-generator/.well-known/jwks.json` |
+| VITE_REALM | `ClientFhirServer` |
+| VITE_RESPONSE_EXPIRATION_DAYS | `30` |
+| VITE_SERVER | `http://localhost:8090` |
+| VITE_SMART_LAUNCH_URL | `http://localhost:4040/` |
+| VITE_URL | `http://localhost:3000` |
+| VITE_URL_FILTER | `http://localhost:3000/*` |
+| VITE_USER | `alice` |
## How to launch as a SMART on FHIR app
diff --git a/public/index.html b/index.html
similarity index 92%
rename from public/index.html
rename to index.html
index 28a5a8ec..dd8f4ce7 100644
--- a/public/index.html
+++ b/index.html
@@ -9,8 +9,8 @@
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
-
-
+
+
@@ -43,6 +43,7 @@
-->
+