Case Study sang Proyekto · Offline-Capable nga Progressive Web App
Rural Mail Digital Helper
Isa ka libre kag ma-install nga Progressive Web App (PWA) nga gindisenyo kag gin-obra ni Tyson Berry-Wogan para sa mga rural letter carrier. Ginatingob sini ang mga nasupot nga sabat sa kontrata sang USPS-NRLCA kag RRECS, library sang mga excerpt sang dokumento nga sarang ma-search, mga working draft nga ma-print sa browser sa PS Form 8191 kag RRECS evaluation dispute Form 1, kag offline nga pag-mapa sang ruta sa USGS/OpenStreetMap.
Ang mga rural letter carrier nga nagasusi sang mga probisyon sang kontrata, nagahanda para sa mga pagsinapol sa steward, ukon nagarepaso sang mga dulog sang ruta sa idalom sang Rural Route Evaluated Compensation System (RRECS) nagapangatubang sang tatlo ka sulitsulit nga upang:
1. Pagpangita sang Ginsitar nga Kontrata kag mga Sabat sa RRECS
Ang mga pamangkot parte sa mga deadline sang Step 1 grievance, sweldo sa relief-day, ikaduha nga mga biyahe, coverage factor, kag ang Rural Route Evaluation Dispute Process (RREDP) nagaluntad sa bug-os nga NRLCA National Agreement, Memoranda of Understanding (MOUs), kag mga manwal sang USPS. Nagakinahanglan ang mga carrier sang madasig kag mahapos mahangpan nga pagpangita nga naangot sa espesipiko nga mga titulo sang dokumento, mga numero sang pahina, kag mga petsa.
2. Pinasahi nga Paghimo sang mga Form sa Reklamo kag Di-pag-ugyunay
Ang paghanda sang Step 1 grievance working draft (PS Form 8191) ukon RRECS evaluation dispute draft (Form 1) para sa isa ka union steward nagadalahig sang sensitibo nga mga detalye sang empleyado (mga ngalan, 8-digit nga Employee ID Numbers, mga numero sang ruta, kag mga kasaysayan sang insidente) nga kinahanglan magpabilin sa browser sang carrier sa baylo nga ipadala sa server, kag ang malaba nga mga pahayag nagakinahanglan sang mga sumpay nga pahina sa baylo nga mahipos nga matabasan sa sulod sang magagmay nga mga box sang PDF form.
3. Pagmapa sang mga Dulunggan kag Pag-obra nga Offline sa mga Ruta sa Baryo
Masami nga nagaagi ang mga ruta sang rural delivery sa mga lugar nga mahina ukon wala sing mobile coverage. Ang mga carrier nga nagaplano sang mga lokasyon sang Mailbox, Park point, kag Front door nagakinahanglan sang route mapper nga nagatipig sang mga dulog sa lokal sa browser, nagaangot sang may kaangtanan nga mga dulog, naga-export sang mga portable map file nga wala nagahimo sang account, kag naga-download sang public-domain map tiles para sa offline nga paggamit.
Kon Ano ang Ginahimo sang Produkto (Ginpamatud-an nga mga Ikasarang)
Ginaorganisar sang Rural Mail Digital Helper ang apat ka integratibo nga workspaces sa sulod sang isa ka ma-install kag offline-capable nga Progressive Web App:
1. Saved Contract & RRECS Q&A (`#ask`)
Nagacheck sang mga nasupot nga sabat parte sa obra sang rural-carrier, sweldo, mga ebalwasyon sang RRECS, coverage factor, ikaduha nga mga biyahe, mga pagsulundan sa relief-day, kag mga timeline sang Step 1 nga may mga citation sang source.
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.
Naga-search sang mga excerpt sa NRLCA National Agreement, MOUs, mga giya sang RREDP, kag mga postal manual suno sa topiko, artikulo, ukon numero sang form.
Nagalakip sang madasig nga mga panugod sa topiko para sa proseso sang grievance sa Artikulo 15, PS Form 8191, Rural Route Evaluation Dispute Process (RREDP), kag mga pangabay sang impormasyon sa Artikulo 31.
Nagabalik sang gin-quote nga mga excerpt upod ang ila mga titulo sang source nga dokumento, mga numero sang pahina, kag mga petsa (mga excerpt lamang, indi bug-os nga mga download sang dokumento).
3. Browser-Local Printable Form Drafts (`#tools`)
Questionnaire sang Isyu & Working Draft: Builds a steward preparation checklist and an escaped-text worksheet that can be printed or downloaded as `.txt` without clipping long entries.
Awtentiko nga Draft sang PS Form 8191 (Marso 2007 — Edisyon sang 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.
Ginsulit nga Nahimo nga Draft sang 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`)
Lazy-load sang lokal nga vendored Leaflet 1.9.4 nga may apat ka base layers: Street (OpenStreetMap), Satellite (Imahe sang USGS National Map nga may mga label), Aerial (USGS imahe-lang nga orthoimagery), kag Topo (USGS National Map).
Mga lugar nga color-coded Kahon sang sulat (`#15803d`), Punto sang pagpark (`#7c3aed`), and Puertahan (`#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 & 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.
Katungdanan sang 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/`).
Engineering sang Client-Side PDF & Typography: 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 sang Geospatial & 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 sang 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 sang Application & Visual 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 — Nasupot nga Sabat sang RRECS & Mga Citation sang 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 sang Progressive Web App — Mga Naangot nga Dulog sang 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 Home-Screen Icon — Asset sang Safe-Zone sa Android & 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.
Mga Limitasyon, Setup, Privacy & Mga Plataporma
Ginasunod sang Rural Mail Digital Helper ang estrikto nga mga limitasyon sa laye, teknikal, kag privacy agod mahangpan sang mga carrier kag steward kon ano ang ginahimo kag wala ginahimo sang gamit:
Indi Opisyal nga Sistema sang Unyon ukon USPS
Ang Rural Mail Digital Helper isa ka independente nga bulig sa edukasyon kag pagplano—indi ginahalinan sang kamatuoran—kag indi dapat pagsambiton subong amo sini. Pirme pat-ura ang mga pinakabag-o nga dokumento sang kontrata kag magpakig-angot sa isa ka union steward antes ang mga deadline sang pagpasaka.
Mga Working Draft Lamang (Wala Ginapirmahan ukon Ginapasaka Diri)
Ang paghanda ukon pag-print sang worksheet, draft sang PS Form 8191, ukon draft sang RRECS Evaluation Dispute Form 1 nagapatubas sang isa ka working draft para sa review sang steward lamang; wala ini ginapirmahan, ginapasaka, ukon ginapasa diri. Ang mga pahayag sang pagdumala, mga pagtimbang-timbang sa katinlo sang oras, mga disposisyon, kag mga linya sang pirma hungod nga ginbilin nga blangko. Ang Oktubre 2026 RRECS Form 1 isa ka ginliwat nga vector layout, indi opisyal nga orihinal sang USPS.
Browser-Local Forms & Pagtipig sang 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.
Mga Layer sang Mapa, Polisiya sa Tile & Distansya sang Diretso nga Linya
Nagagamit ang mapa sang OpenStreetMap kag USGS National Map tiles—indi ang opisyal nga mapa sang Digital Point Mapping (DPM) sang USPS—kag ang mga pin sini sa Mailbox, Park point, kag Front door mga personal nga label sa pagplano, indi opisyal nga mga simbolo sang DPM ukon mga takus sang RRECS. Ang mga gin-drawing nga linya kag mga distansya sang Connect mga straight-line geodesic nga pagtantya, indi road-snapped nga mileage, oras sang pagdul-ong, ukon kredito sang RRECS. Suno sa polisiya sa paggamit sang tile sang OpenStreetMap Foundation, ang mga OSM Street tile indi gid gina-prefetch ukon bulto nga gina-download; ang mga offline pack naga-cache lamang sang public-domain USGS Satellite ukon Topo tiles (tubtob zoom 16, limitado sa 6,000 ka tiles kada ruta).
Foreground Location Recording Lamang
Ang permiso sa lokasyon ginapangayo lamang kon mag-klik ang user Gamita ang akon lokasyon ukon Sugdi ang pagrekord sang lokasyon. Ang pagrekord sang agi nagadalagan lamang samtang makit-an ang pahina (tubtob sa 10,000 narecord nga mga fix/segment); ang pagtago sang tab, pagbalhin sang mga app, pag-lock sang screen, ukon ang giha sang provider nga sobra sa 30 ka segundo nagapauntat sang pagrekord kag nagatimaan sang utod sa segment. Ang mga posisyon sang GPS sa browser kag telepono halos lang.
Mga Plataporma, Sakop sang Offline & Test Build sang 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.
Masunod nga Aksyon — Buksi ang Helper ukon Tan-awa ang Walkthrough
Buksi ang Rural Mail Digital Helper diretso sa imo browser (o i-install ini sa imo home screen), magsaylo sa isa ka espesipiko nga gamit, o tan-awa ang tatlo ka minuto nga interactive walkthrough demo: