https://github.com/souradippatra7904/wellrested
An enterprise grade REST API with HATEOAS support, REST Client, SOAP communication and SOAP Client enabled. No security implemented as of yet.
https://github.com/souradippatra7904/wellrested
hateoas java jaxb rest-api rest-client soap soap-client soap-web-services soapui spring-boot spring-data-jpa spring-mvc springboot
Last synced: about 2 months ago
JSON representation
An enterprise grade REST API with HATEOAS support, REST Client, SOAP communication and SOAP Client enabled. No security implemented as of yet.
- Host: GitHub
- URL: https://github.com/souradippatra7904/wellrested
- Owner: SouradipPatra7904
- Created: 2025-09-24T07:49:30.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-10-03T12:52:28.000Z (8 months ago)
- Last Synced: 2025-10-03T14:44:16.578Z (8 months ago)
- Topics: hateoas, java, jaxb, rest-api, rest-client, soap, soap-client, soap-web-services, soapui, spring-boot, spring-data-jpa, spring-mvc, springboot
- Language: Java
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WellRESTed
**Enterprise-Grade REST + SOAP Application with JPA**
---
## 📌 Project Overview
WellRESTed is a Spring Boot 3.5.6 application built with **Java 21** that goes far beyond CRUD. It demonstrates how REST and SOAP can seamlessly co-exist in a modern backend service, backed by **JPA + PostgreSQL**. The project emphasizes clean architecture, separation of concerns, and enterprise patterns.
**Artifact:** `WellRESTed`
**Group:** `souradippatra`
**Packaging:** `jar`
**Build Tool:** `Maven`
---
## ✨ Features
- **RESTful Endpoints:** Full CRUD with GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD.
- **JPA with Pagination & DTO mapping:** Efficient entity handling, pagination, and response shaping.
- **HATEOAS Links:** Hypermedia-driven responses for richer REST APIs.
- **External REST Integration:** Fetches sleep recommendations from a mock REST API.
- **SOAP Integration:**
- Exposes a SOAP endpoint (`/ws/sleepsession.wsdl`) with request/response schema.
- Provides a SOAP client using `WebServiceTemplate`.
- REST → SOAP bridge endpoint: `GET /api/sleep-sessions/{id}/soap`.
- **Caching:** In-memory caching for repeated recommendation lookups.
- **Actuator Config:** Health checks and basic monitoring.
---
## 🏗️ Architecture
- **Entity Layer:** JPA entities mapped to PostgreSQL.
- **DTO Layer:** Clean separation between persistence and API payloads.
- **Service Layer:** Business logic with interfaces + implementations.
- **Controller Layer:** REST endpoints + error handling via `@ControllerAdvice`.
- **SOAP Layer:** `@Endpoint` annotated handlers for SOAP requests.
- **Config Layer:** Separate configuration for Actuator, HATEOAS, and SOAP services.
---
## 🔧 Tech Stack
- **Spring Boot 3.5.6**
- **Java 21**
- **Spring Data JPA + PostgreSQL**
- **Spring Web + HATEOAS**
- **Spring-WS (SOAP)**
- **Spring Cache (in-memory)**
- **Spring Boot Actuator**
- **Lombok**
---
## 🚀 Running the Project
1. Clone the repository.
2. Configure PostgreSQL in `application.yml`.
3. Run with Maven:
```bash
mvn spring-boot:run
```
4. Access endpoints:
- REST API → `http://localhost:9595/api/sleep-sessions`
- SOAP WSDL → `http://localhost:9595/ws/sleepsession.wsdl`
- REST → SOAP bridge → `http://localhost:9595/api/sleep-sessions/{id}/soap`
5. REST API specific endpoints :
- GET /api/sleep-sessions
- GET /api/sleep-sessions/{id}
- POST /api/sleep-sessions
- PATCH /api/sleep-sessions/{id}
- PUT /api/sleep-sessions/{id}
- DELETE /api/sleep-sessions/{id}
- HEAD /api/sleep-sessions/{id}
- OPTIONS /api/sleep-sessions
---
## 📈 Future Enhancements
1. Security with Spring Security.
2. Advanced JPA optimizations (Vlad Mihalcea patterns).
3. Database migrations (Flyway/Liquibase).
4. Docker support.
5. Testcontainers & Profiling.
6. Observability: Micrometer, Prometheus, Grafana.
---
## 🏆 Why my Project is so much more than basic "CRUD" apps :
Unlike typical CRUD demos, **WellRESTed** demonstrates:
- Advanced JPA usage.
- Integration with both **REST** and **SOAP**.
- Enterprise-grade separation of concerns.
- Extensible architecture for monitoring, security, and scalability.
---