Welcome to the A-Mazing Journey! This project consists of a maze-solving game built with Spring Boot for the backend and React for the frontend. Players can navigate through a maze to reach the destination while visualizing their path and the optimal path. The project is deployed on Microsoft Azure, with Azure App Services for both the backend and frontend. Additionally, it manages continuous integration and deployment (CI/CD) using GitHub Actions for the backend and Azure DevOps Pipelines for the frontend.
- Website
- Technologies
- Local Development
- Dockerization
- API Documentation with Swagger
- Usage
- Authors
- Contributing
Feel free to test the game at our website
- Java 17
- Spring Boot
- JUnit
- Mockito
- Swagger
- Azure App Services
There are two main algorithms used:
- The first algorithm is used for maze generating. It is a randomized depth-first search. It goes through all the possible cells in unfilled maze, creating paths in random directions, until it fills every single cell. After that there is an algorithm that creates 'circles', which are actually just for making more possible paths from start to finish.
- The second algorithm is used for maze solving. It is a breadth-first search. It goes through all the cells and all the passages one-by-one, filling cells with distances from current cell to start. It does that until it reaches the finish. After that the algorithm goes from finish to start, choosing the cell with the shortest distance to the start each time. That's how the shortest path is found.
- React.js
- Material UI
- Emotion
- Axios
- GitHub Actions (Backend)
- Azure DevOps Pipelines (Frontend)
To run the project locally for development, follow these steps:
git clone https://github.com/d3nnyyy/A-MazingJourney.git
- Open the backend project located in the
backend
directory using an IDE or code editor. - Run
mvn clean install
to install dependencies. - Run
mvn spring-boot:run
to start the development server.
- Open the frontend project located in the
frontend
directory using an IDE or code editor. - Run
npm install
to install dependencies. - Run
npm start
to start the development server.
Note! Dont forget to change backend url for post requests as you want to test it locally.
To containerize the backend Spring Boot application using Docker, follow these steps:
-
Navigate to the
backend
directory of the project. -
Build the Docker image using the provided Dockerfile:
docker build -t backend-image:latest .
-
Run the Docker container using the following command:
docker run -p 8080:8080 backend-image:latest
This will map port 8080 from the container to port 8080 on your local machine.
-
Access the backend API at
http://localhost:8080
.Make sure to customize the image name and tag according to your preferences.
We use Swagger to provide detailed documentation for the backend API. Swagger UI allows you to explore and interact with the API endpoints directly from a web interface.
After running the backend Docker container (as explained in the Dockerization section), you can access the Swagger UI at http://localhost:8080/swagger-ui.html
.
Swagger UI provides a user-friendly way to visualize and test the API endpoints. It's a great tool for developers and testers to understand the available routes and their inputs/outputs.
You can access the A-Mazing Journey game through the provided URL. You can interact with the maze, navigate through it using keyboard inputs, and observe your chosen path alongside the optimal path. The game offers a visual representation of the maze-solving process, providing an engaging and educational experience.
- Tsebulia Denys: Backend developer.
- Horak Maksym: Backend developer.
- Soloviy Nazariy: Frontend developer.
If you're interested in contributing to A-Mazing Journey, feel free to submit pull requests or issues on our GitHub repository. We welcome your feedback and contributions to enhance the game.