This app is a POF for doctors. It enables them to writes notes about patients.
Then the apps analyses notes and produce a report to alarm doctors about their patients' potential sensitivity to diabetes.
- Docker desktop
- MongoDB datatools (latest)
- Ide : IntelliJ or Eclipse
- Note that all directories are written in this readme file in windows style, especially concerning paths regarding \ and /...)
- First of all, make sure you created a Database named
diabetecare
, and that a user calleddiabetecareusr
with the password as shown in the table below has all the permissions on that database. - Make also sure that your local
mysql port
is3306
. - No need to create a Mongo DB but still you hve to run a local server running on port 27017.
- You can initialise your MongoDB and MySQL DB by following bellow info.
- From you IDE execute each app with a specific VM option that is
-Dspring.profiles.active=ide
. Execute in that order :- eureka-server
- api-gateway
- microservice-patients
- microservice-patienthistory
- microservice-report
- client-ui
- Go to http://localhost:8100 to get into the app.
- Download sources
- package jar files for :
- api-gateway
- client-ui
- eureka-server
- microservice-patienthistory
- microservice-patients
- microservice-report
- put each jar file in its respective folder inside diabetecre-compose
- run a console inside {projectFolder}/diabetecare-compose/
- run command
docker compose up --build
- Inject data inside your Mongo DB by following info below.
- (No need to do so for mysql db)
- Go to http://localhost:8100 to get into the app.
clint-ui
: http://localhost:8100eureka-server
: http://localhost:9102microservice-patienthistory
: http://localhost:8082microservice-patients
: http://localhost:8081microservice-report
: http://localhost:8080
- There are 2 databases embedded inside the project.
- MySQL for
microservice-patients
- NoSQL (MongoDB) for
microservice-patienthistory
- MySQL for
- Each database is exposed through docker :
Database name | Host | Local port (for IDE or inside docker container) | Exposed port for docker compose | User | Password |
---|---|---|---|---|---|
MySQL | localhost | 3306 | 3307 | root | MysqlDockerRootP4ssW0rd! |
diabetecareusr | diabetecare123 | ||||
NoSQL | localhost | 27017 | 27018 | no user | no password |
- Initialisation :
- The NoSQL database is created but not initialised through docker compose.
- Whereas the MySQL one is created and initialised through docker compose with these two files (BUT YOU HAVE TO CREATE the database and allow full access to
diabetecareusr
if you run app through an IDE) :microservice-patients/src/main/resources/schema.sql
which initialise DB scheme.microservice-patients/src/main/resources/data.sql
which add/update data to the DB.- It is recommended not to
data.sql
. It is intended to test the app. Nothing more.
- You can initialise NoSQL database by using a provided file located here :
microservice-patienthistory/src/main/resources/diabetecare
- you can choose between
patientHistory.bson
(to be imported with a software like Studio3T, ormongorestore
command). - or you can choose
patientHistory.json
(to be imported in CLI withmongo-dump
). - If you want to do so here are the steps to follow using mongorestore :
- Make sure you have Mongo data tools properly installed on your computer (link provided above).
- open a terminal in
microservice-patienthistory/src/main/resources/diabetecare
- from this terminal, execute command :
mongorestore [additional options] --host="<host URL/IP>:<Port>" [restore directory/file.bson]
- ie for this project using dockercompose :
mongorestore --host="localhost:27018" ./diabetecare/patientHistory.bson
- ie for this project using dockercompose :
- you can choose between
- The project has a module called
config-server
. This module communicates with a git repo to provides properties to each other modules in the app. - The module is not used anymore.
- A maximum of four property files have been created :
application-ide.yml
is used to be run when launching app through the ide.application-compose.yml
is used to be run by the app when launched through docker-compose.application-test.yml
is used when tests are run.- (NOT USED BY DEFAULT)
bootstrap.yml
is used to provide to the app the address of remote repo where to find config files.