RELEASE PLAN — PHASE 14
VietGara — Advanced Printing & Templates
Version 14.0 — October 9, 2026 · Cloud: Google Cloud Platform (GCP) · Backend: Go
1. Introduction
- Counter: print a receipt on the thermal printer next to the till, from the phone or from the web.
- Stock room: print barcode labels for received goods.
- Garage owner: design the quote, voucher and slip templates without a developer.
Web browsers cannot discover printers, so the web uses the print dialog (Release 10.0) or the print agent below; the mobile apps discover printers on the garage Wi-Fi.
2. Overview of the 3 Releases
| Release | Name | Main Modules | Demoable Value |
|---|---|---|---|
| 14.0 | Thermal & LAN Printing | Document/Print, mobile apps | K80/K57 receipts and labels from the phone to a network thermal printer |
| 14.1 | Print Agent | Print agent, Document/Print | Silent printing from the web console to the garage’s printers |
| 14.2 | Template Designer | Document/Print, web console | A garage designs its own quote, voucher and slip templates |
3. Release Details
Release 14.0 — Thermal & LAN Printing
- Thermal templates (FR-DOC-06): K80 (80 mm) and K57 (57 mm) roll-paper templates for payment vouchers and quick quotes, rendered as ESC/POS from the same print model as Release 10.0.
- Mobile LAN printing (FR-DOC-07):
- the Flutter apps discover printers by mDNS (
_ipp._tcp,_pdl-datastream._tcp,_printer._tcp) and always offer manual IP entry, because many inexpensive printers do not advertise; - printers are stored per garage (name, address, protocol, paper size, default document types) and tested per device;
- thermal printers receive ESC/POS over TCP 9100, A4 printers receive IPP;
- iOS needs the local-network permission and declared Bonjour services.
- the Flutter apps discover printers by mDNS (
- Web: browsers cannot discover printers, so the web keeps the print dialog (Release 10.0) or uses the agent of Release 14.1.
- Definition of Done: from a phone on the garage Wi-Fi, a payment voucher prints on a K80 thermal printer found automatically and on one entered by IP; a K57 template prints without clipping.
- Barcode labels (FR-INV-13). Small-label templates (for example 50 x 30 mm) print a part’s name, SKU and barcode on the thermal printer, from the part and from a goods receipt, so received goods can be labelled.
Release 14.1 — Print Agent
- Agent (FR-DOC-08): a small Go service installed on a garage PC (Windows first). It lists the PC’s printers from the operating system’s spooler, keeps an outbound secure WebSocket to VietGara, signs in with a garage-bound key, and prints jobs (PDF or ESC/POS) without a dialog.
- Backend and web console: agent pairing, the printers it reports, a “print to” choice per document type, job status and failure messages.
- Security review: the agent only accepts jobs for its own garage over an authenticated connection, never opens an inbound port, and stores nothing but its key and a short job queue. The review is part of the release.
- Definition of Done: from the web console a voucher prints silently on the thermal printer attached to the counter PC; a lost connection queues the job and prints it on reconnection; revoking the agent key stops it.
Release 14.2 — Template Designer
- Renderer. Add an HTML renderer behind the template interface of Release 10.0: a headless-Chromium PDF service (for example Gotenberg) rendering sanitized HTML produced from the template, so the web preview and the PDF are identical. The built-in Go templates keep working.
- Designer (FR-DOC-09, FR-DOC-03). A constrained block designer, not free HTML:
- blocks: header with logo and legal details, party block, items table with chosen columns, totals, payment details, notes, footer;
- fields come only from a whitelist of the print model; fonts, sizes, margins and colours are options;
- paper size A4 or A5 (K80/K57 stay built-in);
- templates are versioned; publishing creates an immutable version and printed documents keep the version they used;
- a live preview with sample data, and “restore the default”.
- Security. The layout is stored as validated JSON and rendered through an escaping engine; no scripts, external URLs or arbitrary CSS are accepted.
- Definition of Done: a garage designs a quote template with its logo, a different column set and footer, previews it, publishes it, and a quote prints with it on A4; an older quote reprinted keeps its original template version.
4. Dependency Diagram
flowchart TD P13(["Phase 13 complete"]) --> R140["Release 14.0<br/>Thermal + LAN printing"] R140 --> R141["Release 14.1<br/>Print agent"] P13 --> R142["Release 14.2<br/>Template designer"] R141 --> DONE(["Phase 14 complete"]) R142 --> DONE
The agent follows the thermal templates because it carries the same ESC/POS output to the web. The designer is independent and builds on the template registry of Release 10.0.