PWA
FlowDice ships as a Progressive Web App, enabling offline support and installable desktop/mobile experiences without app store distribution.
What It Provides
- Offline support: Service worker caches all pages, assets, and the dice engine. The app works with no network connection after first load.
- Installable: Users can “install” from Chrome/Edge to get a standalone window with app icon on desktop and mobile.
- No app store required: Instant access via URL. No review process, no download wait.
- Auto-updates: Deploy the Rails app and the PWA updates on next visit.
Implementation
- Service worker registered on first load
- Cache-first strategy for app shell (HTML, CSS, JS)
- The dice engine runs entirely client-side for offline rolls
- Favorites and Roll History stored in IndexedDB
Relationship to Native
The PWA covers desktop completely — no need for a native desktop wrapper (see Hotwire Desktop Idea). On mobile, the PWA serves as a fallback for users who don’t want to install from the App Store/Play Store. Hotwire Native shells in Phase 3 provide the full native experience.
See also: Architecture, Hotwire Native, FlowDice