diff --git a/.forge/SPRING-ARC-REF-FINAL-1783833422-attempt-2.md b/.forge/SPRING-ARC-REF-FINAL-1783833422-attempt-2.md new file mode 100644 index 0000000..d9b6b29 --- /dev/null +++ b/.forge/SPRING-ARC-REF-FINAL-1783833422-attempt-2.md @@ -0,0 +1,3 @@ +# SPRING-ARC-REF-FINAL-1783833422-attempt-2 + +Forge 이슈 작업 브랜치 `forge/SPRING-ARC-REF-FINAL-1783833422-attempt-2`. diff --git a/.forge/iss-5a912ed79baf-attempt-3.md b/.forge/iss-5a912ed79baf-attempt-3.md deleted file mode 100644 index f95f3fb..0000000 --- a/.forge/iss-5a912ed79baf-attempt-3.md +++ /dev/null @@ -1,3 +0,0 @@ -# iss-5a912ed79baf-attempt-3 - -Forge 이슈 작업 브랜치 `forge/iss-5a912ed79baf-attempt-3`. diff --git a/.forge/iss-87190c9836ac-attempt-1.md b/.forge/iss-87190c9836ac-attempt-1.md deleted file mode 100644 index af8e790..0000000 --- a/.forge/iss-87190c9836ac-attempt-1.md +++ /dev/null @@ -1,3 +0,0 @@ -# iss-87190c9836ac-attempt-1 - -Forge 이슈 작업 브랜치 `forge/iss-87190c9836ac-attempt-1`. diff --git a/docs/architecture/adr-payment-boundary.md b/docs/architecture/adr-payment-boundary.md new file mode 100644 index 0000000..608244a --- /dev/null +++ b/docs/architecture/adr-payment-boundary.md @@ -0,0 +1,14 @@ +# ADR for Payment Boundary + +## Context +The payment processing system is pivotal for the business operations, therefore a well-defined boundary is necessary to manage dependencies, isolate services, and ensure the resilience of the application. + +## Decision +We will implement a microservices architecture for payment processing, with the following boundaries: 1. Payment Service, 2. Notification Service, 3. Reporting Service. These services will communicate through well-defined APIs and will be independently deployable. + +## Alternatives +1. Monolithic architecture - rejected due to tight coupling and scalability issues. +2. Service-oriented architecture - rejected due to complexity in service integrations compared to microservices. + +## Consequences +This decision allows for better scalability and maintainability of the payment processing system but will introduce challenges in inter-service communication and data consistency management. \ No newline at end of file diff --git a/docs/architecture/package-map.md b/docs/architecture/package-map.md index c8762cf..bd0aef2 100644 --- a/docs/architecture/package-map.md +++ b/docs/architecture/package-map.md @@ -1,9 +1,7 @@ -# Package Responsibility Map - -| Package | Responsibility | Forbidden Dependencies | -|----------------|------------------------------------------------|------------------------| -| controller | Handles user input and orchestrates payment | domain | -| service | Contains business logic for payment processing | integration | -| repository | Data access layer for payment records | service | -| domain | Defines the core domain models and business rules| controller | -| integration | Communicates with external payment gateways | domain, service | \ No newline at end of file +| 패키지 | 책임 | 금지 의존성 | +|--------------|-------------------------------|---------------------| +| controller | 사용자 요청 처리 | service, repository | +| service | 비즈니스 로직 처리 | controller | +| repository | 데이터 접근 및 관리 | service | +| domain | 도메인 모델 및 규칙 정의 | integration | +| integration | 외부 시스템과의 통신 처리 | domain | \ No newline at end of file diff --git a/docs/architecture/transaction-sequence.md b/docs/architecture/transaction-sequence.md index 4d3460a..d4f19d7 100644 --- a/docs/architecture/transaction-sequence.md +++ b/docs/architecture/transaction-sequence.md @@ -1,38 +1,46 @@ ```mermaid sequenceDiagram participant User - participant PaymentService - participant PaymentGateway + participant Controller + participant Service + participant Repository participant Database - %% Normal Flow - User->>PaymentService: Initiate Payment - PaymentService->>Database: Store Transaction - Database-->>PaymentService: Transaction Stored - PaymentService->>PaymentGateway: Process Payment - PaymentGateway-->>PaymentService: Payment Success - PaymentService->>Database: Update Transaction Status - Database-->>PaymentService: Transaction Updated - PaymentService-->>User: Payment Success + User->>Controller: 결제 요청 + Controller->>Service: 결제 처리 요청 + Service->>Repository: 결제 정보 저장 + Repository->>Database: DB에 저장 + Database-->>Repository: 저장 완료 + Repository-->>Service: 저장 완료 + Service-->>Controller: 처리 완료 + Controller-->>User: 결제 완료 - %% External Failure Flow - User->>PaymentService: Initiate Payment - PaymentService->>Database: Store Transaction - Database-->>PaymentService: Transaction Stored - PaymentService->>PaymentGateway: Process Payment - PaymentGateway-->>PaymentService: Payment Failure - PaymentService->>Database: Rollback Transaction - Database-->>PaymentService: Transaction Rolled Back - PaymentService-->>User: Payment Failure + %% 외부 실패 흐름 + User->>Controller: 결제 요청 + Controller->>Service: 결제 처리 요청 + Service->>Repository: 결제 정보 저장 + Repository->>Database: DB에 저장 + Database-->>Repository: 저장 실패 + Repository-->>Service: 저장 실패 + Service-->>Controller: 처리 실패 + Controller-->>User: 결제 실패 - %% DB Failure Flow - User->>PaymentService: Initiate Payment - PaymentService->>Database: Store Transaction - Database-->>PaymentService: Transaction Store Failure - PaymentService-->>User: Payment Failure + %% DB 실패 흐름 + User->>Controller: 결제 요청 + Controller->>Service: 결제 처리 요청 + Service->>Repository: 결제 정보 저장 + Repository->>Database: DB에 저장 + Database-->>Repository: DB 오류 + Repository-->>Service: DB 오류 + Service-->>Controller: 처리 실패 + Controller-->>User: 결제 실패 - %% Commit & Rollback - Note over User, PaymentService: - commit --> PaymentService - rollback --> PaymentService + %% Commit/Rollback 경계 + alt 정상 흐름 + Service->>Database: Commit + else 외부 실패 + Service->>Database: Rollback + else DB 실패 + Service->>Database: Rollback + end ``` \ No newline at end of file