Files
tech-log-backend/src/adapter/outbound/identifier/CLAUDE.md
T

2.1 KiB

adapter:outbound:identifier — non-IO infrastructure-capability adapter

Registered identity

  • Module ID: adapter-outbound-identifier
  • Gradle path: :adapter:outbound:identifier
  • Focused test (derived from Gradle path): ./gradlew :adapter:outbound:identifier: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.adapter.outbound.identifier.

Design decisions previously kept as code comments (algorithm SSOT, salt origin, build choices) live in README.md.

Responsibility

  • Driven adapters for capabilities with no external-system integration: identifier generation/encoding today, and clock / crypto/random sources by the same rationale (feature-resource-identifier-contract §4 taxonomy).
  • UuidCodec — UUID handling on top of the JDK java.util.UUID (RFC 9562 UUIDv7): normalize(String) accepts a case-insensitive canonical UUID and returns the canonical 36-character lowercase form (D3); toUuid / fromUuid convert between the UUID string and the 128-bit UUID stored in the PostgreSQL uuid column (D10).
  • Kept out of adapter-outbound on purpose: a UUID id/codec capability is infrastructure, not an outbound integration point, so adapter-outbound keeps its documented meaning (external HTTP / messaging / cache / notifications).

Allowed

  • :application-core, :domain-core, :shared-contract (Gradle matrix). Currently only :domain-core + com.github.f4b6a3:uuid-creator are declared in build.gradle.

Forbidden

  • Persistence or web technology (JPA/Hibernate/Spring Data/Spring Web) — ArchUnit identifier_adapter_does_not_depend_on_other_adapters_or_bootstrap; .claude/hooks/ca_import_gate.py G4 가 쓰기 시점에 차단.
  • inbound adapters, persistence adapters, other outbound leaves, or app-bootstrap.
  • External IO (HTTP / messaging / cache / DB) — that belongs in adapter-outbound.

Test

Pure unit tests, no Spring context (UuidCodecSpec).

cd src
./gradlew :adapter:outbound:identifier:test --console=plain