PHPackages                             mkinyua53/laravel-inertia-boilerplate - 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. [Framework](/categories/framework)
4. /
5. mkinyua53/laravel-inertia-boilerplate

ActiveProject[Framework](/categories/framework)

mkinyua53/laravel-inertia-boilerplate
=====================================

Laravel Inertia boilerplate.

v0.3.0(4y ago)4183MITPHPPHP ^7.3|^8.0

Since Apr 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mkinyua53/Laravel-Inertia-Boilerplate)[ Packagist](https://packagist.org/packages/mkinyua53/laravel-inertia-boilerplate)[ RSS](/packages/mkinyua53-laravel-inertia-boilerplate/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (22)Versions (5)Used By (0)

About this package
------------------

[](#about-this-package)

This is a laravel version 8 boilerplate. Included are:

- [Laravel v8](https://laravel.com/docs/8.0)
- [Jetstream with inertia stack](https://jetstream.laravel.com/)
- [VueJS](https://vuejs.org)
- [Vuetify](https://vuetifyjs.com/en/introduction/why-vuetify/#guide) in place of [TailWind](https://tailwindcss.com/) even though TailWind compilation is included in laravel mix with a prefix in the class names
- [WorkBox](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin) service worker
- [Web Push notification](https://medium.com/@sagarmaheshwary31/push-notifications-with-laravel-and-webpush-446884265aaa)

Other features
--------------

[](#other-features)

- Role-based authorization; Check `app\Http\Controllers\AuthController`
- [Vue-meta](https://vue-meta.nuxtjs.org/guide/)

Installing
----------

[](#installing)

```
composer create-project mkinyua53/laravel-inertia-boilerplate myproject
```

Install dependencies

```
yarn
```

Run server

```
php artisan serve
```

Run watch

```
yarn watch
```

To generate the service worker run the production server

```
yarn prod
```

The service-worker is installed in the `resources\js\bootstrap.js`The Push notification is activated for logged-in users in `resources\views\app.blade.php` with this line

```
@auth

@endauth
```

To ask for notification permission, in a .vue file, example in `resources\js\Layouts\User.vue`

```
export default {
  name: 'user-layout',
  metaInfo () {
    return {
      title: 'User Dashboard'
    }
  },
  data () {
    return {
      webpushsuccess: false,
      snackbar: false,
      message: ''
    }
  },
  methods: {
    turnonnotif () {
      if (!('Notification' in window)) {
        this.message = 'Your browser doesn\'t support Notifications'
        this.snackbar = true
        return
      }
      if (Notification.permission === 'denied') {
        this.message = 'You have explicitly denied notifications for this app. Please reset notifications settings for this url ' + window.location.origin
        this.snackbar = true
      }
      //  Dispatched a custom event and listen for it to request notifications permission
      window.dispatchEvent(new CustomEvent('notifyme'));
    }
  },
  computed: {
    webpush () {
      return ('Notification' in window) && Notification.permission === 'granted'
    }
  },
  created () {
    var vm = this
    // we listen for this custom event fired after the notification subscription is saved in the server
    window.addEventListener('notifyon', function () {
      vm.webpushsuccess = true
    })
  },
  watch: {
    'webpushsuccess': function (value) {
      if (value) {
        this.message = 'Notifications turned on successfully'
        this.snackbar = true
      }
    }
  }
```

in push.js

```
if ('serviceWorker' in navigator) {
  const event = new Event('notifyme');
  window.addEventListener('notifyme', () => {
    if ("PushManager" in window) {
      navigator.serviceWorker.register('/service-worker.js')
        .then(() => {
          // console.log('serviceWorker installed!')
          initPush();
        })
        .catch((err) => {
          console.log(err)
        });
    }
  });
}

function storePushSubscription(pushSubscription) {
  const token = document.querySelector('meta[name=csrf-token]').getAttribute('content');

  fetch('/user/push', {
    method: 'POST',
    body: JSON.stringify(pushSubscription),
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json',
      'X-CSRF-Token': token
    }
  })
    .then((res) => {
      return res.json();
    })
    .then((res) => {
      // Dispatch a custom event
      const event = new Event('notifyon');
      window.dispatchEvent(event)
      console.log(res)
    })
    .catch((err) => {
      console.log(err)
    });
}
```

Alternatively, you can ask for permission on `onload` event and avoid using custom events, but, FireFox requires that the permission request be user initiated

```
if ('serviceWorker' in navigator) {
  window.addEventListener('load', () => {
    if ("PushManager" in window) {
      navigator.serviceWorker.register('/service-worker.js')
        .then(() => {
          // console.log('serviceWorker installed!')
          initPush();
        })
        .catch((err) => {
          console.log(err)
        });
    }
  });
}
```

Authorization front-end
-----------------------

[](#authorization-front-end)

```
View Dashboard
```

Credits
-------

[](#credits)

1. [Sagar Maheshwary](https://medium.com/@sagarmaheshwary31/push-notifications-with-laravel-and-webpush-446884265aaa) for the WebPush code

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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 ~35 days

Total

4

Last Release

1791d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72d060a7fe5b3d3abdae4d8fe2d9f85c4997ecc77fd614e4e0e94279aa136d36?d=identicon)[mkinyua53](/maintainers/mkinyua53)

---

Top Contributors

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

---

Tags

laravel-inertialaravel-jetstreamlaravel webpushlaravel service-worker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mkinyua53-laravel-inertia-boilerplate/health.svg)

```
[![Health](https://phpackages.com/badges/mkinyua53-laravel-inertia-boilerplate/health.svg)](https://phpackages.com/packages/mkinyua53-laravel-inertia-boilerplate)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k172.1k9](/packages/bagisto-bagisto)[krayin/laravel-crm

Krayin CRM

23.2k33.6k1](/packages/krayin-laravel-crm)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

10.2k3.5k](/packages/leantime-leantime)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

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