Developer Portal Service — Domain Model
Version: 1.0 Status: Draft Owner: Product + Developer Relations (DevRel) Last Updated: 2026-04-20 Companion: SERVICE_OVERVIEW · API_CONTRACTS · EVENT_SCHEMAS
1. Intent
Define the aggregates, entities, value objects, and invariants that the Developer Portal owns. The portal is the developer-facing surface for documentation, sandbox, self-serve API key management, consumption analytics, SDK distribution, and the managed Verify API. Identity and key secret material remain in auth-service; this service stores only metadata and orchestration state.
2. Aggregates
- DeveloperAccount — TBD (linked 1:1 with
auth-serviceAccount; profile, default tenant, locale, MFA preference) - ApiKey (metadata) — TBD (env, scopes, label, last-used; secret stored in
auth-service) - SandboxSession — TBD
- VerifySession — TBD (verificationId, channelOrder, currentChannel, attempts, expiresAt, codeHash)
- VerifyTemplate — TBD
- SdkRelease — TBD
- DocsArticle — TBD
3. Entities
- TBD
4. Value Objects
Channel—SMS | VOICE | WHATSAPP | EMAIL— TBDLocale—en | ps | fa— TBDEnvironment—SANDBOX | PRODUCTION— TBDVerifyState—PENDING | DELIVERED | APPROVED | FAILED | EXPIRED— TBD
5. Invariants
- API key secret material is never persisted in
devportalPostgres — onlyprefix+ metadata. TBD - Verify code is stored as
HMAC-SHA-256(code, server-pepper), never plaintext. TBD - A
VerifySessioncannot transition out of a terminal state (APPROVED | FAILED | EXPIRED). TBD attemptsis monotonically non-decreasing within a session. TBD
6. Domain Events
devportal.key.created.v1— TBDdevportal.key.revoked.v1— TBDdevportal.verify.requested.v1— TBDdevportal.verify.delivered.v1— TBDdevportal.verify.approved.v1— TBDdevportal.verify.failed.v1— TBDdevportal.verify.spend_cap_hit.v1— TBDdevportal.sdk.released.v1— TBDdevportal.sdk.downloaded.v1— TBD
7. Aggregate Boundaries
TBD (write boundaries, transactional consistency surfaces, references to other aggregates by id only).
8. Glossary
TBD