This repository contains the backend of the full-stack project Virtual Pets, the final assignment at the IT Academy bootcamp.
You can find the code for the frontend here.
This API is built using Java Spring Boot and incorporates modern development practices and patterns. Key features include:
- Reactive programming for efficient handling of asynchronous data streams.
- Hexagonal Architecture, ensuring a clean separation of concerns and flexibility in adapting to changes.
- User authentication and authorization:
- Admin and User roles.
- JWT (JSON Web Tokens).
- Hybrid database setup:
- PostgreSQL: Used for user data storage.
- MongoDB Used for pet data storage.
- Frameworks & Libraries: Spring WebFlux, Swagger, JUnit, Mockito
- Databases: MongoDB, PostgreSQL
- Tools: Maven, Postman, Docker
Ensure the following prerequisites are installed on your system:
- Docker (to run Docker containers)
- Docker Compose (to manage multi-container Docker applications)
Follow these steps to run the project:
-
Clone the repository.
git clone https://github.com/jraporta/Virtual-Pet.git cd Virtual-Pet -
Build the Docker images (ensure that Docker and Docker Compose are running):
docker-compose up --build
-
Access the service at: http://localhost:8080
-
To stop the application press
Ctrl+Cor run:docker-compose down
- Install the required software:
- JDK21, Maven, PostgreSQL and MongoDB.
- Configure the environment variables (refer to the
.envfile) - Build the project:
mvn clean install - Run the application:
mvn spring-boot:run - Access the service at:
http://localhost:8080 - To stop the application press
Ctrl+C.
If you want to contribute to the project:
- Fork the repository.
- Create a branch for your feature or bug fix.
- Submit a pull request with a detailed description.
API documentation is available via Swagger:
- Local Environment: http://localhost:8080/swagger-ui.html