1.7 KiB
1.7 KiB
Reference feature ownership and removal
이 모듈은 제품 도메인이 아니라 새 기능의 수직 경계를 검증하는 제거 가능한 reference implementation이다.
소유 경계
domain: 외부 DTO와 React를 모르는 불변 modelapplication: UI가 호출하는 list/get/create input과 gateway 계약adapters: HTTP executor를 gateway로 투영하는 outbound adaptercontracts: route/API/query contribution, Zod DTO와 request schema, mapperpresentation: route input을 query/form controller로 연결하는 inbound adapter, 독립 form schema/command mapper와 list/detail/form/status page
generic application은 features.get(featureId) catalog만 제공한다. feature hook이
자신의 input shape를 확인하며 page는 HTTP client, storage, auth owner, output
port나 TanStack API를 직접 import하지 않는다.
설치 지점
- 직렬화 계약:
src/features/installed-feature-contracts.js - component/codec:
src/features/installed-feature-runtimes.tsx - bootstrap input 조립:
src/features/installed-feature-adapters.ts
새 기능도 이 세 지점에 contribution을 합성하되 feature ID를 generic application, router나 HTTP client에 하드코딩하지 않는다.
검증과 제거
corepack pnpm test:reference-feature
corepack pnpm test:sample-removal
첫 명령은 URL filter와 query key/HTTP request의 동일성, schema/mapper, 모든 query/mutation/form 상태와 production composition을 검증한다. 두 번째 명령은 임시 복제본에서 이 source/test 디렉터리를 제거하고 installed catalog를 빈 목록으로 재생성한 뒤 typecheck, architecture, registry, unit/integration, home smoke, production build와 source/built fixture ID 잔여 0개를 검사한다.