Architecture

Autional runs as 24 independently deployable Go microservices, organized in a 4-tier architecture with a cross-cutting layer.

Tier 1: Foundation

LayerModulesPurpose
base/base/error, base/config, base/idgenZero-dependency foundation: errors, config loading, ID generation
util/util/jwt, util/random, util/retryUtilities with minimal external dependencies

Tier 2: Infrastructure

ModuleIntegrationPort
infra-client/gormPostgreSQL, MySQL5432
infra-client/redisRedis, Valkey6379
infra-client/messagequeueRabbitMQ, Kafka5672

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.