Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Pwa Laravel Package

ladumor/laravel-pwa

Add Progressive Web App support to any Laravel app in minutes: generates the manifest and service worker, enables offline caching, push notifications, and an install prompt, and publishes configurable icons and meta tags via a simple artisan command, with no build tools required.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a presentation-layer utility, not a domain component. It registers a service provider, exposes two routes (typically a web app manifest and a service worker), publishes a config file, and provides a Blade directive to inject the manifest link and service-worker registration. That means it touches only routing, config, and view rendering — no models, no business logic, no data layer. For a server-rendered Laravel monolith this is a clean, low-coupling fit. For an API-only backend or a decoupled SPA whose shell is built by Vite/React/Vue, the value drops sharply: you would be using it only as a static manifest host, and most of the package is dead weight.

Integration feasibility. High. Installation is a Composer require, a vendor:publish, a config edit, and one Blade directive in the base layout. The two hard prerequisites are HTTPS (service workers require a secure context outside localhost) and correctly sized icon assets. The realistic effort for a competent Laravel engineer is well under a day, including Lighthouse validation. The main friction is not installation but coexistence: any app that already serves /manifest.json or /sw.js, or that has its own service worker from a theme or starter kit, will collide at the route or scope level.

Technical risk. The code volume is small, which caps the blast radius, but the risk profile is not trivial:

  • Maintainer concentration. A single-author package with 272 stars and zero dependents is a weak adoption signal. "Zero dependents" means almost no one else's production traffic has exercised these code paths; you are effectively an early adopter.
  • Caching is the real risk, not the code. The package bakes in an opinionated service-worker caching strategy. Cache-first behavior on HTML or versioned assets is the classic source of "users see last week's deploy" incidents. This must be reviewed line by line, not accepted by default.
  • Platform drift. PWA installability criteria (icon sizes, display, start_url, HTTPS, service-worker fetch handler) change with browser vendors. A thin package that hardcodes a manifest shape can silently fall out of compliance.
  • Framework drift. Laravel's service-provider auto-discovery, config publishing, and route registration have shifted across 9/10/11/12. A small package may lag a major version by months.
  • Security surface. A service worker has broad scope over the origin. A misconfigured scope or an over-broad cache can serve stale or wrong content to authenticated users — a correctness and trust issue, not just a UX one.

Key questions to answer before committing.

  1. Which Laravel and PHP versions are supported, and is the constraint tested in CI?
  2. What caching strategy does the generated service worker use per resource type (navigation, HTML, JS/CSS, images, API)? Can it be overridden without forking?
  3. Does it version caches and clean up old ones on activate? Does it call skipWaiting/clientsClaim, and is that the behavior we want?
  4. Is there a documented kill switch to unregister the service worker and purge caches if a bad release ships?
  5. Does it coexist with Vite asset hashing, a CDN, and an existing CSP?
  6. Are the generated routes namespaced/configurable, and do they collide with anything we already serve?
  7. Is there a test suite, and is the package a fork of silviolleite/laravel-pwa (i.e., what is the actual upstream maintenance story)?
  8. Does it do anything beyond manifest + service worker — push notifications, offline page, splash screens — and do we want any of that?

Integration Approach

Stack fit. Best suited to Laravel 9–12 applications with Blade-rendered layouts. It is framework-native (service provider, config, routes, Blade directive) and does not require Node tooling for the manifest itself. It fits alongside Vite for asset bundling without conflict, provided the service worker's precache list is reconciled with Vite's content-hashed filenames. Poor fit for headless/API-only services and for teams already running a mature Workbox build pipeline.

Migration path. Start on a branch against staging, not production.

  1. composer require ladumor/laravel-pwa, publish config and assets.
  2. Populate config/pwa.php (name, short_name, start_url, display, theme/background colors, icon set at 192/512 and maskable).
  3. Add the Blade directive to the single base layout, gated behind a config flag so it can be disabled per environment.
  4. Verify /manifest.json and the service-worker route resolve, are not behind auth middleware, and are served with correct Content-Type.
  5. Run Lighthouse installability and an offline smoke test in Chrome DevTools.
  6. If replacing a hand-rolled PWA, migrate the manifest first (low risk), then swap the service worker with a distinct cache prefix so old and new caches do not interleave.

Compatibility. Confirm PHP/Laravel constraints against our version matrix. Check for route-name and path collisions before enabling. Set cache headers deliberately: the service worker file must be served with a short or no-cache policy, or CDN edge caching will pin users to an old worker indefinitely. Ensure HTTPS on staging so QA exercises the real secure-context behavior. Verify the worker's scope matches the app root if the app is mounted under a subpath.

Sequencing. Treat this as a two-phase rollout. Phase 1: enable on an internal or low-traffic surface, watch for stale-content reports and console errors for a release cycle. Phase 2: promote to the primary app, with a documented rollback (flip the config flag off, ship a no-op service worker that unregisters and clears caches, or set Service-Worker-Allowed/cache headers to force refresh). Do not bundle this change with an unrelated release; cache bugs are hard enough to isolate on their own.

Operational Impact

Maintenance. Low ongoing code maintenance but non-zero ownership. The package is small enough to vendor or fork if it is abandoned, and the published config/assets become ours regardless. Budget a small review at each Laravel major upgrade and each time browser installability criteria change. Pin the version in composer.json; do not float.

Support. GitHub issues only — no commercial support, no SLA. Internal ownership should sit with a frontend or platform engineer who understands the service-worker lifecycle, not with whoever happened to install it. Document the config and the caching decisions in the repo so the knowledge is not tribal.

Scaling. Negligible server-side cost: the manifest and worker are effectively static responses. The scaling risk is client-side cache invalidation. At any real user volume, a subset of clients will be running a stale worker and stale assets, and that subset is invisible in server metrics. Plan for cache versioning, an update-available UX, and a way to measure "how many clients are on the current worker version" (e.g., a version beacon).

Failure modes to instrument.

  • Stale HTML/assets after deploy (cache-first misconfiguration).
  • Blank or broken offline experience when the offline fallback route is missing or cached incorrectly.
  • Silent no-op: worker registered at the wrong scope or blocked by CSP, so nothing works and nobody notices.
  • Route collision or auth middleware blocking manifest.json, breaking installability.
  • CDN caching the worker file, pinning users to an old version.
  • Double registration where an existing worker already exists.
  • Install prompt not appearing due to icon or manifest field regressions.

Ramp-up. Integration is a sub-day task for a Laravel developer. The genuine skill requirement is service-worker literacy — cache strategies, update lifecycle, and scope — which is a 1–2 day ramp for someone who has not shipped a PWA before. For a TPM, the practical ask is: one engineer-day to integrate and validate, plus a deliberate decision record on caching strategy and a rehearsed rollback before this goes anywhere near production traffic. Given zero dependents and a single maintainer, treat the package as a convenience wrapper you are prepared to own, not a dependency you can outsource trust to.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource