Case Study ti Proyekto · Offline-Capable a Progressive Web App
Rural Mail Digital Helper
Maysa a libre ken mabalin a mai-install a Progressive Web App (PWA) a dinisenio ken inaramid ti Tyson Berry-Wogan para kadagiti rural letter carrier. Pagsasamayenna dagiti naidulin a sungbat iti kontrata ti USPS-NRLCA ken RRECS, maysa a masapsapul a library ti excerpt ti dokumento, dagiti maimprenta a working draft iti browser-local iti PS Form 8191 ken RRECS evaluation dispute Form 1, ken offline a mapping ti ruta ti USGS/OpenStreetMap.
Dagiti rural letter carrier nga agsuksukimat kadagiti probision ti kontrata, agsagsagana para kadagiti diskusion iti steward, wenno mangrepaso kadagiti pagsardengan ti ruta iti sidong ti Rural Route Evaluated Compensation System (RRECS) ket maipasango iti tallo a masansan a tubeng:
1. Panagsapol kadagiti Naadaw a Kontrata & Sungbat ti RRECS
Dagiti saludsod maipapan kadagiti deadline ti panagreklamo iti Step 1, bayad iti relief-day, maikadua a biyahe, coverage factor, ken ti Rural Route Evaluation Dispute Process (RREDP) ket saklawenna ti NRLCA National Agreement, Memoranda of Understanding (MOUs), ken dagiti manual ti USPS. Masapul dagiti carrier ti napardas, nalaka a maawatan a panagsapul a naitimpuyog kadagiti espesipiko a titulo ti dokumento, numero ti panid, ken petsa.
2. Pribado a Panangburador kadagiti Porma ti Reklamo & Disputa
Ti panagsagana iti maysa a Step 1 grievance working draft (PS Form 8191) wenno maysa nga RRECS evaluation dispute draft (Form 1) para iti maysa a steward ti unyon ket ramanenna dagiti sensitibo a detalye ti empleado (nagnagan, 8-digit nga Employee ID Number, numero ti ruta, ken salaysay ti pasamak) a masapul nga agtalinaed iti browser ti carrier imbes a maipatulod iti server, ken dagiti atiddog a salaysay ket masapul nga addaan iti panid a pagtuloyan imbes a maikaltas a sililimendog iti uneg dagiti babassit a kahon ti porma ti PDF.
3. Panangmapa kadagiti Pagsardengan & Panagtrabaho nga Offline kadagiti Rural a Ruta
Masansan a bumallasiw dagiti ruta ti panagtedted iti away kadagiti lugar nga awan wenno nakapsut ti signal ti mobile. Dagiti carrier nga agplanplano kadagiti lokasion ti Mailbox, Park point, ken Front door ket kasapulanda ti mapper ti ruta a mangidulin kadagiti pagsardengan iti lokal a browser, mangisilpo kadagiti agkakanaig a pagsardengan, mang-export kadagiti portable a file ti mapa nga awan ti panagaramid iti account, ken mang-download kadagiti public-domain a tile ti mapa para iti offline a reperensia.
No Ania ti Aramiden ti Produkto (Naipakita a Kabilgan)
Urnosen ti Rural Mail Digital Helper ti uppat a naipagkaykaysa a workspace iti uneg ti maysa a mai-install, offline-capable a Progressive Web App:
1. Saved Contract & RRECS Q&A (`#ask`)
Sukkimatenna dagiti naidulin a sungbat maipapan iti trabaho ti rural-carrier, bayad, dagiti ebalwasion ti RRECS, coverage factor, maikadua a biyahe, dagiti pagannurotan iti relief-day, ken dagiti timeline ti Step 1 a buyogan dagiti sitasion ti taudan.
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.
Agsapul kadagiti excerpt iti NRLCA National Agreement, MOUs, dagiti giya ti RREDP, ken dagiti manual ti postal sigun iti topiko, artikulo, wenno numero ti porma.
Karaman dagiti napardas a pangrugian ti topiko para iti proseso ti panagreklamo iti Artikulo 15, PS Form 8191, Rural Route Evaluation Dispute Process (RREDP), ken dagiti kiddaw iti impormasion iti Artikulo 31.
Isublina dagiti nakotasion nga excerpt a kadua dagiti titulo ti taudan a dokumento, numero ti panid, ken petsa (dagiti excerpt laeng, saan a kompleto a download ti dokumento).
3. Browser-Local Printable Form Drafts (`#tools`)
Kuestionaro ti Isyu ken Working Draft: Builds a steward preparation checklist and an escaped-text worksheet that can be printed or downloaded as `.txt` without clipping long entries.
Pudno a Draft ti PS Form 8191 (Marso 2007 — Edision ti EIN): 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.
Naaramid Manen a Draft ti RRECS Evaluation Dispute Form 1 (Oktubre 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`)
In-inut a mangikarga iti lokal a vendored a Leaflet 1.9.4 nga addaan uppat a base layer: Kalsada (OpenStreetMap), Satellite (Imahen ti USGS National Map nga addaan kadagiti label), Aerial (Imahen laeng a ladawan ti orto ti USGS), ken Topo (USGS National Map).
Nangikabil iti color-coded a Kahon ti surat (`#15803d`), Punto a pagparadahan (`#7c3aed`), and Ruangan (`#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.
Offline a Tile Pack ti USGS ken Dagiti Portable a File: 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.
Akem ti Tyson
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 a PDF ken Typography Engineering: 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 ken Portable a Disenio ti Schema: 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.
Arkitektura ti Atomic PWA Service Worker: 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.
Dagiti Screenshot ti Aplikasion ken Visual Asset
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 — Naidulin a Sungbat ti RRECS & Dagiti Sitasasion ti Dokumento
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.
Icon ti Progressive Web App — Naisilpo a Pagsardengan ti Ruta
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 a Home-Screen Icon — Asset ti Safe-Zone ti Android ken PWA
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.
Dagiti Limitasion, Setup, Kinapribado ken Plataporma
Ipatungpal ti Rural Mail Digital Helper dagiti nainget a beddeng iti linteg, teknikal, ken kinapribado tapno maawatan dagiti carrier ken steward no ania ti aramiden ken saan nga aramiden ti ramit:
Saan nga Opisial a Sistema ti Unyon wenno USPS
Ti Rural Mail Digital Helper ket maysa a nawaya a katulongan iti edukasion ken panagplano—saan a pagtaudan ti kinapudno—ken saan a rumbeng a dakamaten a kas maysa kasta. Kanayon a pasingkedan dagiti agdama a dokumento ti kontrata ken makisarita iti steward ti unyon sakbay dagiti deadline ti panagpila.
Working Draft Laeng (Saan a Pirmado wenno Naipila Ditoy)
Ti panangisagana wenno panangimprenta iti worksheet, draft ti PS Form 8191, wenno draft ti RRECS Evaluation Dispute Form 1 ket mangpataud iti working draft para iti panagrepaso ti steward laeng; saan pulos a mapirmaan, maipila, wenno maipatulod ditoy. Dagiti sao ti manedyer, panangtingiting iti kina-napartak, disposision, ken dagiti linia ti pirma ket sipapanggep a nabati a blangko. Ti Oktubre 2026 RRECS Porma 1 ket naaramid manen a vector a layout, saan nga opisial a kasisigud ti USPS.
Browser-Local a Porma ken Pagidulinan ti Ruta
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.
Dagiti Layer ti Mapa, Pagannurotan ti Tile ken Distansia iti Nalinteg a Linia
Usaren ti mapa dagiti tile ti OpenStreetMap ken USGS National Map—saan a ti opisial a mapa ti USPS Digital Point Mapping (DPM)—ken dagiti pin ti Mailbox, Park point, ken Front door ket personal a label ti panagplano, saan nga opisial a simbolo ti DPM wenno rukod ti RRECS. Dagiti naukit a linia ken distansia ti Connect ket karkulo a nalinteg a linia ti geodesic, saan a kadsaaran ti kalsada a milia, oras ti panagtedted, wenno kredito ti RRECS. Sigun iti pagannurotan iti panagusar ti tile ti OpenStreetMap Foundation, dagiti tile ti OSM Street ket saan a pulos nga i-prefetch wenno i-bulk-download; dagiti offline pack ket ag-cache laeng kadagiti public-domain a tile ti USGS Satellite wenno Topo (agingga iti zoom 16, limitado iti 6,000 a tile kada ruta).
Panagrekord ti Lokasion iti Foreground Laeng
Maikiddaw laeng ti permiso iti lokasion no i-click ti agar-aramat ti Usaren ti lokasionko wenno Irugi ti panangirekord ti lokasion. Agtartrabaho laeng ti panagrekord iti dana bayat a makita ti panid (agingga iti 10,000 a nairekord a fix/segment); ti panangilemmeng iti tab, panangbaliw kadagiti app, panangserra iti screen, wenno panagbaetan ti provider a nasurok a 30 a segundo ket mangpasardeng iti panagrekord ken mangtandaan iti panagsina ti segment. Dagiti posision ti GPS ti browser ken telepono ket karkulo laeng.
Dagiti Plataporma, Sakup ti Offline ken Android Test Build
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.
Sumaruno nga Aramid — Lukatan ti Katulongan wenno Buyaen ti Walkthrough
Ilukat ti Rural Mail Digital Helper a direkta iti browser-mo (wenno i-install iti home screen-mo), mapan iti espesipiko a ramit, wenno buyaen ti tallo a minuto nga interactive a walkthrough demo: