Skip to content

System Architecture Overview

Aether is built on hexagonal architecture (ports and adapters) with strict constitutional governance ensuring maintainability, testability, and long-term system integrity.

The system is organized into four distinct layers with clear boundaries:

UI LayerApplication LayerCore DomainInfrastructure Layer

  • Core Domain: Pure business logic, zero external dependencies
  • Application Layer: Orchestrates domain logic for use cases
  • Infrastructure: Implements repository interfaces using Prisma
  • UI Layer: React components, Next.js pages, tRPC queries

Plugins are completely isolated from the web application:

  • No direct imports from apps/web/src
  • All shared UI from @aether/ui
  • Extension-only interface
  • Database independence

User → tRPC query → Application service → Repository interface → Prisma → Database

User → tRPC mutation → Application service → Domain entity validation → Repository → Database → Event dispatch

  1. Testability: Pure domain logic is easy to test
  2. Maintainability: Clear boundaries make changes predictable
  3. Flexibility: Swap infrastructure without touching domain
  4. Plugin Safety: Isolated plugins cannot break core system
  5. Long-term Stability: Constitutional rules prevent architectural decay