PHPackages                             faysal0x1/service-worker-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. faysal0x1/service-worker-module

ActiveLaravel-module[HTTP &amp; Networking](/categories/http)

faysal0x1/service-worker-module
===============================

Reusable service worker + frontend cache module for Laravel (nwidart).

1.0.4(3mo ago)016MITJavaScriptPHP ^8.2

Since Jan 11Pushed 3mo agoCompare

[ Source](https://github.com/faysal0x1/service-worker-module)[ Packagist](https://packagist.org/packages/faysal0x1/service-worker-module)[ RSS](/packages/faysal0x1-service-worker-module/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (5)Used By (0)

Service Worker Module
=====================

[](#service-worker-module)

Reusable `nwidart/laravel-modules` package that ships:

- A production-ready `sw.js` implementation with image/API caching helpers
- Frontend utilities (`resources/js/utils/serviceWorker.js` + config helper)
- Publishable config files (`config/service-worker.php`, `config/frontend-cache.php`)
- Documentation (`SERVICE_WORKER_CONFIG.md`)

Installation
------------

[](#installation)

```
composer require faysal0x1/service-worker-module
php artisan module:enable ServiceWorker
```

Publish assets
--------------

[](#publish-assets)

```
# Config + docs
php artisan vendor:publish --provider="App\Modules\ServiceWorker\Providers\ServiceWorkerServiceProvider" --tag=serviceworker-config
php artisan vendor:publish --provider="App\Modules\ServiceWorker\Providers\ServiceWorkerServiceProvider" --tag=serviceworker-docs

# Frontend helpers
php artisan vendor:publish --provider="App\Modules\ServiceWorker\Providers\ServiceWorkerServiceProvider" --tag=serviceworker-frontend

# Optional: publish the service worker bootstrap + standalone worker file
php artisan vendor:publish --provider="App\Modules\ServiceWorker\Providers\ServiceWorkerServiceProvider" --tag=serviceworker-assets
```

Frontend usage
--------------

[](#frontend-usage)

```
import serviceWorkerManager from '@/utils/serviceWorker';

serviceWorkerManager.init(page.props);
serviceWorkerManager.register();
```

The manager automatically shares configuration via Inertia props and exposes helpers for clearing caches, pushing config updates, etc.

Service worker route
--------------------

[](#service-worker-route)

The module registers `GET /service-worker-module/sw.js`, which serves the worker code. The published `public/sw.js` bootstrap simply `importScripts` this route, so the worker always stays in sync with the module.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance82

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

4

Last Release

98d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b04cc9f0083811cc99536fa81da5da28d93a919f215cd140d710e06bbea77a43?d=identicon)[faysal0x1](/maintainers/faysal0x1)

---

Top Contributors

[![faysal0x1](https://avatars.githubusercontent.com/u/64875731?v=4)](https://github.com/faysal0x1 "faysal0x1 (6 commits)")

---

Tags

laravelmodulepwaservice worker

### Embed Badge

![Health badge](/badges/faysal0x1-service-worker-module/health.svg)

```
[![Health](https://phpackages.com/badges/faysal0x1-service-worker-module/health.svg)](https://phpackages.com/packages/faysal0x1-service-worker-module)
```

###  Alternatives

[mhmiton/laravel-modules-livewire

Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.

236409.6k9](/packages/mhmiton-laravel-modules-livewire)[erag/laravel-pwa

A simple and easy-to-use PWA (Progressive Web App) package for Laravel applications.

16083.3k](/packages/erag-laravel-pwa)[palanik/lumen-cors

Cross-origin resource sharing (CORS) middleware for Lumen micro-framework.

101237.4k](/packages/palanik-lumen-cors)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)[devrabiul/laravel-pwa-kit

Laravel PWA Kit is a lightweight and flexible package to add Progressive Web App (PWA) support to your Laravel applications with ease.

571.4k](/packages/devrabiul-laravel-pwa-kit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
