Ladies and Gentlemen allow me to introduce you Rangiffler. Rangiffler - comes from the name of the reindeer. This name was chosen for this project because it is all about travel and the reindeer hold the record among deer for the distance traveled on land. So, travel and be like Rangifler!
- Java 17
- Spring Web
- Spring actuator
- Spring data JPA
- Spring web-services
- Spring Authorization Server
- Spring OAuth 2.0 Resource Server
- Allure
- Selenide
- Retrofit 2
- Allure-docker-service
- Selenoid & Selenoid-UI
- JUnit 5 (Extensions, Resolvers, etc)
The Rangiffler application has been built based on microservices architecture which contains the following service
- Auth - responsible for authentication and authorization
- Gateway - the proxy service that the frontend uses to communicate with the backend services
- User data - responsible for providing user data and users' friends information
- Photo - responsible for providing user photo information
- Geo - contains the countries
- Client - front-end interface of the application
Component | Port |
---|---|
Database | 5432 |
Auth | 9000 |
User data | 8089 |
Gateway | 8080 |
Photo | 8086 |
Geo | 8088 |
Frontend | 3001 |
Preconditions for working with the Rangiffler project
docker pull postgres:15.1
docker volume create pgdata
docker run --name rangiffler-all -p 5432:5432 -e POSTGRES_PASSWORD=secret -v pgdata:/var/lib/postgresql/data -d postgres:15.1
5. Connect to the database (host: localhost, port: 5432, user: postgres, password: secret, database name: postgres) using PgAdmin and create empty db for the microservices.
create database "rangiffler-userdata" with owner postgres;
create database "rangiffler-geo" with owner postgres;
create database "rangiffler-photo" with owner postgres;
create database "rangiffler-auth" with owner postgres;
Documentation. Recommended version Node.js - 18.13.0 (LTS)
MacBook-Pro rangiffler % cd rangiffler-client
MacBook-Pro rangiffler-client % npm i
MacBook-Pro rangiffler-client % npm run start
Open the Run menu -> Edit Configurations -> choose main class -> set Active profiles: local.
Example can be found on stackoverflow
- Run the auth service
MacBook-Pro rangiffler % cd rangiffler-auth
MacBook-Pro rangiffler-auth % gradle bootRun --args='--spring.profiles.active=local'
5. Run the other services: rangiffler-geo, rangiffler-photo, rangiffler-gateway, rangiffler-userdata
bash run-tests.sh
There is the ability to run the application with the help of docker compose. It's important to have sql/create-db.sql file in order to run the application use
docker-compose up -d
The application url
http://127.0.0.1/landing
bash run-tests.sh docker
By default, it starts in headless and uses 3 threads; however, it's possible to change the number of threads in the junit-platform.properties
file as well as disable the headless Configuration.headless = false;
junit.jupiter.execution.parallel.config.fixed.parallelism={threads}
junit.jupiter.execution.parallel.config.fixed.max-pool-size={threads}
Note: If you run the tests by the bash script the report will be generated and opened automatically.
The result of the tests can be viewed through Allure report.
./gradlew allureServe