Skip to content

v3.7.0 — monthly report as PNG + read-only REST API (--serve), suite 5,548 checks

Choose a tag to compare

@Abolfazlrwm Abolfazlrwm released this 23 Nov 08:45
· 6 commits to main since this release

Two more roadmap items land: the monthly report becomes a real image, and the core grows a REST face.

Added

  • Monthly report as PNG (manager option 18) — a dependency-free PNG encoder (hand-rolled CRC32, Adler32 and STORED-deflate zlib framing; glyphs rasterised from DejaVu at build time into PngFont.h) renders the same numbers as the screen — figures plus per-car and per-day bars — into reports/monthly_YYYY-MM.png. No image library anywhere.
  • Read-only REST API (--serve [port]) — a hand-rolled HTTP server bound to 127.0.0.1 (POSIX sockets / Winsock, still zero dependencies) exposing /health, /version, /cars, /cars/{name}, /cars/{name}/reservations, /stats, /loyalty, /audit?limit=N, /pickups?days=N and /monthly?year&month as JSON. GET-only by design: mutations stay in the TUI where every change is validated, priced and audited interactively. The pure router is unit-tested without sockets; the wasm build compiles the router but reports serve() unavailable.
  • 48 new suite checks (5,500 → 5,548): CRC/Adler known vectors, PNG byte-level validity (signature, IHDR geometry, chunk CRC, IEND), deterministic report bytes, request-line and query parsing, every endpoint's status and body, wire serialisation, and a regression net pinning the FA translation of the three big menus.
  • CI: a REST smoke job curls /health, /cars and /monthly against a live --serve process on every push.

Fixed

  • v3.6.0 regression: the i18n byte-splitter could swallow a space at a chunk boundary, corrupting some table keys so the FA menus silently fell back to English. The table is rebuilt from a canonical list with a space-preserving splitter, and the suite now pins the three menu translations so this class of bug cannot ship again.

Suite: 5,548 checks, 0 failures · Try it: ./car_rental --serve 8080 then curl -s http://127.0.0.1:8080/cars — or docker run -p 8080:8080 ghcr.io/abolfazlrwm/car-rental-system --serve.

Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md