This API is inspired by Neoboards from Neopets. It provides endpoints to:
- Consult Boards: Retrieve information about various boards;
- Consult Topics: Access details of topics within boards;
- Consult Answers: View responses to topics and answers;
- Update Author Information: Modify author profiles and related data;
- And much more!
- Spring Boot 3
- Flywaydb
- JPA
- Mysql 9
- Redis
- Junit 5
- Mockk
- Rest
- Actuator
- Prometheus
- Java 21
- Kotlin 1.9
- Maven
- Docker
You need to run Docker containers for Redis and MySQL. Follow the instructions below to run each container.
Run MySQL Container
To start a MySQL container, run the following command:
docker run --name mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=neoforum -p 3306:3306 -d mysql:9
Run Redis Container
To start a Redis container, run the following command:
docker run --name redis -p 6379:6379 -d redis:latest
To build the project, run the following Maven command:
./mvnw clean install
To run the Spring Boot application, use the following command:
./mvnw spring-boot:run
To run tests, you must use Maven as well. To execute all unit tests, run:
./mvnw test
The Swagger API documentation is available once the application is running. By default, the Swagger UI can be accessed at:
http://localhost:8080/swagger-ui/index.html
To run the application using Docker, follow these steps:
Pull the Docker image from Docker Hub using the following command:
Heroku
docker pull matheusmagal/neoforum:v2
Openshift
docker pull matheusmagal/neoforum-dev:v1
Run the Docker container using the following command:
Heroku
docker run -p 8080:8080 matheusmagal/neoforum
Openshift
docker run -p 8080:8080 matheusmagal/neoforum-dev
The application is hosted and accessible online. You can view the live version of the application at: Neoforum API.