Spring Boot + Kotlin based backend
- Space registration/update/deletion, search/recommendation, rental (request → approval → return → re-registration), image/3D model upload
- AWS S3 Presigned URL, H2 (MySQL mode) test environment
- RFC 7807-based global exception handling, structured logging, controller unit tests
[ Client (iOS) ]
|
| REST API
v
+-------------------------+
| Controller Layer |
+-----------+-------------+
|
v
+-------------------------+ +------------------------+
| Service Layer |----->| GlobalException |
| - SpaceQueryService | | (RFC 7807 Response) |
| - SpaceUpdateService | | + LoggingStrategy |
| - SpaceRentService | +------------------------+
| - SpaceImageService |
| - Space3DModelService |
| - ColumnQueryService |
+-----------+-------------+
|
v
+-------------------------+ +------------------------+
| Infrastructure | | Database |
| - S3PresignService | | (H2/MySQL compatible)|
| - S3Uploader | +------------------------+
+-------------------------+
Space
├─ id: UUID (PK, from PrimaryKeyEntity)
├─ name, description
├─ category: SpaceCategory (enum)
├─ status: SpaceStatus (enum)
├─ addressInfo: AddressInfo (Embedded)
├─ operationalInfo: OperationalInfo (Embedded)
├─ amountInfo: AmountInfo (Embedded)
└─ phoneNumber: PhoneNumber (Value Object)
Column
└─ Main screen column (Top3 display data)
Embeddables
├─ AddressInfo(city, district, detail, lat, lng ...)
├─ OperationalInfo(days/hours ...)
├─ AmountInfo(price, unit = TimeUnit{HOUR, DAY, ...})
└─ PhoneNumber
- Register/update/delete: ownership validation and authorization check
- Image/3D Model: Presigned URL issuance → client directly uploads to S3
- Request → Approval → Return → Re-registration state transitions managed consistently by SpaceRentService
- State-specific validation and exception handling
- SpaceQueryService: keyword/my spaces/recent/nearby spaces
- ColumnQueryService: main columns Top3
- Clear responsibilities for Query / Update(Command) / Rent / Media (image/3D)
- S3Uploader: upload/delete
- S3PresignService: generate PUT/GET Presigned URLs
- DefaultCredentialsProvider chain (environment variables/IAM Role/Profile)
- GlobalExceptionHandler + ProblemDetailBuilder
- ExceptionFactory/ExceptionBuilder: unify domain error codes → HTTP exceptions
- LoggingStrategy + LogLevel for structured logs
- Traceability across services and exception handlers
- ColumnControllerTest, CategoryControllerTest, ProfileControllerTest
- RecentSpaceUpdateControllerTest, SearchControllerTest
- SpaceRentControllerTest, SpaceUpdateControllerTest
- SpaceFixture ensures consistency of domain test data
- Validation of API contract (request/response), state transitions, and exception flow stability
- Language: Kotlin
- Framework: Spring Boot 3.x, Spring Data JPA
- DB: H2 (MySQL mode) (→ MySQL compatible)
- Infra: AWS S3 (Presigned URL), Spring Cloud AWS
- Error Handling: ProblemDetail (RFC 7807)
- Logging: Custom LoggingStrategy + LogLevel
- Testing: JUnit 5, Spring Boot Test, MockMvc
- Reliability: rental logic centered on state transitions + controller tests + RFC 7807 exception handling
- Scalability: Presigned URL-based large file traffic offloading, Service Layer separation
- Operability: logging strategy and consistent responses for easier monitoring/debugging
- Data Modeling: Embedded/VO/Enum usage preserves domain semantics
- Swagger UI: complete API specification, request/response examples, and field descriptions
- Open this link -> http://43.201.251.218:8080/swagger-ui/index.html
- clean build
- docker buildx build --platform linux/amd64 -t maruhan/wonnit:latest .
- docker push maruhan/wonnit:latest
- Connect to EC2 and run docker-compose up -d
- Requires compose.yaml and .env file
