Skip to content

What you get ​

The repository is a monorepo that packages a complete billing stack you can run yourself.

Application modules ​

Thirteen NestJS domain modules plus a web app and a mock suite. Each module owns its PostgreSQL database and talks to others only through internal HTTP APIs and events (transactional outbox → CDC → NATS JetStream).

ModuleResponsibility
ParticipantsRegistry, readiness, terms, community settings
Trade intakeSettled trades from market / data space (or mock)
SettlementBilling runs, netting, threshold, carry-forward
InvoicingSelf-billing invoices (Stripe Invoicing in V1)
PaymentsConnect accounts, KYC, payment methods, webhooks
ReconciliationInvoice ↔ payment and market checks
ReportingRead models, KPI export, operator traces
PublicationOutbound billing events to the data space
NotificationE-mail / alerts (Mailpit locally)
ComplianceAudit, retention, data-subject requests
Reference dataFX / VAT reference
SchedulerTemporal workflows and timers
Web appReference UI on the public API only

See Modules for the directory map.

Platform pieces (reference packaging) ​

The deploy/ tree shows one way to run the stack on Kubernetes:

  • API gateway (Apache APISIX)
  • Identity (Keycloak)
  • Messaging (NATS JetStream) + Debezium
  • Workflows (Temporal)
  • Secrets (OpenBao + External Secrets Operator) — replaceable
  • Observability (OpenTelemetry / Prometheus / …)

You may substitute equivalent components (another gateway, IdP, vault, GitOps engine) as long as the module contracts stay satisfied.

What is not included ​

  • Production Stripe live-mode go-live runbooks for your legal entity
  • Grid / DSO billing
  • Crypto or AMM payment rails
  • A mandatory cloud vendor — the reference charts assume generic Kubernetes APIs

Horizon Europe INTELLIGENT (GA 101160678) · Task T5.6 · Deliverable D5.5