Traveling to New York is a dream for many people. However, planning the trip such that one has the best possible experience in New York can be difficult. Finding the right place to stay is often the first but most challenging task when planning a trip. In NYC, there are just too many options. Therefore, we created a tool where users can enter their budget and their preferences for the city trip, and we recommend an area to look for an apartment as well as interesting activities to do in the city.
For a current snapshot of our code quality metrics, please refer to the links below:
Component | Quality |
---|---|
Frontend | |
AirBnb API | |
POI API | |
Recommender API | |
POI Density API |
The easiest way to get the application up and running is to use our docker-compose.yml, which uses our Docker Hub Images
All you need in order to get started is our docker-compose.yml, as well as the db_folder_setup.sh script.
After downloading these two files, put them into an empty folder of your choice and open a command line in the same folder.
First execute bash db_folder_setup.sh
To get the application started, run the following command:
docker compose -f docker-compose.yml up -d
Afterwards, open your browser and go to http://localhost:3000
to access the application.
To stop the entire application, run the following command:
docker compose -f docker-compose.yml down
If you decide to re-run docker compose up at a later point, remember to rerun bash db_folder_setup.sh
This ensures that the database folders are cleared, so you can start over with fresh databases.
In order to be able to build all of the services, you need the following tools and environments installed on your machine:
To build the entire application including all microservices, run the following command in the root directory of the project: bash ./build_docker_containers.sh
. This builds all the projects and sets up the docker containers. For details on the individual microservices, please refer to the following pages:
Each eloquent-elks database has its own seeding docker image. We found this to be the most stable way of initially loading data into a mongodb docker container. DB-Seeds are available for the following databases:
This application consists of various microservices. Each of them runs in a docker container, which enables easy deployment on cloud platforms. As of now, the application consists of the following microservices:
The frontend is written in React. It uses grommet and leaflet for the visualizations.
The AirBnb API is based on Java Spring Boot. It connects to the eloquent-elks-airbnb-db and exposes the AirBnb data to the frontend.
The AirBnb database is a MongoDB containing data on AirBnbs. The data has been retrieved from Kaggle.
The POI API is based on Java Spring Boot. It connects to the eloquent-elks-poi-db. It is responsible for exposing the Points of Interest of New York to the frontend, and also to the POI Density API.
The POI database is a MongoDB containing data on the Points of Interest of New York. The data has been collected from OpenStreetMap.
The POI Density API is implemented in NodeJS Express. Its job is to calculate the density of various types of attractions and is called by the Recommender API. In turns, it gets the POIs from the POI API. For the density calculation, it uses the TurfJS library.
The POI Density database is a MongoDB acting as a cache for the POI Density API, such that it does not have to recompute the density layers if they did not change.
The Recommender API is written in Java Spring Boot. It is responsible for retrieving the density calculations from the POI Density API and processing these results. In particular, this involves normalization and aggregation.
For each microservice, we wrote unit tests during the development. For the Java Spring Boot applications, we tested with JUnit and for the Javascript-based applications, we tested with Jest.
Here is how you can run the tests of each microservice, assuming your current working directory is the EloquentElks root folder:
- Frontend:
yarn --cwd ./eloquent-elks-frontend test
- AirBnb API:
./eloquent-elks-airbnb-api/gradlew -p ./eloquent-elks-airbnb-api test
- POI API:
./eloquent-elks-poi-api/gradlew -p ./eloquent-elks-poi-api test
- Recommender API:
./eloquent-elks-recommender-api/gradlew -p ./eloquent-elks-recommender-api test
- POI Density API:
npm test --prefix ./eloquent-elks-poi-density-api
The coverages of each microservice is available in the Code Metrics section.
For the frontend, we focused also on manual user acceptance testing, as it yields invaluable feedback regarding the usability of the application. Also, the frontend served for manual intergration testing, as it allows to call the microservices and verify if they work together properly.
For continuous integration, we use Travis CI. In order to build our microservice efficiently, we set up a build pipeline that consist of 5 build jobs, one for each API microservice.
For quality checks, we use Sonarcloud's Quality Gates, which are displayed at the top of this page. If a Pull Request is opened, Sonarcloud will provide the Quality Gate evaluation results automatically as comments. This is a very helpful tool to keep code quality on a good level.
The build job of each microservice takes care of building the respective database and database seed images, and pushes them to docker hub as well.
If you are interested in our working procedures, check out our YouTrack KANBAN board (requires a user account).
The rationale behind our choices and decisions is available in our YouTrack Knowledge Base (Wiki) (requires a user account).
Gantt charts for the stories and for the whole project are available at YouTrack Reports (requires a user account):