Architecture
Autional runs as 24 independently deployable Go microservices, organized in a 4-tier architecture with a cross-cutting layer.
Tier 1: Foundation
| Layer | Modules | Purpose |
|---|---|---|
| base/ | base/error, base/config, base/idgen | Zero-dependency foundation: errors, config loading, ID generation |
| util/ | util/jwt, util/random, util/retry | Utilities with minimal external dependencies |
Tier 2: Infrastructure
| Module | Integration | Port |
|---|---|---|
| infra-client/gorm | PostgreSQL, MySQL | 5432 |
| infra-client/redis | Redis, Valkey | 6379 |
| infra-client/messagequeue | RabbitMQ, Kafka | 5672 |
Tier 3: Domain
Shared domain models under micro-share/ and middleware in micro-middleware/.
- middleware: auth (JWT/IP whitelist), app bootstrap, gRPC factory, error handler, audit, tenant resolver
- shared: domain events (600+ event types), RBAC, ABAC, ReBAC, PIM, compliance, wallet, billing, notification
Tier 4: Business Services (24)
Identity (11001)
Profile (11002)
Tenant (11003)
Session (11004)
MFA (11005)
OAuth (11006)
Wallet (11011)
Point (11012)
Audit (11013)
Notification (11014)
Communication (11015)
Storage (11016)
Billing (11017)
Compliance (11018)
Status (11019)
Secret (11020)
SAML (11021)
Pay (11022)
Thirdparty (11023)
Verification (11024)
RBAC (11025)
Gateway (11080)
Hash-standard (gRPC)
Hash-sm (gRPC)
Cross-Cutting
cross/registry/ — ports, error codes, event names, table names, RBAC permissions. Every service depends on this layer.