HospitalNav is a web application that gives directions to all relevant locations within the UK Healthcare hospital system.
-
Clone the repo
https://github.com/l3n1b/HospitalNav.git
-
Install Node
Download Link (Windows & macOS): https://nodejs.org/en/download
OR
Brew (macOS):
brew install node
-
Install yarn
npm install --global yarn
-
Install dependencies
In two seperate terminal windows, run the following:
terminal 1:
cd frontend yarn install
terminal 2:
cd backend yarn install
-
Run the project
In both terminal windows, run:
yarn start
For frontend tests, run:
cd frontend
yarn cypress
Note: the frontend must be running!
For backend tests, run:
cd backend
...
As of fall 2023, we have updated this project to use ReactJS (frontend) and NodeJS w/Express (backend). This change was made to stay more in line with the curriculum (CS 316 Web Programming) here at the University of Kentucky and also to streamline the development process.
We currently are not utilizing a database like the previous group was, instead the intention was to parse door, hallway, and endpoint information out of a JSON file. Whether this is a good strategy or not was up for some debate.
Adding new dependencies (packages) for the front or backend is done through yarn. To add a new dependency, run:
yarn add [name of npm package]
This will update the package.json to include the new dependancy.
Once this change is pushed, all other developers will need to run:
yarn install
This will download the new dependancy to node_modules.
FOR THEN END OF THE PROJECT
Below is what you need to get HospitalNav running.
-
Clone the repo
git clone https://github.com/KolibreKrit/HospitalNav.git
-
Install Docker
https://www.docker.com/products/docker-desktop/
-
Open an OrientDB graph database
docker run -d --name orientdb -p 2424:2424 -p 2480:2480 -e ORIENTDB_ROOT_PASSWORD=rootpwd orientdb:2.2
-
Edit the code to run on your machine with docker:
In
database_interface/DBTools.py
, replace the IP inip = "172.17.0.2"
with the IP address of your OrientDB container.This can be found by running:
docker inspect orientdb
and looking for "IPAddress"
Next, replace instances of the URL in
database_interface/templates/main-page.html
with localhost:Find and replace ukhealthgps.servehttp.com with localhost.
-
If you want to run the code without docker,
First, run
pip3 install -r requirements.txt
(you might have to change some of the versions in requirements.txt)Next, make a folder
lines
in data/imagesNext, in
database_interface/DBTools.py
, replace the IP inip = "172.17.0.2"
with localhostNext, in
database_interface/templates/main-page.html
, find and replaceukhealthgps.servehttp.com
with localhostNext, run
python3 database_interface/httpcontrollers.py
-
Build Flask app docker image
docker image build -t flask_docker .
-
Run Flask app docker image
docker run -p 36824:36824 -d flask_docker
-
Go to website
http://localhost:36824/