- Technology stack
- Project Description
- About the Project
- Ports of microservices
- Project modules
- Testing
- Documentation
- [Local launch in IDE](#local launch in IDE)
- [Docker launch](#docker launch)
- [Local test launch](#local test launch)
- [Allure report example](#allure report example)
- Spring Authorization Server
- Spring OAuth 2.0 Resource Server
- Spring data JPA
- Spring Web
- Spring actuator
- Spring gRPC by https://github.com/yidongnan
- Spring web-services
- Docker
- Retrofit
- Docker-compose
- Postgres
- React
- Thymeleaf
- JUnit 5 (Extensions, Resolvers, etc)
- Allure
- Selenide
- Selenoid & Selenoid-UI
- Allure-docker-service
- Java 19
- Gradle 8.1
- And much more:)
The travel service for true rangifer enthusiasts!
Why did we name it Rangiffler? Oh, it's simple!
We combined the word "rangifer" (which means "reindeer") with our unique set of features just for you!
- With Rangiffler, you can embark on thrilling journeys around the globe, uploading your photos at every destination.
- Each photo becomes a mark on the map of your incredible odyssey.
- From bustling metropolises to cozy countryside nooks - every corner deserves its own reindeer track!
- And don't stop at solo travels! Make Rangiffler even more fun by adding your friends!
- You'll easily browse through their photos, support their adventures, and even send reindeer-style friendship requests!
Who knows, you might even share some reindeer tricks and travel secrets!
Discover the unique "Reindeer Reflection" feature - a fun way to see the world from a reindeer's perspective! Just upload a photo and marvel at how it would look if you were a reindeer!
Rangifer - the generic name of the scientific name of a reindeer.
Rangiffler - the generic name of the generic name!
Thus, Rangiffler becomes not only a travel service but also a universal symbol of generality!
We are aimed at satisfying all your needs and desires in travels, whether you are a true reindeer or just an adventure enthusiast!
With Rangiffler, everyone can become a true explorer of the world! 🦌✨
With love from the Rangiffler!
The Rangiffler project is a comprehensive application built on a microservices architecture, providing scalability, flexibility, and efficient operation.
The project includes several modules, each serving specific functions and offering unique experiences to users.
Service | Port |
---|---|
FRONTEND | 80 (server) |
GATEWAY | 8080 (server) |
AUTH | 9000 (server) |
USERDATA | 9010 (server), 9011 (grpc) |
GEO | 9020 (server), 9021 (grpc) |
PHOTO | 9030 (server), 9031 (grpc) |
The "Frontend" module represents the client-side of the application.
Here, users can enjoy a user-friendly and intuitive interface, enabling them to interact with various functionalities of the Rangiffler project.
Embark on thrilling journeys around the globe, upload your photos, connect with friends, and savor every moment with Rangiffler!
The "Gateway" module is a powerful component that distributes all client requests to the corresponding microservices.
It ensures access control by verifying each request for a JWT token to provide security and user authentication.
The "Gateway" serves as the trustworthy guardian of the magical world of Rangiffler!
The "Auth Service" is responsible for user authentication, storing credentials in the database, and recording Kafka messages for each successful authorization.
Interaction with the Gateway module is via the HTTP protocol in a RESTful style, ensuring simple and efficient communication.
The "Userdata Service" is a repository for user information, including personal data and friends' lists.
Interaction with the Gateway module is also through the HTTP protocol in a RESTful style, ensuring high performance and convenient data management.
The "Geo Service" is a virtual atlas storing information about countries around the world.
Communication with the Gateway module is based on the gRPC protocol, providing efficient data transmission and high-speed request processing.
The "Photo Service" is a reliable repository of user photo details.
Interaction with the Gateway module also utilizes the gRPC protocol, ensuring reliability and speedy data processing.
Rangiffler takes unit testing seriously to ensure code correctness and reliability.
Each service is diligently covered with comprehensive unit tests.
To provide a transparent and insightful view of the test results, Rangiffler leverages the Allure Report.
All end-to-end (e2e) tests in Rangiffler are seamlessly executed within isolated Docker containers, ensuring consistency and portability of the testing environment.
Docker containers provide a clean and reproducible environment for running the tests, guaranteeing reliable and accurate test results.
This approach ensures that the tests run consistently across different environments, avoiding potential configuration issues and making the testing process more efficient.
Rangiffler's e2e testing harness leverages a powerful set of testing technologies and tools:
Selenide is used to perform web testing, providing an elegant and concise API for interacting with web elements, making the tests easy to read and maintain.
JUnit 5, enriched with custom annotations and extensions, offers a structured and organized testing framework, enabling us to write clear and expressive test cases.
Mockito allows us to create mock objects for testing, while Wiremock provides a flexible framework for mocking external APIs, enabling us to simulate various scenarios in our tests.
The e2e tests also cover interactions with gRPC and Kafka, ensuring that all communication channels between services are thoroughly tested for correctness and reliability.
The entire Rangiffler infrastructure is conveniently set up using Docker Compose.
This enables effortless management and deployment of the application and its dependencies.
Docker Compose ensures that the various modules and services work harmoniously together, delivering a robust and unified user experience.
The Allure Report is a feature-rich reporting tool that offers valuable information on test results in an intuitive and visually appealing manner.
With Allure, we can generate detailed, interactive, and user-friendly reports, making it easy to understand and analyze test outcomes.
Rangiffler's Allure Report is customized to provide even more insights into the test results and to aid in troubleshooting potential issues:
Every test case includes its own log file in HTML format, making it easy to analyze any potential problems that occurred during the test execution.
All database queries made during the test execution are logged and attached to the report as separate steps with applied CSS styles.
This provides a transparent view of database interactions and helps in identifying performance or data-related issues.
The Allure Report simplifies the analysis of test results, helping the development team to quickly identify and address any issues.
With the customized reports, we gain deeper insights into the application's behavior and can take informed actions to enhance its overall reliability and performance.
Minimum Requirements for Working with Rangiffler Project
To work with the Rangiffler project, you need to ensure the following minimum requirements are met:
-
Install Docker (If not already installed) Docker is used for the database (MySQL) and running microservices in a unified Docker network using docker-compose.
- Install Docker on Windows
- Install Docker on Mac (Different packages for ARM and Intel)
- Install Docker on Linux
After installing and starting the Docker daemon, you can verify the Docker commands by running
docker -v
:docker -v
-
Pull MySQL Container Version 8.0.33
docker pull mysql:8.0.33
After pulling, you will see the downloaded image using the command
docker images
:❯ docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 8.0.33 a5e6f938c138 9 days ago 587MB
-
Create a Volume for Data Persistence from the Database in Docker on Your Computer
docker volume create mysqldata
-
Start the Database with the Following Command
docker run --name rangiffler-all -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -v mysqldata:/var/lib/mysql -d mysql:8.0.33
-
Install One of the Programs for Visual Interaction with MySQL
For example, you can use DBeaver or Datagrip.
-
Connect to the MySQL Database (host: localhost, port: 3306, user: root, pass: secret)
-
Install Java Version 17 or Higher
Rangiffler does not support versions older than 17. To check your installed Java version, run
java -version
:❯ java -version java version "20.0.1" 2023-04-18 Java(TM) SE Runtime Environment (build 20.0.1+9-29) Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)
If you have multiple Java versions installed, at least one of them should be 17+. If Java is not installed, you can install OpenJDK (e.g., from https://adoptium.net/en-GB/).
-
Install the Package Manager for Front-End Build: npm
Follow the instructions to Install Node.js and npm. The recommended version of Node.js is 18.13.0 (LTS).
Running Rangiffler Locally in IDE:
-
Start rangiffler-gateway (specify profile = local)
./gradlew :rangiffler-gateway:bootRun --args='--spring.profiles.active=local'
-
Start rangiffler-auth (specify profile = local)
./gradlew :rangiffler-auth:bootRun --args='--spring.profiles.active=local'
-
Start rangiffler-userdata (specify profile = local)
./gradlew :rangiffler-userdata:bootRun --args='--spring.profiles.active=local'
-
Start the Frontend (Make sure to update dependencies first)
- Navigate to the frontend directory:
cd rangiffler-client
- Start the frontend (If it's the first time, build the node-modules with npm i):
npm i npm start