Welcome Traveler! You've found a perfect place to share with friends your most adventurous photos from the places you've been.
Meet Rangiffler, a username-friendly app that lets you collect and arrange your travel images. Share your thoughts in each of your entry. Add friends from our username list and explore their posts. Use our interactive map feature to keep track of countries you've visited and lights up on the map, letting you sort your photos by country with a simple click.
- 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
- Docker-compose
- MySQL
- React
- Apache Kafka
- Thymeleaf
- JUnit 5 (Extensions, Resolvers, etc)
- Retrofit 2
- Allure
- Selenide
- Selenoid & Selenoid-UI
- Allure-docker-service
- Java 19
- Gradle 7.6
- And more
Minimum requirements to start working with Rangiffler
Ports need for Rangiffler to work:
Service | Port |
---|---|
FRONTEND | 3001 |
AUTH | 9000 |
GATEWAY | 8080 |
USERDATA | 9010 |
GEO | 9020, gRPC:9021 |
PHOTOS | 9030, gRPC:9031 |
We will be using Docker for the database (MySQL), and additionally, we will be launching microservices in a unified Docker network using docker-compose.
For Mac (ARM or Intel)
After installing and starting the Docker daemon, you need to ensure that the Docker commands are working, for example docker -v:
docker -v
Docker version 20.10.14, build a224086
docker pull mysql
docker pull confluentinc/cp-zookeeper:7.3.2
docker pull confluentinc/cp-kafka:7.3.2
docker volume create mysql_data
docker run --name rangiffler-all -p 5432:5432 -e POSTGRES_PASSWORD=secret -v pgdata:/var/lib/postgresql/data -d postgres:15.1
docker run --name=zookeeper -e ZOOKEEPER_CLIENT_PORT=2181 -e ZOOKEEPER_TICK_TIME=2000 -p 2181:2181 -d confluentinc/cp-zookeeper:7.3.2
Zookeeper_Server_IP=$(docker inspect zookeeper --format='{{ .NetworkSettings.IPAddress }}')
docker run --name=kafka -e KAFKA_BROKER_ID=1 \
-e KAFKA_ZOOKEEPER_CONNECT=${Zookeeper_Server_IP}:2181 \
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 \
-e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 \
-e KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1 \
-e KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 \
-p 9092:9092 -d confluentinc/cp-kafka:7.3.2
5. Install Java version 17 or newer. This is necessary as the project does not support versions less than 17.
Verity java version:
java -version
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
If you have multiple versions of Java installed simultaneously, at least one of them must be 17 or higher. If Java is not installed at all, it is recommended to install OpenJDK (for example, from https://adoptium.net/en-GB/).
6. Install the npm package manager for front-end build. Instructions.
Recommended Node.js - 18.13.0 (LTS)
cd rangiffler-client
npm i
npm run
To do this, go to the Run menu -> Edit Configurations -> select the main class -> specify Active profiles: local. Instruction.
4. Start all Rangiffler services using Gradle or the Run command in the IDE in every service directory:
gradle bootRun --args='--spring.profiles.active=local'
- Auth
- Gateway
- Userdata
- Geo
- Photos
Or simply by going to the main class of every RangifflerServiceApplication and selecting run in IDE (making sure the previous step has been completed).
The frontend will be available at http://127.0.0.1:3001/
1. Create a free account at https://hub.docker.com/ (if you don't have one already).
2. Create an access_token in the settings of your account. Instruction.
- frontend: 127.0.0.1 frontend.rangiffler.dc,
- auth: 127.0.0.1 auth.rangiffler.dc
- gateway: 127.0.0.1 gateway.rangiffler.dc
vi /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 frontend.rangiffler.dc
127.0.0.1 auth.rangiffler.dc
127.0.0.1 gateway.rangiffler.dc
cd rangiffler
- Start with tests
bash docker-compose-e2e.sh
- Start without tests
bash docker-compose-dev.sh
When running in Docker, Rangiffler will be available at the address http://rangiffler-frontend/ IMPORTANT! Only the following ports will be available to you from the docker-network:
- Port 3001 (all requests from it are redirected by nginx to the frontend)
- Port 9000 (rangiffler-auth service)
- Port 8080 (rangiffler-gateway service)