feat(pwa): make frontend installable as a PWA for mobile creators/buy… - #549
Merged
barry01-hash merged 1 commit intoAug 31, 2026
Merged
Conversation
…ers (PromptMintLabs#505) Add web app manifest, generated brand icons (192/512/maskable/apple-touch), and a service worker that precaches the app shell and runtime-caches the API and fonts for offline browsing. Wire an "Install app" button into the navigation using the beforeinstallprompt event, and set theme-color/apple-touch meta. Co-Authored-By: Kilo <kilo@github.com>
|
@legend-esc Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #505
Summary
Mobile creators and buyers can now install PromptHash to their home screen as a native-like app. This adds a web app manifest, branded app icons, and a service worker that precaches the app shell and runtime-caches API/font requests so the marketplace stays usable offline.
Changes
vite.config.ts— Enabledvite-plugin-pwa(already a dev dependency) withregisterType: autoUpdate. Added the web app manifest (standalone, portrait, purple #7c3aed theme) and Workbox rules:NetworkFirstruntime caching for/api(10s timeout, 24h expiry).StaleWhileRevalidatecaching for Google Fonts.cleanupOutdatedCachesfor safe updates.public/pwa/— Generated branded icons fromlogo.png:icon-192.png,icon-512.png,maskable-512.png(safe-zone padded),apple-touch-icon.png.index.html— Addedtheme-color,apple-mobile-web-app-*meta, and the apple-touch-icon link; updated title.src/hooks/usePWAInstall.ts— Captures thebeforeinstallpromptevent, detects standalone/already-installed state, and exposesinstall().src/components/InstallAppButton.tsx— Install button (icon + full variants) that prompts install and shows an "Installed" state.src/components/navigation.tsx— Wired the install button into the desktop header, mobile header, and the mobile menu sheet..changeset/pwa-install-505.md— Minor-feature changeset.How to test
yarn build && yarn preview