Skip to content

Commit 55e31fc

Browse files
authored
Merge pull request #13 from mcode/dev
Dev
2 parents a4efa9e + b13475d commit 55e31fc

12 files changed

+960
-834
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.env
2+
.env.local
3+

DeveloperSetupGuide.md

Lines changed: 293 additions & 214 deletions
Large diffs are not rendered by default.

EndToEndSetupGuide.md

Lines changed: 142 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# End to End Setup Guide - No Docker
2-
Follow this guide if you would like to start each application without using Docker. Each must be launched separately (in a separate terminal window).
3-
4-
### Other Guides:
5-
6-
[Simple Set Up](SimpleSetupGuide.md) - This guide will get you up and running quickly with a demo environment for using the prototype locally. If you want to make changes or contribute to the codebase, see the detailed developer guide below.
7-
8-
[Developer Environment Set Up](DeveloperSetupGuide.md) - Follow this guide if you are a developer and intend on making code changes to the REMS project. This guide follows a much more technical set up process and is fully featured.
9-
10-
[SSL Setup](SSLSetupGuide.md) - Follow this guide to enable SSL on the various REMS applications.
11-
1+
# Local Developer Setup Guide (No Docker)
2+
>Follow this guide if you would like to start each application locally **without** using Docker. Each must be launched in a sperate terminal window.
123
134
## Prerequisites
145
- Java, gradle
156
- test-ehr
167
- node
17-
- REMS, pims, dtr, rems-smart-on-fhir, crd-request-generator
8+
- rems-admin, pims, rems-smart-on-fhir, request-generator
189
- git
1910
- On Windows 'Git Bash' was used for the command line interface
2011

@@ -24,36 +15,64 @@ Follow this guide if you would like to start each application without using Dock
2415
3. Start Test and Core Applications
2516

2617
## Clone Repos
27-
```
28-
git clone https://github.com/mcode/test-ehr.git
29-
git clone https://github.com/mcode/crd-request-generator.git
30-
git clone https://github.com/mcode/REMS.git
31-
git clone https://github.com/mcode/pims.git
32-
git clone https://github.com/mcode/dtr.git
33-
git clone https://github.com/mcode/rems-smart-on-fhir.git
34-
git clone https://github.com/mcode/rems-smart-on-fhir.git
35-
git clone https://github.com/mcode/rems-setup.git
36-
```
18+
1. Create a root directory for the REMS development work (we will call this `<rems-root>` for the remainder of this setup
19+
guide). While this step is not required, having a common root for the REMS Integration Prototype components will make things a lot easier
20+
down the line.
21+
22+
```bash
23+
mkdir <REMSroot>
24+
```
25+
26+
`<rems-root>` will be the base directory into which all the other components will be installed. For example, test-ehr will
27+
be cloned to `<rems-root>/test-ehr`.
28+
29+
Note: If you are using a different project structure from the above description, you will need to change the
30+
corresponding repo paths in docker-compose-dev.yml, docker-sync.yml, and docker-compose.yml
31+
32+
2. Now clone the REMS Integration Prototype component repositories from Github:
33+
34+
```bash
35+
cd <rems-root>
36+
37+
git clone https://github.com/mcode/test-ehr.git test-ehr
38+
git clone https://github.com/mcode/request-generator.git request-generator
39+
git clone https://github.com/mcode/rems-admin.git rems-admin
40+
git clone https://github.com/mcode/pims.git pims
41+
git clone https://github.com/mcode/rems-smart-on-fhir.git rems-smart-on-fhir
42+
git clone https://github.com/mcode/rems-setup.git rems-setup
43+
44+
# Update the Submodules
45+
cd rems-admin
46+
git submodule update --init
47+
48+
cd ..
49+
50+
cd rems-smart-on-fhir
51+
git submodule update --init
52+
```
3753

3854
## Utilities
3955

