Skip to content

This API offers endpoints to manage boards, topics, answers, and author profiles, among other features.

Notifications You must be signed in to change notification settings

MatheusMFranco/neoforum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neoforum

Basic validation

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!

Index

Stack

  • Spring Boot 3
  • Flywaydb
  • JPA
  • Mysql 9
  • Redis
  • Junit 5
  • Mockk
  • Rest
  • Actuator
  • Prometheus

Prerequisites

  • Java 21
  • Kotlin 1.9
  • Maven
  • Docker

Setting Up the Environment

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

Build the Project

To build the project, run the following Maven command:

./mvnw clean install

Running the Application

To run the Spring Boot application, use the following command:

./mvnw spring-boot:run

Tests

To run tests, you must use Maven as well. To execute all unit tests, run:

./mvnw test

Viewing Documentation

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

Using Docker

To run the application using Docker, follow these steps:

1. Pull the Docker Image

Pull the Docker image from Docker Hub using the following command:

Heroku

docker pull matheusmagal/neoforum:v2

Openshift

docker pull matheusmagal/neoforum-dev:v1

2. Run the Docker Container

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

Accessing the Application in Production

The application is hosted and accessible online. You can view the live version of the application at: Neoforum API.

About

This API offers endpoints to manage boards, topics, answers, and author profiles, among other features.

Topics

Resources

Stars

Watchers

Forks