Here are some quick links to our document deliverables!
Windows users: Docker
Mac Users: Docker or Orbstack. Highly recommend Orbstack as its a more lightweight and efficient alternative to docker desktop.
For your first initial setup you would need to run docker-compose build
Once that is done you can run either commands:
i. docker-compose up
<- this runs docker in your current terminal session
ii.docker-compose up -d
<- this runs docker in the background so you would not need it inside the terminal
The react app (webapp) has been removed from the containers, so make sure t manually install and start it on your own
Make sure react app is up to date by cd frontend && yarn install
Get it up and running by doing yarn start
Everything should be up and running now!
Install Maven:
brew install maven
After installing maven make sure to run mvn dependency:resolve
from the backend directory. You should always run this if there are new dependencies installed on the backend
Make sure you have JDK11 installed and thats the version your IDE/Maven is using
You have 2 options:
backend/src/test/java
If you are creating new tests make sure they live in backend/src/test/java
. Creating tests should be formatted as TheClassNameTest.java
. If we are testing a class called HelloService.java
, the test file should be called HelloServiceTest.java
Make sure the tests are organized the same way as it is in source, so if the class you are testing lives in controller in the src then the test should have the same structure.
For example:
Testing HomeController.java
, we create a test file in backend/src/test/controllers
and name the file as HomeControllerTest.java
Testing UserService.java
, we create a test file in backend/src/test/service
and name the file as UserServiceTest.java
webapp: http://localhost:3000
Removed as a container! Our webapp ui. It is dependent on the backend to handle authentication and processing/predicting files.
backend: http://localhost:8080
Running Java SpringMVC. Contains the routes and logic we need to handle authentication and data processing/predicting. Dependent on Tomcat, Redis, PostgreSQL and the R repository to function.
adminer: http://localhost:8082
You can use adminer to check what data is stored inside our database. As well as you can write/read data into it.
System: PostgreSQL
Server: postgres-db
Username: root
Password: root
Database: beapengine
cache: http://localhost:6379
Running our Redis instance. No protection on local, can access without password.
postgres-db: http://localhost:5432
PostgreSQL database running on version 15. Username is root
and password is root
My changes in the frontend is not reflected, why is that?
It actually does hot-reload on your code changes! If you have a slow machine you may have to wait a little while longer...
My changes in the backend is not reflected when querying the api, why is that?
Our configuration for running our backend involves producing a WAR file to deploy to our tomcat server. The WAR file contains all the changes and code of our backend app. To see your changes you would have to rebuild the backend container. To do that you can run docker-compose up --build
Can I run the react app locally instead of running in the container?
Yes you can! You can turn off the container and just do yarn start
locally. Although you would still need the other containers to be running to interact with our api routes.
How do I nuke my docker?
Glad you asked, docker system prune -a
. Warning: this deletes all volumes and containers in your docker, so in this context you will have to do the initial local environment setup all over gain.
issuetype/##-name
Issue types currently known:
feature
document
hotfix
build
spike
release
qa
example branch names:
document/71-branch-name-guide
feature/22-setup-home-page