Repository navigation
Releases
v3.10.0 — one-click report downloads in the live WebAssembly demo, suite 5,584 checks
The reports just left the terminal — even in the browser.
Added
- Report downloads in the live WebAssembly demo — the browser build now hands every report the program saves (manager options 18-21) to the demo page: the file appears under the terminal as a one-click download chip (name + size) with a toast, and downloads as a real
image/png/application/pdfBlob. The hand-off is a tinyEM_JSbridge that copies the bytes out of the WASM heap — the C++ paths (renderers, writers, the consolidated PDF) are the exact ones the desktop binary uses, so nothing is re-implemented in JavaScript. - WASM smoke test extended — the Node session now logs in as the manager, saves the consolidated PDF (option 21) and asserts the hand-off end to end: exactly one offer, the right file name,
%first byte, size > 800 KB.
Suite: 5,584 checks, 0 failures · Try it: open the live demo, log in as admin / manager123, run option 21 — the PDF chip appears under the terminal.
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
v3.9.0 — consolidated PDF report (option 21) + binary REST report endpoints, suite 5,584 checks
The roadmap's next two steps landed together — one printable file for everything, and the reports on the wire.
Added
- Consolidated PDF report (manager option 21) —
reports/all_reports_YYYY-MM.pdf: a cover page (title, month, contents) plus one full page per report — monthly, loyalty, dashboard. The pages are embedded straight from the samepng::render*functions the PNG files use, so file, image and screen can never drift apart. The writer is hand-rolled like everything else here: objects, xref, trailer — still zero dependencies, and the bytes are fully deterministic (no timestamps), which the suite pins. - Binary REST endpoints —
GET /reports/monthly.png,/reports/loyalty.png,/reports/dashboard.pngand/reports/all.pdfserve the very same rasters from memory (image/png/application/pdf), with the same 400/404 parameter discipline as the JSON routes. - Renderer refactor — Png now exposes
render*builders +encodePng; TUI, PDF and REST share one code path per report. - 22 new suite checks (5,562 → 5,582... make that 5,584): PDF structure (4 pages, 3 embedded images, xref/trailer, byte determinism), invalid-month rejection, and every binary endpoint over the seeded fleet.
Suite: 5,584 checks, 0 failures · Try it: admin / manager123 → option 21, or curl -s -o dashboard.png "http://127.0.0.1:8080/reports/dashboard.png" after --serve.
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
v3.8.0 — loyalty overview + analytics dashboard as PNG (options 19/20), suite 5,562 checks
Two more roadmap screens become real images — same numbers, same zero dependencies.
Added
- Loyalty overview as PNG (manager option 19) — the program snapshot (totals, top member, members per rank as bars) as
reports/loyalty_overview.png, built from the sameLoyaltyOverviewthe console screen renders, so the image and the screen can never drift apart. - Analytics dashboard as PNG (manager option 20) — the same
AnalyticsReportthe screen shows (fleet composition, price buckets, active bookings per car, waitlist depth, upcoming pickups, chase-up footer) asreports/dashboard.png. Both ride the v3.7.0 hand-rolled encoder: no image library anywhere. - API contract hardened: every PNG writer now clears
errorOuton success — a stale error message can no longer leak into a later call's status line. - 14 new suite checks (5,548 → 5,562): both new rasters (deterministic bytes, PNG signature, empty-state renders still valid) plus the dashboard slices verified against a live booking made in the test.
Suite: 5,562 checks, 0 failures · Try it: log in as admin / manager123, pick 19 or 20 — or docker run -it ghcr.io/abolfazlrwm/car-rental-system and do the same.
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
v3.7.0 — monthly report as PNG + read-only REST API (--serve), suite 5,548 checks
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 — intoreports/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=Nand/monthly?year&monthas 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 reportsserve()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,/carsand/monthlyagainst a live--serveprocess 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
v3.6.0 — Persian UI (--lang fa) + Docker/GHCR images, suite 5,500 checks
Two roadmap items ship together: the console app now speaks Persian, and it runs anywhere Docker runs.
Added
- Persian interface (
--lang fa) — the whole interactive layer (menus, prompts, tables, reports) speaks Persian through a newmanager_system/I18nstring table (~260 English-keyed entries) with a graceful English fallback for every string the suite pins. The choice persists indata/lang.txt;--lang enswitches back. The default stays English and--help/--version/ the guided demo always speak English, so the CI contract greps stay byte-stable. - Docker + GitHub Packages — a two-stage Dockerfile ships the app as
ghcr.io/abolfazlrwm/car-rental-system(multi-arch amd64 + arm64,latest+ per-release tags), published by a newdocker.ymlworkflow with a version smoke test:docker run -it ghcr.io/abolfazlrwm/car-rental-system. - 24 new suite checks —
--langparsing (both flag forms + usage error) and the I18n table (fallback, translation, unknown languages, persistence round-trip) are pinned; the suite grows 5,476 to 5,500 checks, still 0 failures.
Changed
- README: Persian UI + Docker sections; suite badge 5,500 checks; the repo description and topics follow the same story.
- Windows console builds set the UTF-8 output code page and MSVC compiles with
/utf-8, so Persian screens print correctly there.
Suite: 5,500 checks, 0 failures · Coverage: 92% line coverage · Try it: ./car_rental --lang fa — or docker run -it ghcr.io/abolfazlrwm/car-rental-system.
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
v3.5.0 — Android/Termux + macOS Intel, the 7-asset platform matrix
Platform-complete release: one binary story for Windows, Linux, macOS (both CPU architectures), Android/Termux and the browser.
Added
- Android / Termux asset — a fully static ARM64 build (
car_rental-android-arm64.tar.gz, ~0.9 MB, zig + musl): copy it to Termux and run — no packaging, no dependencies, no install step. CI cross-compiles it and smoke-tests the binary under qemu (version banner, seeded fleet, clean Exit). - macOS split by architecture —
car_rental-macos-arm64.tar.gz(Apple Silicon, native runner) andcar_rental-macos-x64.tar.gz(Intel, zig cross-compile) replace the singlemacos.tar.gz. - The release matrix is now seven assets: Windows x64, Linux x64, Linux ARM64 static (also for Raspberry Pi-class boards), macOS arm64 + x64, Android ARM64 static, and the WebAssembly browser bundle — one download story for every platform, plus the in-browser demo that needs nothing at all.
Changed
- LICENSE copyright years (2025–2026); the repo description and topics now reflect the 5,476-check suite and the platform matrix.
Suite: 5,476 checks, 0 failures · Coverage: 92% line coverage · Try it: ./car_rental --demo — or press ▶ Auto-play on the live demo.
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
v3.4.0 — guided demo (--demo), PBKDF2 password hardening
Two heads this release: a guided demo that makes the product explain itself, and a hardening of password storage.
Added
- Guided demo (
--demo) — the binary now explains itself: one narrated, self-playing walkthrough of a full shift (book → change-a-booking → deliver → late return with penalty → manager income & monthly reports), built on the samereadLine()a human types into. Dates derive from today's clock so the booking is always fresh; the fleet is fresh and in-memory, so./datais never read or written; narration banners separate the beats. One implementation serves desktop and browser (thread sleep vs Asyncify sleep), and the demo page grows a ▶ Auto-play demo button that starts the program with the same flag. CI plays the demo on every push — which also locks the script to the menus (any drift fails the build). - docs/DESIGN.md — why each data structure was chosen and the complexity trade-offs behind them.
Security
- Password storage upgraded from
SHA256(salt + password)to PBKDF2-HMAC-SHA256 (RFC 2898) over 100,000 iterations, built on the repo's own SHA-256 primitive (HMAC per RFC 2104) — no new dependencies. - The per-user salt is now 16 raw bytes from the OS CSPRNG (
std::random_device), hex encoded; the old code seeded an mt19937_64 generator from it, which is not CSPRNG output. verifyPassworduses a byte-wise constant-time comparison.- Known-answer vectors (independently computed with Python
hashlib.pbkdf2_hmac) pin the derivation in the test suite. - Migration note: rows in
users.csvwritten by older versions used the single-hash format and will no longer verify; reset those passwords (they re-derive on nextsetPassword).
Fixed
- CI: clang-format cleanups at the new SHA-256 call sites; the gcovr coverage job tolerates suspicious-hit quirks so coverage stays green.
- The suite lowers the PBKDF2 iteration count through a clamped test hook (
User::setIterationsForTesting) — its hundreds of login attempts no longer run at the production 100,000 iterations, taking the AddressSanitizer job from ~30 minutes back to seconds; the constant-time comparison also no longer reads past the shorter string's bytes. - The GitHub Pages deploy now rebuilds the embedded WebAssembly demo binary at deploy time (emsdk,
make wasm) and triggers on source changes, so the live demo — including the ▶ Auto-play button — always runs the current HEAD, never a stale bundle.
Suite: 5,476 checks, 0 failures · Coverage: 92% line coverage · Try it: ./car_rental --demo — or press ▶ Auto-play on the live demo.
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
v3.3.1 — coverage 92%, version gate, fresh demo GIF
Quality & release-infrastructure round: the suite's line coverage is now measured, gated and published, a version-consistency gate protects every future release, and the README hero animation is re-recorded from the live WebAssembly demo.
Added
- Unit-test coverage, measured and published — a new
make coveragetarget builds the suite with GCC--coverageinstrumentation, runs ctest and writesbuild-cov/coverage.txt+ a Cobertura XML via gcovr: 92% line coverage across themanager_systemmodules and headers (the interactive console layer is proven by the CLI-contract job). A CI job re-proves it on every push and publishes the per-file report as a build artifact. - Version-consistency gate —
scripts/check_versions.shfails the build if the CHANGELOG release heading, the CMakeproject()version,CITATION.cffand the app's--versionstring disagree; CI runs it on every push, so a release can never ship with mismatched versions. - Fresh demo GIF — the README hero animation is re-recorded from the live WebAssembly demo (book → change-a-booking → deliver → late return with penalty → manager income & monthly reports), so it shows the v3.x features instead of the v2-era build.
.editorconfig— shared editor basics (UTF-8, LF, indentation per file type) for every contributor.
Changed
- The Emscripten smoke test in CI now runs through
make wasm-test— the same recipe contributors can run locally — instead of an inline compiler invocation. - README: table of contents, a coverage badge, the stale test count in the suite transcript (5416 → 5435) and new
makeone-liners. - Landing page: a 92% line coverage badge next to the 5,435-checks chip.
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
v3.3.0 — the open-the-box release: try the real binary in your browser
Car Rental System v3.3.0 — the open-the-box release: try the real binary in your browser.
Live browser demo
- Run it now — the same
mainApp.cpp+manager_system/*.cppcompiled to WebAssembly (Emscripten 3.1), booting into an xterm.js terminal on the project's GitHub Pages. Same menus, same hand-built AVL tree, hash table and priority queue, same audit trail — an in-memory fleet seeds itself on load, so every reload is a fresh start - The desktop build only swaps the input backend of
readLine: the browser build waits for a full line throughemscripten_sleep(Asyncify), so the program never spins and never sees EOF;make wasmreproduces the bundle - Demo accounts:
admin / manager123·sara / staff123·ali / customer123
CLI
--no-colorand theNO_COLORenvironment variable (no-color.org) — plain output for pipes, logs and CI, through a new pure parsing modulemanager_system/Cli.h:--help/-h,--version/-vwith documented precedence, unknown options failing while naming the argument--helpnow points at the browser demo
CI & community
- The OS matrix the README promises is now proven on every push: Linux + macOS + Windows (MSVC included) with CMake and ctest
- CodeQL static analysis (cpp) weekly and on PRs
- Every version tag now builds release assets automatically: native binaries for the three OSes plus the WebAssembly demo bundle
- A clang-format check joins the suite (
make formatapplied repo-wide, clang-format 23) - Issue/PR templates +
CITATION.cfffor coursework citations
Tests
- Suite grown from 5,416 to 5,435 checks (+19) — new suite "Cli: argument parsing" — plus the CLI contract asserted end to end in CI
- Still zero dependencies, still leak-free under ASan + UBSan
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
v3.2.0 — change a booking: move plans, don't cancel them
Car Rental System v3.2.0 — change a booking: move plans, don't cancel them.
Change a booking
- Customer menu option 13 moves ONE booking to a new window, or shifts a WHOLE series: the next pickup lands on the date the customer types and the rest keep their plan spacing and length
- The move is availability-checked with the booking lifted out of the schedule first — its old slot never stands in the way of its own new dates
- A refusal — an overlapping range, new dates in the past, a pickup whose day has passed, a booking already handed over — leaves everything untouched and says exactly why
- Series moves are atomic like their creation: one clashing occurrence moves nothing and the error names it (
Occurrence 3) - The rental that is out right now cannot move — you cannot un-drive a car — and its served window still blocks every move onto it
- The id and the arrival order survive: only the two date columns change, the price is re-quoted on screen with the current rank, the reminders (3.1.0) follow the new dates on their own, and both moves land in the audit trail as
reservation.moved/recurring.moved - No file format changes — a move edits two date columns in place
Tests
- Suite grown from 5,258 to 5,416 checks (+158) across two new suites: "Reschedule: change-of-plans move rules" (a pickup due today can still move, the past never can, sane new windows only) and "RentalManager: change-a-booking flow" (end to end: the move itself, the same-range self-move that must not clash with itself, unknown and foreign ids, a clashing new range refused with the booking untouched, moves into the past, a pickup due today, the handed-over booking and its served window, the stale never-served pickup, a series shift with spacing kept, the zero-shift refusal, the atomic series clash, ownership and the customer gate, and the move surviving save/load)
- Still zero dependencies, still leak-free under ASan + UBSan
Full changelog: https://github.com/Abolfazlrwm/Car-Rental-System/blob/main/CHANGELOG.md
