KSeF integration hub
A hub that has already moved several million invoices to and from KSeF, Poland's national e-invoicing system. Business systems hand invoices over to it and it takes care of the rest. I built the hub, from the API and workers to the panel. It submits sales invoices (one by one and in batches), downloads purchase invoices, collects official receipts (UPO) and QR codes, generates PDFs and reports statuses back to the systems that asked. Every XML is checked against the FA(3) schema before it goes anywhere, and a few safeguards make sure the same invoice is never sent twice. Most of the work is asynchronous: queues, background jobs and retries that respect the KSeF API limits. At this scale a fair bit of time also went into query optimisation, because tables with millions of rows are quick to expose any query written in a hurry.