diff --git a/.forge/iss-5a912ed79baf-attempt-2.md b/.forge/iss-5a912ed79baf-attempt-2.md deleted file mode 100644 index 59e7abd..0000000 --- a/.forge/iss-5a912ed79baf-attempt-2.md +++ /dev/null @@ -1,3 +0,0 @@ -# iss-5a912ed79baf-attempt-2 - -Forge 이슈 작업 브랜치 `forge/iss-5a912ed79baf-attempt-2`. diff --git a/.forge/iss-5a912ed79baf-attempt-3.md b/.forge/iss-5a912ed79baf-attempt-3.md new file mode 100644 index 0000000..f95f3fb --- /dev/null +++ b/.forge/iss-5a912ed79baf-attempt-3.md @@ -0,0 +1,3 @@ +# 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 new file mode 100644 index 0000000..af8e790 --- /dev/null +++ b/.forge/iss-87190c9836ac-attempt-1.md @@ -0,0 +1,3 @@ +# iss-87190c9836ac-attempt-1 + +Forge 이슈 작업 브랜치 `forge/iss-87190c9836ac-attempt-1`. diff --git a/docs/architecture/package-map.md b/docs/architecture/package-map.md new file mode 100644 index 0000000..c8762cf --- /dev/null +++ b/docs/architecture/package-map.md @@ -0,0 +1,9 @@ +# 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 diff --git a/docs/architecture/transaction-sequence.md b/docs/architecture/transaction-sequence.md index 22984f9..4d3460a 100644 --- a/docs/architecture/transaction-sequence.md +++ b/docs/architecture/transaction-sequence.md @@ -1,23 +1,38 @@ ```mermaid sequenceDiagram participant User + participant PaymentService participant PaymentGateway participant Database - User->>PaymentGateway: Initiate payment - PaymentGateway->>User: Payment status (success) - User->>Database: Save transaction - Database-->>User: Transaction saved + %% 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 - %% External failure scenario - User->>PaymentGateway: Initiate payment - PaymentGateway-->>User: Payment status (failure) - User->>Database: Log failure reason + %% 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 - %% Database failure scenario - User->>PaymentGateway: Initiate payment - PaymentGateway->>User: Payment status (success) - User->>Database: Save transaction - Database-->>User: Transaction failed (DB error) - Note right of User: Rollback transaction + %% DB Failure Flow + User->>PaymentService: Initiate Payment + PaymentService->>Database: Store Transaction + Database-->>PaymentService: Transaction Store Failure + PaymentService-->>User: Payment Failure + + %% Commit & Rollback + Note over User, PaymentService: + commit --> PaymentService + rollback --> PaymentService ``` \ No newline at end of file