Project Case Study · Affline-Capable Progressive Wab App
Rural Mail Digital Helper
A free, installable Progressive Wab App (PWA) designt an biggit bi Tyson Berry-Wogan fer landwart posties. It combines sauft USPS-NRLCA contract an RRECS answers, a sairchable excerpt librar fer documents, brouser-local prentable wirkin drafts on PS Form 8191 an RRECS evaluation dispute Form 1, an affline USGS/OpenStreetMap route cairtin.
Landwart posties checkin contract terms, gettin ready fer steward discussions, or reviewin route staps unner the Rural Route Evaluated Compensation System (RRECS) face three recurrin obstacles:
1. Findin Citit Contract & RRECS Answers
Quaistens anent Stap 1 grievance deadlines, relief-day pey, seicont trips, coverage factor, an the Rural Route Evaluation Dispute Process (RREDP) span the NRLCA National Greeance, Memoranda o Understandin (MOUs), an USPS manuals. Posties need fest, plain-leid leukups linkit tae specific document titles, page nummeers, an dates.
2. Draftin Grievance & Dispute Forms Privately
Makin a Stap 1 grievance wirkin draft (PS Form 8191) or an RRECS evaluation dispute draft (Form 1) ready fer a union steward involves delicate warker details (names, 8-feegur Employee ID Nummeers, route nummeers, an incident narratives) that need tae bide in the postie's brouser raither nor bein sent tae a server, an lang statements need continuation pages raither nor bein quaitly clipt inside wee PDF form boxes.
3. Mappin Stops & Warkin Affline on Kintra Routes
Landwart delivery routes aften cross airts wi wake or missin mobile coverage. Posties plannin Mailbox, Park point, an Front door steids need a route cairter that hains staps locally in the brouser, links connectit staps, exports portable cairt files athoot makin an accoont, an dounlaids public-domain cairt tiles fer affline reference.
Whit the Product Does (Demonstratit Capabeelities)
Rural Mail Digital Helper organizes fower integratit wirkspaces inside an installable, affline-capable Progressive Wab App:
Supported unanswered public questions can be queued via `/rural-mail-digital-assistant/engine/ask` without generating in engine-open, scheduling up to six read-only cache refreshes 30 seconds apart.
When the engine reports `answer_status: "needs_material"`, the page states that the question is kept on file while looking for supporting material, with no set wait time and no queue promise.
Displays turnaround estimates only from verified completed samples in `flash-turnaround.json` (verified within the last 7 days, deduplicated by `evidence_sha256`), falling back to 7-day `healthz.cache_turnaround` statistics when at least five samples exist and showing an explicit no-estimate message rather than an invented wait time when fewer than five samples exist.
Sairches excerpts athort the NRLCA National Greeance, MOUs, RREDP guides, an postal manuals bi topic, article, or form nummeer.
Hauds quick topic stairters fer Article 15 grievance procedure, PS Form 8191, Rural Route Evaluation Dispute Process (RREDP), an Article 31 requests fer information.
Gives back quotit excerpts alangside their soorce document titles, page nummeers, an dates (excerpts anly, no full-document dounlaids).
3. Browser-Local Printable Form Drafts (`#tools`)
Issue Quaistenar & Wirkin Draft: Builds a steward preparation checklist and an escaped-text worksheet that can be printed or downloaded as `.txt` without clipping long entries.
Authentic PS Form 8191 Draft (Mairch 2007 — EIN Edeetion): Uses locally vendored `pdf-lib`, `@pdf-lib/fontkit`, and `DejaVuSans.ttf` (`ps8191.js`) to fill the authentic blank AcroForm entirely in the browser. Enforces explicit bounds (100,000 characters per entry; 400,000 across the draft), carries overflow onto labelled continuation pages on whole Unicode code-point boundaries, validates Item 1b EIN as 8 digits or blank, checks glyph coverage against embedded DejaVu (Latin, Greek, Cyrillic, accents, and typographic punctuation), and immediately detaches the PDF blob if any field changes.
Recreatit RRECS Evaluation Dispute Form 1 Draft (Ochtomber 2026): Fills a recreated vector PDF layout (`rrecs-form1.js`) in the browser, preserving leading zeros on plain-text phone, installation, finance-number, and ZIP fields, with independent checkboxes for Office Time, Route Time, and Street Volume Time.
4. Interactive Offline Route Mapper (`#map`)
Lazy-laids locally vendort Leaflet 1.9.4 wi fower base layers: Street (OpenStreetMap), Satellite (USGS National Map imagery wi labels), Aerial (USGS imagery-anely orthoimagery), an Topo (USGS National Map).
Pits colour-codit Mailbox (`#15803d`), Pairk pynt (`#7c3aed`), and Fore door (`#eab308`) pins with optional user names (up to 140 UTF-16 code units, keeping leading zeros such as `007`), undo last placement, and click-to-undo mode.
Connect Mode: Links a mailbox, a park point, and a front door in order with an optional verbatim box number (up to 40 characters), computing geodesic (haversine) straight-line distance estimates and displaying a proximity advisory when a mailbox is under 5 feet (`1.523999 m`) from another stop.
Affline USGS Tile Packs & Portable Files: Downloads USGS Satellite or Topo tile packs (up to 6,000 tiles, zoom ≤ 16) into Cache Storage (`helper-tiles-v1`) with parallel fetch, retry, cancel/sweep cleanup, and dateline (`±180°`) wrapping. Checkpoints working maps (`nrlca_route_map_working_session_v1`), saves named routes in `localStorage`, records foreground-only GPS location trails, and exports/imports strict `nrlca-map/v1` and `nrlca-map/v2` portable JSON files plus GeoJSON and print summaries.
Tyson’s Role
Tyson Berry-Wogan conceived, designed, and built Rural Mail Digital Helper (`/rural-mail-digital-helper/`) and its companion three-minute interactive walkthrough demo (`/nrlca-demo/`).
Client-Side PDF & Typographie Ingineerin: Built `ps8191.js` and `rrecs-form1.js` to render printable working drafts on the March 2007 PS Form 8191 AcroForm and the recreated October 2026 RRECS Form 1 vector layout directly in the browser, with surrogate-safe Unicode code-point wrapping, pre-build glyph validation, continuation page layout, and SHA-256 vendor provenance verification (`vendor/ps8191/PROVENANCE.json`).
Geospatial & Portable Schema Desing: Authored the `nrlca-map/v1` and `nrlca-map/v2` JSON Schema 2020-12 contracts and portable JavaScript codecs (`shared/map-portable-v1.js`, `shared/map-portable-v2.js`) shared between the web helper and native iOS/Android mapping parsers, including strict unknown-field refusal, dateline unwrapping, and non-destructive legacy route migration.
Atomic PWA Service Wirker Architectur: Engineered the v6 atomic generation service worker (`rural-mail-digital-helper/sw.js`) that stages and validates the 30 `SHELL` entries—verifying MIME types, format magic signatures, and 22 pinned SHA-256 hashes—into a new immutable generation cache (`helper-shell-v6-g-<build>`) before updating the `__selected_generation__` pointer, without deleting the previously selected generation during publication so a failure at any promotion step keeps the old verified shell live and serving.
Applikation Screenshots & Veezual Assets
The images below are the existing raster visual assets committed in the repository for Rural Mail Digital Helper: the walkthrough interface capture (`/posters/nrlca-demo.webp`) and the standard and maskable Progressive Web App icons (`/rural-mail-digital-helper/icons/icon-512.png` and `/rural-mail-digital-helper/icons/maskable-512.png`), which depict the three connected stop types used in the route mapper.
Walkthrough Capture — Sauft RRECS Answer & Document Citations
Interface capture (`/posters/nrlca-demo.webp`, 720×480) showing the Ask workspace returning a cached answer on the Rural Route Evaluation Dispute Process (RREDP) with document page citations and verification notices.
Progressive Wab App Icon — Connectit Route Staps
Standard 512×512 PNG application icon (`/rural-mail-digital-helper/icons/icon-512.png`, SHA-256 pinned in `sw.js`) illustrating three linked route stops along a mapped path.
Maskable Hame-Screen Icon — Android & PWA Safe-Zone Asset
Full-bleed 512×512 maskable icon (`/rural-mail-digital-helper/icons/maskable-512.png`, SHA-256 pinned in `sw.js`) referenced by `manifest.webmanifest` for adaptive mobile home-screen installation.
Limitations, Setup, Privacie & Platforms
Rural Mail Digital Helper enforces strict legal, technical, an privacie boonds sae posties an stewards ken whit the tuil daes an daesna dae:
No an Offeecial Union or USPS Seestem
Rural Mail Digital Helper is an unthirlt eddication an plannin eed—no a soorce o truth—an mauna be citit as ane. Aye verify praisent contract documents an speak wi a union steward afore filin deadlines.
Wirkin Drafts Anly (Niver Signed or Filed Here)
Makin or prentin a wirksheet, PS Form 8191 draft, or RRECS Evaluation Dispute Form 1 draft maks a wirkin draft fer steward review anly; it is niver signt, filed, or submittit here. Management statements, timeliness assessments, dispositions, an signatur lines are intentionally left blank. The October 2026 RRECS Form 1 is a recreatit vector ootlay, no an offeecial USPS original.
Brouser-Local Forms & Route Hainin
Form entries run in the browser: they are not sent anywhere, not logged, and not saved by the site. Unsaved route pins stay in the current page; working map checkpoints (`nrlca_route_map_working_session_v1`), named saved routes (`nrlca_route_map_saved_routes_v1`), and downloaded offline tile packs (`helper-tiles-v1`) are stored only in that browser profile on that device (up to 500 pins, 500 connections, and a 4 MiB checkpoint JSON cap) and are not uploaded or synced. No user account is created, anyone using the same browser profile may be able to see saved local storage, and clearing browser site data removes local routes.
The cairt uises OpenStreetMap an USGS National Map tiles—no the offeecial USPS Digital Point Mapping (DPM) cairt—an its Mailbox, Park point, an Front door preens are personal plannin labels, no offeecial DPM seembols or RRECS meisurments. Drawn lines an Connect distances are geodesic straucht-line estimates, no road-snappit mileage, delivery time, or RRECS credit. Per the OpenStreetMap Foundation tile uusage policy, OSM Street tiles are niver prefetched or bulk-dounlaidit; affline packs cache anly public-domain USGS Satellite or Topo tiles (tae zoom 16, cappit at 6,000 tiles per route).
Foregrund Steid Recordan Anly
Steid permission is spiert fer anly whan the uiser clicks Uise ma steid or Stairt location recordin. Trail recordin rins anely whiles the page is visible (up tae 10,000 recordit fixes/segments); hidin the tab, switchin apps, lockin the screen, or a provider gap ower 30 seconds pauses recordin an merks a segment brak. Browser an phone GPS poseetions are approximate.
Platforms, Affline Scope & Android Test Big
Runs on desktop and mobile browsers (Web, iOS, Android) and installs as an offline-capable PWA. Saved routes, pins, Connect links, and local draft forms work offline once cached; asking new questions, searching the document library, and viewing undownloaded map areas require a network connection. Interactive helper features require JavaScript enabled. The Route Map section also offers a signed Android test APK (`RuralMailDigitalHelper-Android-1.0.1-native-20261016-debug.apk`, 58.4 MiB, Android 8.0+, with SHA-256 checksum), explicitly labelled as an October 16 test candidate—not a Play Store release or the newer marker-guard source—where phone compatibility, saved-map recovery, and background/locked-screen GPS still require device verification.
Neist Action — Epen the Helper or Watch the Walkthrough
Lauch Rural Mail Digital Helper richt in yer brouser (or instaw it tae yer hame screen), loup tae a specific tuil, or watch the three-meenit interactive walkthrough demo: