kra-new/internal/data/README.md

686 B

Data Layer

data owns database clients, persistence models, migrations, configuration watching, and repository implementations.

  • repository/: system repositories and table persistence
  • payment/: payment configuration and payment-order persistence
  • each subpackage owns its Wire ProviderSet; the root package only binds the shared Data infrastructure and aggregates those sets
  • root files: shared database lifecycle, runtime clients, integration-config storage, data-scope auditing, and migration orchestration

Root files intentionally stay in one package because they share Data state and reload locks. Do not split them into packages only to reduce file count.