A Spring Boot application for managing customer feedback for an e-commerce platform using MongoDB.
This service allows customers to submit and retrieve product feedback, helping businesses gather valuable insights about their products and services. The application provides a RESTful API for managing feedback data with features like pagination, filtering, and sorting.
- Java 11
- Spring Boot 3.0.2
- MongoDB 5.0
- Gradle 7.6
- Docker
- Lombok
- Spring Data MongoDB
- Java 11 or higher
- Docker
- MongoDB Compass (optional, for DB visualization)
- Clone the repository:
git clone <repository-url>- Pull MongoDB Docker image:
docker pull mongo:5- Build the project:
./gradlew build- Run the application:
./gradlew bootRunPOST /feedback
{
"rating": <integer>,
"feedback": <string, optional>,
"customer": <string, optional>,
"product": <string>,
"vendor": <string>
}GET /feedback/<id>GET /feedback?page=<number>&perPage=<number>{
"id": "string",
"rating": "integer",
"feedback": "string | null",
"customer": "string | null",
"product": "string",
"vendor": "string"
}{
"total_documents": "long",
"is_first_page": "boolean",
"is_last_page": "boolean",
"documents": [array of feedback objects]
}The application uses MongoDB with the following default configuration:
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=feedback_dbRun the tests using:
./gradlew testsrc/main/java/feedbackservice/Feedback.java- Entity classFeedbackRepository.java- MongoDB repositoryFeedbackController.java- REST endpointsFeedbackService.java- Business logicCustomPageResponse.java- Pagination response wrapperFeedbackApplication.java- Main application class
- Built as part of the Hyperskill Java Backend Developer track
- Uses Spring Boot framework
- MongoDB for document storage
Contributions are welcome! Please feel free to submit a Pull Request.