Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aurora-ledger

Aurora — accounts, postings and authorisation holds (Go 1.25 / Gin, port 9003).

Domain slices

Folders are business domains, not technical layers.

Slice Responsibility
internal/account ISO-4217 currencies with minor-unit scales, money arithmetic, account registry and posting eligibility
internal/posting Double-entry entries and transactions that must net to zero, plus the append-only journal
internal/balance Running balance projection for one account and the reported snapshot
internal/settlement Scheme batching at the cut-off and the ledger.settled event producer
internal/hold Authorisation hold lifecycle, expiry sweep and the HTTP surface
internal/identity Outbound client for the customer projection
internal/notification Outbound client for templated customer messages

HTTP surface

Verb Path
POST /api/v1/ledger/holds
GET /api/v1/ledger/balance
GET /api/v1/ledger/postings
POST /api/v1/ledger/settle
POST /api/v1/ledger/release

Outbound dependencies

  • GET http://aurora-identity/api/v1/customers/profile
  • POST http://aurora-notifications/api/v1/notifications/dispatch
  • Kafka producer on topic ledger.settled, written when a settlement batch closes.

Invariants

  • Every committed transaction balances: debits and credits net to zero.
  • Amounts are always minor units, carried together with their currency.
  • A hold lapses after AuthorisationWindow; lapsed holds free their reservation.
  • Batches close at MaxBatchItems and publish exactly one settlement fact.

About

Aurora demo: accounts, postings and authorisation holds (Go)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages