Skip to navigation

Component Layering (Clean Architecture)

View as Markdown

Used in: §9.1 API overview, §10.2 IDAClient, §14.x developer onboarding Audience: Backend Developer, DevOps IA ID: extra (referenced indirectly by §1.5)

pkg/* reusable HTTP request Middleware (auth, logging, ratelimit, RBAC) handler/* (DID, VC, Agent, ZKP, ...) service/* (business logic) repository/* (pgx) PostgreSQL Redis ADI chain registries crypto (Ed25519, secp256k1) did (resolver, doc builder) credential (sign, verify, status list) zkp (Airbender adapter) blockchain (ethers-go bindings) didcomm (envelope, pack/unpack)

Reading guide: Handlers never touch repositories or the chain directly. All chain calls flow through pkg/blockchain; all crypto goes through pkg/crypto. This is what doc-writer should reference when explaining the request lifecycle in §9.1.