konto

Open source · Rust · for German multi-utilities

Experimental · pre-1.0 · APIs can change between releases

One account. One bill. Right to the cent.

konto is the customer account of a Stadtwerk: electricity, gas, water, broadband and charging on one bill, one ledger and one direct debit. Every bill recomputes from its own inputs, in your browser too.

  • XRechnung 3.0 and ZUGFeRD
  • PDF/A-3b and PDF/UA-1
  • WCAG 2.2 AA portal
  • Exact money, no floats
Rechnung R-2027-000042VK-1000123

Zu zahlen

27,71 €

Strom
105,77 €
Glasfaser
39,99 €
Trinkwasser
13,33 €
Umsatzsteuer
28,62 €
Abschläge
−160,00 €

✓ Stimmt auf den Cent.

A bill that proves itself

This is a real sealed bill, shown by the bill screen of konto's Kundenportal. Press Rechnung nachrechnen: your browser recomputes every line, VAT group and total with the same Rust code that sealed it, compiled to WebAssembly. No server is asked.

Then press Change one amount, as a forger would, and recompute again.

Download the same bill as PDF with the e-invoice embedded or as XRechnung, then read how the bill proves itself.

What konto holds, and what it leaves alone

The sector engines rate electricity, telecom and charging under their own law. konto keeps what the customer has with the company: the party, the contract account, the mandate, the ledger, the bill and the dunning.

One account across sectors

Each engine sends priced charges and its bill section. konto places the sections, derives VAT once per group and seals one bill with one gapless number.

How konto works

Bills that recompute

A SHA-256 digest over a published canonical encoding, and a recompute that names the first line that differs. „Was hat sich geändert?“ explains every change in euros.

The bill

Legal e-invoices

Seller and buyer per § 14 UStG, XRechnung 3.0 in CII or UBL validated before it is written, and one PDF that is archivable, accessible and carries the e-invoice.

Invoices and documents

An exact ledger

Open items per bill and contract, payments allocated by § 366 BGB, a Kontoauszug with a running balance. Decimal money, rounded once.

The ledger

Collections by the engine's terms

Reminders, threats and payment plans follow each sector's own terms. A suspension is a person's decision and the engine's act, never konto's.

Collections

A Kundenportal

A React and Tailwind Kundenportal on mako’s design tokens: what is open and by when, what changed, the Verlauf, sign-in with a passkey or your own customer login, the SEPA mandate and every company of a group in one list. Light, dark and high contrast, checked with axe.

Kundenportal

Where konto sits

  1. Engines ratemako, telco, emob or your own system send rated-charge@1 and their bill sections.
  2. konto billsAssemble, review, confirm: one sealed bill per account and period, booked in the same transaction.
  3. The bill goes outPDF with the e-invoice inside, queued for your mail or print courier; HTML and the account screen for the portal.
  4. Money comes inPayments are allocated, the Kontoauszug updates, and overdue claims follow the engine's collection terms.

Run it in one command

The sandbox starts kontod in memory with two household bills and serves the account screen on your machine.

git clone https://github.com/hupe1980/konto
cd konto
just portal   # → http://localhost:8080/portal/

Or check any bill offline: after cargo install konto, konto check rechnung.json says „Stimmt auf den Cent.“ or names the line that differs.

Get startedThe command line

Or embed the crates

Pure Rust without I/O, clock or floats. The same code seals in the service and recomputes in the browser.

// cargo add konto-bill konto-render
let bill = konto_bill::seal(&request, number, Some(&previous))?;
assert_eq!(konto_bill::recompute(&bill), konto_bill::Verdict::Matches);
let pdf = konto_render::pdf(&bill, None)?; // PDF/A-3b, e-invoice inside
Use the Rust crates