PHPackages                             singlephon/rift - 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. singlephon/rift

ActiveLibrary[Framework](/categories/framework)

singlephon/rift
===============

Rift is a minimalist framework that extends Laravel Livewire, allowing you to create structured two-way communication between PHP and JavaScript for your components.

v0.2.5(9mo ago)14MITPHPPHP ^8.0

Since Jul 17Pushed 9mo agoCompare

[ Source](https://github.com/singlephon/rift)[ Packagist](https://packagist.org/packages/singlephon/rift)[ Docs](https://github.com/singlephon/rift)[ RSS](/packages/singlephon-rift/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

Rift
====

[](#rift)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d307f3341d319f0412dbfb033a2254b95ab8797970375c0bd26c754bebfc7385/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696e676c6570686f6e2f726966742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/singlephon/rift)[![Total Downloads](https://camo.githubusercontent.com/5ae82ad867a427c7aa2f6e0fd8b981d49e97b386a4642ecb594079d4e2452801/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696e676c6570686f6e2f726966742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/singlephon/rift)

**A lightweight micro-framework that connects Blade, Livewire, Alpine.js, and JavaScript classes seamlessly for modern Laravel projects.**

---

🚀 Features
----------

[](#-features)

✅ **Generate** Livewire, Blade, and JS components in one command
✅ **Connect** Blade ↔ Alpine.js ↔ JavaScript ↔ Livewire effortlessly
✅ **Automatic JS dependency injection** with clean syntax
✅ **Lightweight, clean API**
✅ **Supports hot-reload, dynamic mounting, and reactivity**

---

🛠️ Installation
---------------

[](#️-installation)

### PHP (Laravel)

[](#php-laravel)

Install via Composer:

```
composer require singlephon/rift
```

---

Then install via NPM:

### JavaScript (NPM)

[](#javascript-npm)

```
npm install @singlephon/rift
```

### Import Rift in your `resources/js/app.js`:

[](#import-rift-in-your-resourcesjsappjs)

```
import { Rift } from "@singlephon/rift";

new Rift(import.meta.glob('./rift/**/*.js', { eager: true }))
    .start()
```

---

Getting Started with Rift
-------------------------

[](#getting-started-with-rift)

### 1️⃣ Generate a new Rift component

[](#1️⃣-generate-a-new-rift-component)

```
php artisan rift:make counter
```

✅ You will see:

```
COMPONENT CREATED 🤙

CLASS: app/Livewire/Rift/Counter.php
VIEW:  resources/views/rift/counter.blade.php
JS:    resources/js/rift/counter.js

```

---

### 2️⃣ Add logic to your generated JS class

[](#2️⃣-add-logic-to-your-generated-js-class)

Open:

```
resources/js/rift/counter.js

```

Replace contents with:

```
import { RiftComponent } from '@singlephon/rift';

export default class Counter extends RiftComponent {
    count = 1;

    increase() {
        this.count++;
    }

    decrease() {
        this.count--;
    }
}
```

---

### 3️⃣ Add UI to your generated Blade view

[](#3️⃣-add-ui-to-your-generated-blade-view)

Open:

```
resources/views/rift/counter.blade.php

```

Replace contents with:

```

    +
    -

```

---

### 4️⃣ Test your component

[](#4️⃣-test-your-component)

Add this to any page or Livewire component:

```

```

✅ Now visit your page:

- You will see a counter with `+` and `-` buttons.
- Clicking `+` increases the counter.
- Clicking `-` decreases the counter.
- The **state is reactive and persistent across Livewire updates**.

---

### Why Rift?

[](#why-rift)

- ✅ Seamlessly **binds Blade, Alpine.js, JS classes, and Livewire**.
- ✅ Clean syntax with **no boilerplate**.
- ✅ CLI generator for **automatic structure creation**.
- ✅ Ready for **complex UI composition** with **clean separation of concerns**.

---

---

🗂 Project Structure
-------------------

[](#-project-structure)

- `php` package (Composer): manages Blade + Livewire generation
- `js` package (npm): manages RiftContainer, RiftComponent, and automatic mounting

---

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Rakhat Bakytzhanov](https://github.com/singlephon)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance57

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Total

4

Last Release

285d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bf20d8fb33ebdd3ed4db311b4e66d81f7065bef57c577fa523ca62f7133ee62?d=identicon)[singlephon](/maintainers/singlephon)

---

Top Contributors

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

---

Tags

singlephonrift

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/singlephon-rift/health.svg)

```
[![Health](https://phpackages.com/badges/singlephon-rift/health.svg)](https://phpackages.com/packages/singlephon-rift)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[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)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[raugadh/fila-starter

Laravel Filament Starter.

614.9k](/packages/raugadh-fila-starter)

PHPackages © 2026

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