blemli/pwa-for-filament
Add progressive web app (PWA) support to your Filament admin panels. This package makes Filament panels installable on desktop and mobile via a web app manifest and service worker, so users can launch the admin from their home screen like a native app.
Architecture fit
This package is a Filament panel plugin that supplies a branded offline fallback page. The v0.1.2 change is purely presentational: the page now derives background, surface, text, and ring colors from the panel's registered gray palette, the retry button from primary 600/500 (matching Filament's solid button treatment), the body font from the panel's font(), and dark-mode behavior from the panel's darkMode() configuration. Architecturally this is a strong fit with a Filament-native product: it removes a second design system (the previously hardcoded zinc styles) and makes the offline experience inherit branding automatically. For a TPM, the important shift is that the plugin moves from "opinionated static page" to "theme-aware extension of the panel," which raises the quality bar but also introduces a dependency on Filament's theming contract rather than on its own constants.
Integration feasibility Integration remains drop-in: panel plugin registration, no migrations implied, and the release reduces consumer-side work because custom offline styling no longer needs to be maintained. Two implementation details deserve verification before we commit:
--gray-*, --primary-*) at render time or resolved in PHP and inlined. CSS-variable sourcing survives custom viteTheme() builds; PHP-side resolution may diverge from a custom compiled theme.localStorage.theme "same as Filament's bootstrap" implies an inline script that must execute before first paint. This needs to be compatible with our CSP (nonce/hash) and with Livewire SPA navigation, otherwise we get a flash of the wrong theme on the offline page, which is the one screen users see when things are already going wrong.Technical risk
localStorage.theme key used by Filament's own bootstrap. These are internal contracts, not a public theming API. A Filament major bump can silently degrade the offline page (wrong colors, wrong theme) without a hard failure — the worst kind of regression because it is only visible when a user is offline.Key questions
viteTheme() panel?Stack fit Laravel with a Filament panel; no build step required by consumers, which matters because the offline page must exist as a ready-to-serve HTML artifact even when the asset pipeline is unavailable. This release strengthens the fit for teams already investing in a themed panel, and makes the package considerably more attractive for white-labeled or multi-tenant deployments where a hardcoded zinc page would be an obvious branding break.
Migration path Greenfield adoption: register the plugin, confirm the offline route and service worker (if included) are wired, and delete any hand-rolled offline Blade view. For teams that had previously overridden the plugin's view to fix the hardcoded styling, this release is a cleanup opportunity — those overrides should be removed, since keeping them will now mask the panel theme and re-freeze the old design. No data or config migration is implied.
Compatibility
composer.json and test against the exact Filament minor in use.Sequencing
darkMode(false), darkMode(true) (forced), user-selected via localStorage.theme, and OS-preference fallback.Maintenance Ongoing effort is low in absolute terms but concentrated in one place: Filament upgrade testing. Add "verify offline page theming in light, dark, and forced-dark" to the checklist for every Filament major/minor upgrade and every panel theme change. Because the package is pre-1.0, budget for reading release notes on each bump rather than auto-updating.
Support User-facing configuration surface is essentially zero, which keeps ticket volume down. Expected support themes are "offline page is stale after a release," "offline page colors changed after we updated our theme," and "offline page is light while the panel is dark." All three are diagnosable from the panel config plus a hard refresh, so first-line support can be documented in a short runbook.
Scaling Negligible cost: a static HTML page served from cache, no queries, no per-request PHP work in the offline path. Scale concerns are entirely about cache correctness, not load — the risk is a stale artifact replicated to every returning user, not a hot path.
Failure modes
localStorage key; degrades silently, visible only offline.darkMode(forced) panel rendering light, or a disabled panel rendering dark, both of which read as broken branding on the most visible failure screen.viteTheme() output.Ramp-up Low: roughly half a day for a developer to integrate and verify, plus a QA pass across the four theme states and the offline round-trip. The release reduces ongoing design maintenance (no second palette to keep in sync), which is a net operational win for any panel that is themed or white-labeled. Recommendation: adopt with a pinned version constraint, verify CSP and custom-theme behavior first, and treat Filament upgrades as the standing maintenance obligation.
How can I help you explore Laravel packages today?