A simple Spring Boot-based RESTful API for collecting, managing, and retrieving user feedback. This project provides endpoints to create, read, update, delete, and search feedback records stored in a database.
- Create new feedback entries
- Retrieve feedback with pagination
- Get feedback by:
- Specific date
- Date range
- Name or email
- Keyword in message
- Unique ID
- Update existing feedback
- Delete feedback
- Count total feedback entries
- Kotlin
- Spring Boot (Web, Data JPA, Validation)
- Hibernate + JPA
- H2/MySQL/PostgreSQL (based on your configuration)
- Jakarta Validation
POST /feedbackRequest Body:
{
"name": "John Doe",
"email": "john@example.com",
"message": "Great service!"
}GET /feedback?page=0&size=5Returns feedback in paginated format.
GET /feedback/{id}GET /feedbackByDate?date=2025-07-30GET /feedbackByDateRange?startDate=2025-07-01&endDate=2025-07-30GET /searchMessageByKeyword?keyword=serviceGET /filterByNameOrEmail?email=john@example.com&name=JohnAll query parameters are optional — you can pass either or both.
PUT /feedback/{id}Request Body:
{
"name": "Updated Name",
"email": "updated@example.com",
"message": "Updated message"
}DELETE /feedback/{id}GET /feedback/count- JDK 17+
- Maven
- Database (optional: defaults to H2 in-memory)
controller/– REST controllersdto/– Data Transfer Objects for request/responsemodel/– JPA Entitiesrepository/– Spring Data Repositoriesservice/– Business Logic
curl -X POST http://localhost:8080/feedback \
-H "Content-Type: application/json" \
-d '{"name":"Soumya", "email":"soumya@example.com", "message":"This is helpful!"}'You can test using:
- Postman / Insomnia
- cURL
Feel free to fork and submit pull requests. Feedback and improvements are always welcome!
MIT