init: 클린 아키텍처 백엔드
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# sample-portfolio — fixture / reference consumer
|
||||
|
||||
## Registered identity
|
||||
|
||||
- Module ID: `sample-portfolio`
|
||||
- Gradle path: `:sample-portfolio`
|
||||
- Focused test: `./gradlew :sample-portfolio:test --console=plain`
|
||||
- Runtime baseline: Java 21; repository framework baseline: Spring Boot 4.0.0.
|
||||
- Registry SSOT: `.harness/project/modules.yaml`.
|
||||
|
||||
Package root: `dev.caskeleton.sample.portfolio`.
|
||||
|
||||
코드 주석에서 덜어낸 **설계 결정의 근거**는 [README.md](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 as `RepoStatsPort`), and reference adapters under `adapter/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).
|
||||
|
||||
## Allowed
|
||||
|
||||
- Runtime leaves explicitly allowed for this fixture consumer by
|
||||
`.harness/project/modules.yaml`; 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-bootstrap` references
|
||||
it as `testImplementation` ONLY so the ArchUnit suite can analyse the reference
|
||||
implementation ([app-bootstrap/build.gradle](../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 in `adapter:inbound:web` / `shared-contract`).
|
||||
|
||||
## Test
|
||||
|
||||
```bash
|
||||
cd src
|
||||
./gradlew :sample-portfolio:test
|
||||
```
|
||||
Reference in New Issue
Block a user