Go to file
Randy Fischer b005193dbc Request persistent storage after first save
IndexedDB data can be evicted under storage pressure, especially on iOS
Safari. navigator.storage.persist() asks the browser to keep our data. On
Chromium+Firefox it succeeds silently when conditions allow (installed PWA,
engagement heuristics); on Safari it typically grants only for installed
PWAs.

- persistentStorage.js: isPersisted() and requestPersistence() with graceful
  fallback when the Storage API is unavailable.
- persistence.js: request persistence once, after the first successful save —
  a heuristic that works across Firefox (user gesture context) and
  Chromium/Safari (data-stored context).
- sw.js: bump cache version, precache new file.
- index.html: load new script.
2026-04-15 15:54:06 +02:00
_docs Initial repo scaffold on develop 2026-04-15 15:24:55 +02:00
public Request persistent storage after first save 2026-04-15 15:54:06 +02:00
src Request persistent storage after first save 2026-04-15 15:54:06 +02:00
.gitignore Initial repo scaffold on develop 2026-04-15 15:24:55 +02:00
README.md Initial repo scaffold on develop 2026-04-15 15:24:55 +02:00

README.md

Duimstok-inspecties Bovenbouw

ProRail duimstok-inspecties voor wissels, overwegen en spoor. MVP / PWA — vanilla HTML, CSS, JS, IndexedDB, service worker.

Project-structuur

01_Applicatie/
├── public/                 frontend assets (open public/index.html direct)
│   ├── index.html
│   ├── manifest.webmanifest
│   ├── sw.js               service worker
│   ├── icons/
│   ├── css/
│   └── js/
├── src/                    applicatielogica (DDD-lagen)
│   ├── Domain/
│   ├── Application/
│   └── Infrastructure/
└── _docs/                  projectdocumentatie

Uitvoeren

Snel testen (geen PWA-functionaliteit): Dubbelklik public/index.html. Werkt vanaf file://.

Volledige PWA (service worker + installatie): Start een webserver vanuit 01_Applicatie/ en open de app via http://localhost:<poort>/public/:

python -m http.server 8000
# open http://localhost:8000/public/

Service worker, installatieknop en offline-caching werken alleen vanaf http(s):// of localhost — niet vanaf file://.

Branches

  • master — live productie (auto-deploy bij merge)
  • develop — staging (auto-deploy bij merge)
  • feature branches — nieuwe functionaliteit, merge via PR in develop

Zie _docs/ voor verdere projectdocumentatie.