
A self-hosted Flask app that archives Loyverse POS receipts beyond the free plan's 30-day limit and generates monthly Z-reports as PDFs — fully containerised and configurable from a web UI.
The challenge
Loyverse's free plan only exposes 30 days of transaction history. Any older receipt becomes permanently inaccessible, making it impossible to produce monthly Z-reports, reconcile sales, or meet tax requirements. The paid plan is disproportionately expensive for a single-location shop.
The solution
A self-hosted Flask app that runs a daily sync job pulling the last 48 hours of receipts from the Loyverse API into MongoDB, building a permanent archive. A separate scheduler generates a PDF Z-report at month end and optionally delivers it via email and Telegram. Everything is configurable from the web UI — no file editing after initial setup.