Skip to content

ADR-0014: Controller Naming Convention

Status: Accepted Date: 2026-04-04

Context

The platform has two controller categories:

  1. Financial domain controllers (transfers, recharges, withdrawals, exchanges) — naturally split into Command (write) and Query (read) with distinct permission models
  2. Infrastructure controllers (auth, security, profile, constants, workspace, integration) — legitimately mix read and write operations in a single controller

The original ArchRule required ALL @RestController in ..web.. to follow CQRS naming, producing 61 violations in infrastructure controllers.

Decision

  • Financial domain controllers (..web.funding.., ..sandbox.web.., ..sandbox.api..) MUST end with CommandController or QueryController
  • All other controllers may use plain Controller suffix

Consequences

  • ArchUnit rule now enforces CQRS only where the pattern provides value
  • No mass-rename needed for infrastructure controllers
  • New financial controllers must follow *CommandController/*QueryController

Internal Handbook