2.6 KiB
2.6 KiB
sample-portfolio — fixture / reference consumer
Registered identity
- Module ID:
sample-portfolio - Gradle path:
:sample-portfolio - Focused test (derived from Gradle path):
./gradlew :sample-portfolio:test --console=plain - Runtime baseline: Java 21; repository framework baseline: Spring Boot 4.0.0.
- Registry SSOT:
src/config/architecture/modules.json.
Package root: dev.caskeleton.sample.portfolio.
코드 주석에서 덜어낸 설계 결정의 근거는 README.md 의 "설계 결정 참조" 절이 모아둔다 (이 문서는 모듈 규칙 SSOT).
Responsibility
- Reference implementation for template adopters: the WorkLog domain slice, layered
exactly like a consuming project —
domain/worklog(WorkLog,WorkLogId,Period,WorkLogRepository),application/(commands, queries, use cases, ports such asRepoStatsPort), and reference adapters underadapter/web,adapter/persistence,adapter/outbound/repostats(RepoStatsPortClient+RepoStatsAclMapper),adapter/identifier(UuidWorkLogIdFactory). - Contract-test fixtures the app-bootstrap verification suite analyses
(
DomainExceptionHandler,PortfolioErrorCode, wire/contract tests). - Disposable messaging contract fixture: the exact
WorkLogReservedPayloadrecord, its static application-core contract contribution, sample-owned schema/digest and golden vectors. It is not runtime-discovered, and validator compatibility remains unproven until messaging Task 6. - Sample application collaborators consume invocation context through application-core ports and must not import SLF4J/MDC.
Allowed
- Runtime leaves explicitly allowed for this fixture consumer by the
sample-portfolioentry insrc/config/architecture/modules.json; do not duplicate the 19-leaf list here.
Forbidden
- Production code depending on this module — ArchUnit
production_code_does_not_depend_on_sample_portfolio.app-bootstrapreferences it astestImplementationONLY so the ArchUnit suite can analyse the reference implementation (app-bootstrap/build.gradle L21–24). - Production-required behaviour living here: deleting this module must not break the
production build or runtime (the base
GlobalExceptionHandler, envelope, and error-code contract live inadapter:inbound:web/shared-contract). - Treating a sample schema/contribution as an automatically discovered production registry entry, or placing JSON mapper, physical topic, Kafka or bootstrap-server concerns in the contribution.
Test
cd src
./gradlew :sample-portfolio:test