diff --git a/.forge/SPRING-ARC-SPLIT-1783827796-attempt-3.md b/.forge/SPRING-ARC-SPLIT-1783827796-attempt-3.md new file mode 100644 index 0000000..d96d09c --- /dev/null +++ b/.forge/SPRING-ARC-SPLIT-1783827796-attempt-3.md @@ -0,0 +1,3 @@ +# SPRING-ARC-SPLIT-1783827796-attempt-3 + +Forge 이슈 작업 브랜치 `forge/SPRING-ARC-SPLIT-1783827796-attempt-3`. diff --git a/docs/architecture/adr-payment-boundary.md b/docs/architecture/adr-payment-boundary.md new file mode 100644 index 0000000..ef21b3b --- /dev/null +++ b/docs/architecture/adr-payment-boundary.md @@ -0,0 +1,14 @@ +# 결제 전환 목표 아키텍처 결정 기록 + +## Context +결제 시스템의 전환 목표를 정의하고, 시스템의 경계를 명확히 하여 서비스 간의 의존성을 관리하고자 함. + +## Decision +결제 서비스는 외부 결제 API와 통신하며, 데이터베이스와의 상호작용을 통해 결제 정보를 관리한다. 서비스와 리포지토리 간의 의존성을 명확히 하여 순환 의존성을 방지한다. + +## Alternatives +1. 서비스가 직접 데이터베이스에 접근하는 방법 +2. 모든 비즈니스 로직을 리포지토리에서 처리하는 방법 + +## Consequences +서비스와 리포지토리 간의 명확한 경계를 설정함으로써, 코드의 유지보수성과 테스트 용이성을 높인다. \ No newline at end of file diff --git a/docs/architecture/package-map.md b/docs/architecture/package-map.md new file mode 100644 index 0000000..f9cf1d6 --- /dev/null +++ b/docs/architecture/package-map.md @@ -0,0 +1,7 @@ +| 패키지 | 책임 | 금지 의존성 | +|-----------|-----------------------------------------|-------------------------| +| controller | 사용자 요청을 처리하고 응답을 반환 | service -> repository | +| service | 비즈니스 로직을 처리 | repository -> service | +| repository | 데이터베이스와의 상호작용을 관리 | - | +| domain | 도메인 모델을 정의 | - | +| integration | 외부 시스템과의 통신을 관리 | - | \ No newline at end of file diff --git a/docs/architecture/transaction-sequence.md b/docs/architecture/transaction-sequence.md new file mode 100644 index 0000000..6a8cfa8 --- /dev/null +++ b/docs/architecture/transaction-sequence.md @@ -0,0 +1,21 @@ +sequenceDiagram + participant User + participant PaymentService + participant PaymentRepository + participant ExternalAPI + + User->>PaymentService: 결제 요청 + PaymentService->>PaymentRepository: 결제 정보 저장 + alt 정상 흐름 + PaymentRepository-->>PaymentService: 저장 성공 + PaymentService->>ExternalAPI: 결제 처리 요청 + ExternalAPI-->>PaymentService: 결제 성공 + PaymentService-->>User: 결제 완료 + else 외부 실패 + PaymentRepository-->>PaymentService: 저장 성공 + PaymentService-->>User: 결제 실패 (외부 API 오류) + else DB 실패 + PaymentRepository-->>PaymentService: 저장 실패 + PaymentService-->>User: 결제 실패 (DB 오류) + end + note over PaymentService: 커밋 또는 롤백 경계 \ No newline at end of file