4056
### keycloak
4157
- Setup and run KeyCloak
4258
- Download KeyCloak 22.0.1 from [www.github.com/keycloak/keycloak/releases/tag/22.0.1](https://github.com/keycloak/keycloak/releases/tag/22.0.1)
43-
- Extract the downloaded file
44-
45-
`tar -xvf keycloak-22.0.1.tar.gz`
46-
- Navigate into directory
59+
```bash
60+
# Extract the downloaded file
61+
tar -xvf keycloak-22.0.1.tar.gz # Mac & Linux
62+
unzip <package.zip # Windows
4763

48-
`cd keycloak-22.0.1`
49-
- Start Keycloak
64+
# Navigate into directory
65+
cd keycloak-22.0.1
66+
67+
# Start Keycloak
68+
KEYCLOAK_ADMIN=admin KEYCLOAK_ADMIN_PASSWORD=admin ./bin/kc.sh start-dev --http-port=8180 --import-realm --hostname=localhost
5069

51-
`KEYCLOAK_ADMIN=admin KEYCLOAK_ADMIN_PASSWORD=admin ./bin/kc.sh start-dev --http-port=8180 --import-realm --hostname=localhost`
52-
- Place realm file in proper folder
70+
# Place realm file in proper folder
71+
mkdir data/import
5372

54-
`mkdir data/import`
73+
cp <test-ehr_location>/src/main/resources/ClientFhirServerRealm.json data/import/
74+
```
5575

56-
`cp <test-ehr_location>/src/main/resources/ClientFhirServerRealm.json data/import/`
5776
- Log in as admin user (optional)
5877
- Launch the admin page in a web browser [localhost:8180/admin/](http://localhost:8180/admin/)
5978
- Select link for [Administration Console](http://localhost:8180/auth/admin/)
@@ -62,157 +81,135 @@ git clone https://github.com/mcode/rems-setup.git
6281
### mongodb
6382
- Setup and Run MongoDB
6483
- Download the latest version for your OS from [www.mongodb.com/try/download/community](https://www.mongodb.com/try/download/community)
65-
- Extract the downloaded package
66-
- Linux and Mac
67-
68-
`tar -xvf <package.tgz>`
69-
- Windows
70-
71-
`unzip <package.zip`
72-
- Navigate into directory
84+
```bash
85+
# Extract the downloaded package
86+
tar -xvf <package.tgz> # Mac & Linux
87+
unzip <package.zip # Windows
7388

74-
`cd <package>`
75-
- Create folder for database
89+
# Navigate into directory
90+
cd <package>
7691

77-
`mkdir db`
78-
- Run mongo
92+
# Create folder for database
93+
mkdir db
7994

80-
`./bin/mongod --dbpath db`
95+
# Run mongo
96+
./bin/mongod --dbpath db
97+
```
8198
- Setup Mongo Shell `mongosh` to initialize the database
8299
- Download latest version for your OS from [www.mongodb.com/try/download/shell](https://www.mongodb.com/try/download/shell)
83-
- Extract the package
84-
85-
`unzip <package.zip>`
86-
- Navigate into directory
87-
88-
`cd <package>`
89-
- Initialize the database
90-
- (Database must already be running)
100+
```bash
101+
# Extract the package
102+
tar -xvf <package.tgz> # Mac & Linux
103+
unzip <package.zip # Windows
104+
105+
# Navigate into directory
106+
cd <package>
91107

92-
`./bin/mongosh mongodb://localhost:27017 <REMS_PATH>/mongo-init.js`
108+
# Initialize the database
109+
# NOTE: Database must already be running
110+
./bin/mongosh mongodb://localhost:27017 <REMS_PATH>/mongo-init.js
111+
```
93112
- Alternate Install Instructions: [www.mongodb.com/docs/mongodb-shell/install/#std-label-mdb-shell-install](https://www.mongodb.com/docs/mongodb-shell/install/#std-label-mdb-shell-install)
94113

95114
- Restart mongo
96115
- Stop the application
97116
- Start as above
98-
`./bin/mongod --dbpath db`
117+
```bash
118+
./bin/mongod --dbpath db
119+
```
99120
- Applications should now be able to connect
100121

101122
## Test Applications
102123

103124
### test-ehr
104125

105126
- Navigate into directory already cloned from GitHub [www.github.com/mcode/test-ehr](https://www.github.com/mcode/test-ehr)
127+
```bash
128+
cd test-ehr
129+
130+
# Run
131+
gradle bootRun
132+
```
133+
134+
```bash
135+
# Load Data (in separate window, also in repo folder)
136+
gradle loadData
137+
```
106138

107-
`cd test-ehr`
108-
109-
- Run
110-
111-
`gradle bootRun`
112-
113-
- Load Data (in separate window, also in repo folder)
114-
115-
`gradle loadData`
116-
117-
### crd-request-generator
118-
119-
- Navigate into directory already cloned from GitHub [www.github.com/mcode/crd-request-generator](https://www.github.com/mcode/crd-request-generator)
120-
121-
`cd crd-request-generator`
122-
123-
- Setup
139+
### request-generator
124140

125-
`npm install`
141+
- Navigate into directory already cloned from GitHub [www.github.com/mcode/request-generator](https://www.github.com/mcode/request-generator)
142+
```bash
143+
cd request-generator
126144

127-
- Run
145+
# Setup
146+
npm install
128147

129-
`npm start`
148+
# Run
149+
npm start
150+
```
130151

131152
## Core Applications
132153

133-
### REMS
134-
- Navigate into directory already cloned from GitHub [www.github.com/mcode/REMS](https://www.github.com/mcode/REMS)
135-
136-
`cd REMS`
137-
138-
- Submodule Initialization
139-
140-
`git submodule update --init`
141-
154+
### rems-admin
155+
- Navigate into directory already cloned from GitHub [www.github.com/mcode/rems-admin](https://www.github.com/mcode/rems-admin)
142156
- Update env.json
143157
- Add your VSAC key to env.json as the default value for `VSAC_API_KEY`
144-
145-
- Setup
146-
158+
```bash
159+
cd rems-admin
160+
161+
# Submodule Initialization
162+
git submodule update --init
163+
164+
# Setup
147165
`npm install`
148166

149-
- Run
150-
151-
`npm start`
167+
# Run
168+
npm start
169+
```
152170

153171
### pims
154172
- Navigate into directory already cloned from GitHub [www.github.com/mcode/pims](https://www.github.com/mcode/pims)
173+
```bash
174+
cd pims
175+
```
176+
177+
Backend
178+
```bash
179+
# Navigate to the backend directory
180+
cd backend
155181

156-
`cd pims`
157-
158-
- Backend
159-
- Navigate to the backend directory
160-
161-
`cd backend`
162-
- Setup
163-
164-
`npm install`
165-
- Run
182+
# Setup
183+
npm install
166184

167-
`npm start`
185+
#Run
186+
npm start
187+
```
168188
169-
- Frontend
170-
- Navigate to the frontend directory
171-
172-
`cd frontend`
173-
- Setup
174-
175-
`npm install`
176-
- Run
177-
- Linux or Mac
178-
179-
`npm start`
180-
- Windows
181-
182-
`PORT=5050 npm start`
183-
184-
### dtr
185-
- Navigate into directory already cloned from GitHub [www.github.com/mcode/dtr](https://www.github.com/mcode/dtr)
186-
187-
`cd dtr`
188-
189-
- Setup
190-
191-
`npm install`
192-
193-
- Run
189+
Frontend
190+
```bash
191+
# Navigate to the frontend directory
192+
cd frontend
193+
194+
# Setup
195+
npm install
194196

195-
`npm start`
197+
# Run
198+
PORT=5050 npm start
199+
```
196200

197201
### rems-smart-on-fhir
198-
- Navigate into directory already cloned from GitHub [www.github.com/mcode/rems-smart-on-fhir](https://www.github.com/mcode/rems-smart-on-fhir)
199-
200-
`cd rems-smart-on-fhir`
202+
- Navigate into directory already cloned from GitHub [https://www.github.com/mcode/rems-smart-on-fhir](https://www.github.com/mcode/rems-smart-on-fhir)
203+
```bash
204+
# Navigate into directory already cloned from GitHub
205+
cd rems-smart-on-fhir
201206

202-
- Submodule Initialization
207+
# Submodule Initialization
208+
git submodule update --init
203209

204-
`git submodule update --init`
210+
# Setup
211+
npm install
205212

206-
- Setup
207-
208-
`npm install`
209-
210-
- Run
211-
- Linux or Mac
212-
213-
`npm start`
214-
- Windows
215-
216-
`PORT=4040 npm run start`
217-
218-
213+
# Run
214+
PORT=4040 npm start
215+
```

0 commit comments

Comments
 (0)