Process Evidence · 04
Connect the design to use cases, contracts, and code verification
I formalized domain models as actual APIs, DTOs, sequence diagrams, and server-side revalidation criteria.
I separated use cases such as previews, orders, payment initiation, authorization checks, callbacks, and status queries, and documented verification conditions for each stage.
How I worked
Actual Working Approach
- Input
I reviewed user scenarios, gateway return and callback flows, responses needed by the frontend, and states operators needed to inspect as one flow.
- Questions to ask
I identified the use case each API completes, which values are hints versus values the server must recalculate, and which states define acceptance criteria.
- Output
I kept sequence diagrams, DTOs, endpoint order, error responses, unimplemented scope, and server-side revalidation conditions in the same document.
Checking implementation evidence through API contracts, layer connections, tests, and audit findings
I refined the implementation material by checking whether requirements analysis connected coherently to controllers, DTOs, services, factories, repositories, workers, and tests, rather than merely confirming that code existed.
- B2B code connections
- Employee-verification flows and company/vendor verification and category modules show how actor requirements connect to controllers, DTOs, services, entities, factories, repositories, Swagger documentation, and tests.
- Verified limitations
- For the same B2B sample, I distinguish a passing build from verification of runtime contracts. Field mismatches, guard-metadata mismatches, and inadequate concurrent-approval safety are presented as audit findings, not successes.
- Production code
- For the payment and subscription project, I linked cart-price estimates, order-price snapshots, Entitlement factories and services, and subscription internal-finalization retry handlers as implementation evidence.
- Representative verification
- For the rewards-accounting project, I checked the rewards facade, settlement batch, Accrual · Ledger · Wallet services, and language-specific notification-delivery flows against execution order and regression-test criteria.
Connecting verification, approval, and rejection flows to API contracts and test units
In the private B2B platform, I sought to connect company-verification requests, employee-verification approvals and rejections, and vendor-category approvals to controllers, services, repositories, factories, DTOs, Swagger documentation, and tests. A later code audit separated passing builds from runtime-contract verification, documenting gaps in verification criteria rather than claiming success.
Rendering the diagram.
Where This Led to Implementation
- Multi-Gateway Subscription Billing System · Initial payment use case
I formalized the call order, frontend usage rules, and server-side revalidation conditions for one-time payments and initial subscription payments in sequence diagrams and implementation criteria.
View the initial subscription payment use case - Multi-Gateway Subscription Billing System · Gateway routing contracts
I normalized gateway-specific callbacks, returns, and authorization responses in adapters, while handlers and processors defined entry conditions and state transitions by payment method and use case.
View gateway routing and handler contracts - Points Accounting & Rewards System · Rewards Facade
I assembled post, comment, registration, payment, and referral events into a readable execution order in the facade, delegating policy calculations, accounting records, and language-specific notification follow-up to separate services.
View the rewards facade implementation flow
- Input
- I translated actor-specific screen flows and approval/rejection policies into API requests, responses, authorization conditions, and exception cases.
- Contracts
- I assigned external contracts to controllers and DTOs, use-case execution order to services, and domain-object creation and persistence to factories and repositories.
- Verification
- I aligned Swagger documentation and controller, service, and factory tests to verify the same use-case names and state transitions.
- Output
- I extended requirements beyond an API endpoint list to sequences, DTOs, responses, failure conditions, and test units.
- Caution
- This sample shows how analysis outputs connect to code layers, while actual database execution, authorization evaluation, and concurrent-approval safety are marked as unverified or as having confirmed defects.
Verifying that analysis outputs became API contracts and acceptance criteria
Payment and subscription use-case documents distinguish endpoint order, DTOs, response-display criteria, error conditions, values the frontend can trust, and values the server must finalize again.
Where This Led to Implementation
- Multi-Gateway Subscription Billing System · Policy boundaries
Review implemented state policies for renewal failure, plan changes, cancellation, and access rights alongside separately scoped, unimplemented areas such as refunds and proration.
View policies and unimplemented scope
- Contracts
- I separated endpoints and response criteria by use case, including order creation, payment initiation, authorization checks, callbacks, and status queries.
- Verification
- I recorded failure conditions in documents and test criteria: the same idempotency key with different request content, missing authorization, delayed gateway callbacks, and reversed authorization-check order.
- Limitations
- I separately marked items outside the final implementation scope, such as subscription refunds and some proration policies, as unimplemented.