Skip to content

C4 Level 3 -- Accounting API

Simplified after extracting event logic. Only handles Folio/Fiken calls.

C4 Level 3 -- Accounting API

Clean Architecture Layers

Controllers

Endpoint Purpose
GET /folio/balance Account balances
GET /folio/transactions Events with attachments
GET /folio/missing-receipts Transactions without receipts
GET /fiken/invoices List invoices
GET /fiken/expenses List expenses

Domain (Entities) — No I/O

Component Responsibility
AmountCalculator VAT calculations — net/gross/VAT split

Adapters

Adapter Implements External System
FolioGateway IFolioGateway Folio API v2
FikenGateway IFikenGateway Fiken API v2

What Moved to Event Store API

  • ProposeUseCase, ReviewUseCase (Use Cases)
  • ConfidenceScorer, PolicyValidator (Domain)
  • EventStoreAdapter, PatternStoreAdapter (Adapters)
  • Proposal/Review/Check endpoints (Controllers)