Case Study sa Proyekto · Progressive Web App nga Magamit Offline
Rural Mail Digital Helper
Usa ka libre, mainstal nga Progressive Web App (PWA) nga gidisenyo ug gitukod ni Tyson Berry-Wogan para sa mga rural letter carrier. Gihiusa niini ang mga natipigang tubag sa kontrata sa USPS-NRLCA ug RRECS, librarya sa mga excerpt sa dokumento nga mapangita, mga maimprenta nga working draft nga lokal sa browser sa PS Form 8191 ug RRECS evaluation dispute Form 1, ug offline nga pagmapa sa ruta sa USGS/OpenStreetMap.
Ang mga rural letter carrier nga nagsusi sa mga probisyon sa kontrata, nangandam para sa mga panaghisgot sa steward, o nagrepaso sa mga hunonganan sa rota ubos sa Rural Route Evaluated Compensation System (RRECS) nag-atubang og tulo ka nagbalik-balik nga babag:
1. Pagpangita sa Gikutlo nga Kontrata ug mga Tubag sa RRECS
Ang mga pangutana bahin sa mga deadline sa reklamo sa Step 1, suhol sa relief-day, ikaduhang mga biyahe, coverage factor, ug ang Rural Route Evaluation Dispute Process (RREDP) naglangkob sa NRLCA National Agreement, Memoranda of Understanding (MOUs), ug mga manwal sa USPS. Nagkinahanglan ang mga carrier og dali, yano nga pinulongan nga pagpangita nga nakatagik sa piho nga mga titulo sa dokumento, numero sa panid, ug mga petsa.
2. Pribadong Pag-draft sa mga Porma sa Reklamo ug Panaglalis
Ang pag-andam og working draft sa reklamo sa Step 1 (PS Form 8191) o draft sa panaglalis sa ebalwasyon sa RRECS (Form 1) para sa usa ka union steward naglangkob og sensitibo nga mga detalye sa empleyado (mga ngalan, 8-ka-digit nga Employee ID Number, mga numero sa ruta, ug mga asoy sa insidente) nga kinahanglang magpabilin sa browser sa carrier imbes ipadala sa usa ka server, ug ang tag-as nga mga pahayag nagkinahanglan og mga panid sa pagpadayon imbes nga hilom nga putlon sulod sa gagmay nga mga kahon sa porma sa PDF.
3. Pagmapa sa mga Hunonganan ug Pagtrapaho Offline sa mga Rural nga Ruta
Ang mga rota sa paghatod sa kabanikanhan kanunayng moagi sa mga dapit nga huyang o walay signal sa mobile. Ang mga carrier nga nagplano sa mga lokasyon sa Mailbox, Park point, ug Front door nagkinahanglan og route mapper nga magtipig sa mga hunonganan sa lokal nga browser, magkonektar sa may kalabotan nga mga hunonganan, mag-export og mga madala-dala nga file sa mapa nga dili na maghimo og account, ug mag-download og mga public-domain nga tile sa mapa para magamit offline.
Unsa ang Ginabuhat sa Produkto (Gipakita nga mga Kapabilidad)
Gi-organisar sa Rural Mail Digital Helper ang upat ka gihiusang workspace sulod sa usa ka mainstal, magamit sa offline nga Progressive Web App:
1. Saved Contract & RRECS Q&A (`#ask`)
Magsusi sa mga natipigang tubag sa trabaho sa rural-carrier, suholan, mga ebalwasyon sa RRECS, coverage factor, ikaduhang mga biyahe, mga lagda sa relief-day, ug mga timeline sa Step 1 uban ang mga citation sa gigikanan.
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.
Mangita og mga excerpt sa tibuok NRLCA National Agreement, MOUs, mga giya sa RREDP, ug mga manwal sa koreyo pinaagi sa hilisgutan, artikulo, o numero sa porma.
Naglakip sa dali nga mga panugod sa hilisgutan para sa pamaagi sa reklamo sa Artikulo 15, PS Form 8191, Rural Route Evaluation Dispute Process (RREDP), ug mga hangyo sa kasayuran sa Artikulo 31.
Magbalik og gikutlo nga mga excerpt uban sa mga titulo sa gigikanang dokumento, numero sa panid, ug mga petsa (mga excerpt lamang, dili tibuok nga pag-download sa dokumento).
3. Browser-Local Printable Form Drafts (`#tools`)
Pangutana sa Isyu ug Working Draft: Builds a steward preparation checklist and an escaped-text worksheet that can be printed or downloaded as `.txt` without clipping long entries.
Tinuod nga Draft sa PS Form 8191 (Marso 2007 — Edisyon sa 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.
Gibuhat Pag-usab nga Draft sa 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`)
Mag-lazy-load sa lokal nga gi-vendor nga Leaflet 1.9.4 nga adunay upat ka base layer: Street (OpenStreetMap), Satellite (Imahe sa USGS National Map nga adunay mga label), Aerial (USGS nga orthoimagery nga imahe lamang), ug Topo (USGS National Map).
Magbutang og color-coded nga mga Kahon sa koreyo (`#15803d`), Punto sa pag-park (`#7c3aed`), and Pultahan sa atubangan (`#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 USGS Tile Packs ug mga Portable 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.
Papel sa 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/`).
Inhenyeriya sa Client-Side PDF ug Tipograpiya: 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`).
Disenyo sa Geospatial ug Portable 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 sa 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.
Mga Screenshot sa Aplikasyon ug mga 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.
Kuha sa Walkthrough — Natipigang Tubag sa RRECS ug mga Citation sa 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 sa Progressive Web App — Mga Konektadong Hunonganan sa 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 nga Icon sa Home-Screen — Android ug 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.
Mga Limitasyon, Setup, Privacy ug mga Plataporma
Gipatuman sa Rural Mail Digital Helper ang estrikto nga legal, teknikal, ug mga utlanan sa privacy aron masabtan sa mga carrier ug steward kon unsa ang ginabuhat ug wala ginabuhat sa himan:
Dili Opisyal nga Sistema sa Unyon o USPS
Ang Rural Mail Digital Helper usa ka independente nga tabang sa edukasyon ug pagplano—dili kasaligang tinubdan sa kamatuoran—ug dili angayng ikotar isip usa niini. Kanunayng susihon ang pinakabag-ong mga dokumento sa kontrata ug makigsulti sa union steward sa dili pa ang mga deadline sa pag-file.
Mga Working Draft Lamang (Dili Gayod Pirmahan o I-file Dinhi)
Ang pag-andam o pag-imprinta og worksheet, draft sa PS Form 8191, o draft sa RRECS Evaluation Dispute Form 1 makamugna og working draft para sa pagrepaso lamang sa steward; kini dili gayud pirmahan, i-file, o isumite dinhi. Ang mga pahayag sa pagdumala, mga pagsusi sa tukma sa panahon, mga disposisyon, ug mga linya sa pirma gituyo nga gibiyaan nga blangko. Ang Oktubre 2026 RRECS Form 1 usa ka gihimo pag-usab nga vector layout, dili usa ka opisyal nga orihinal sa USPS.
Mga Porma ug Pagtipig sa Ruta nga Lokal sa Browser
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.
Mga Layer sa Mapa, Polisiya sa Tile ug Tul-id nga Distansya
Ang mapa naggamit sa OpenStreetMap ug USGS National Map tiles—dili ang opisyal nga mapa sa USPS Digital Point Mapping (DPM)—ug ang mga pin niini para sa Mailbox, Park point, ug Front door kay personal nga mga label sa pagplano, dili opisyal nga mga simbolo sa DPM o mga sukod sa RRECS. Ang gidrowing nga mga linya ug distansya sa Connect kay mga tul-id nga linya nga geodesic nga banabana, dili road-snapped nga gilay-on sa milya, oras sa paghatod, o kredito sa RRECS. Subay sa polisiya sa paggamit sa tile sa OpenStreetMap Foundation, ang mga tile sa OSM Street dili gayod i-prefetch o i-bulk-download; ang mga offline pack mag-cache lamang og public-domain nga mga tile sa USGS Satellite o Topo (hangtod sa zoom 16, limitado sa 6,000 ka tile matag rota).
Pagrekord sa Lokasyon sa Foreground Lamang
Pangayoon lang ang pagtugot sa lokasyon kon i-klik sa tiggamit ang Gamita ang akong lokasyon o Sugdi ang pagrekord sa lokasyon. Ang pagrekord sa agianan modagan lamang samtang makita ang panid (hangtod sa 10,000 narekord nga mga fix/segment); ang pagtago sa tab, pagbalhin sa mga app, pag-lock sa screen, o ang gintang sa provider nga sobra sa 30 segundo mopahunong sa pagrekord ug magmarka og break sa segment. Ang mga posisyon sa GPS sa browser ug telepono gibanabana lamang.
Mga Plataporma, Sakop sa Offline ug Test Build sa Android
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.
Sunod nga Aksyon — Buksi ang Magtatabang o Tan-awa ang Walkthrough
Ilunsad ang Rural Mail Digital Helper direkta sa imong browser (o i-install kini sa imong home screen), adto sa usa ka piho nga gamit, o tan-awa ang tulo ka minuto nga interactive walkthrough demo: