PHPackages                             richarddobron/bigpipe - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. richarddobron/bigpipe

ActiveLibrary[Queues &amp; Workers](/categories/queues)

richarddobron/bigpipe
=====================

BigPipe: Pipelining web pages for high performance built in PHP.

1.1.0(4mo ago)1110.9k↑144.4%1MITPHPPHP ^8.0CI passing

Since Mar 27Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/richardDobron/bigpipe-php)[ Packagist](https://packagist.org/packages/richarddobron/bigpipe)[ RSS](/packages/richarddobron-bigpipe/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (18)Used By (0)

[![BigPipe logo](bigpipe.svg)](bigpipe.svg)

This library currently implements small part of [Facebook BigPipe](https://web.archive.org/web/20160223093221/https://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919) so far, but the advantage is to efficiently insert/replace content and work with the DOM. It is also possible to easily call JavaScript modules from PHP.

👀 Demo App
----------

[](#-demo-app)

Try the app with [live demo](http://bigpipe.xf.cz) or check how to [install](demo-app/README.md).

📕 Full documentation
--------------------

[](#-full-documentation)

ℹ️ Requirements
---------------

[](#ℹ️-requirements)

- PHP 7.1 or higher
- Webpack

📦 Installation
--------------

[](#-installation)

Follow these steps to install and set up:

### 1. Install composer package:

[](#1-install-composer-package)

```
$ composer require richarddobron/bigpipe
```

### 2. Install npm package:

[](#2-install-npm-package)

```
$ npm install bigpipe-util
```

### 3. Add the following to `/path/to/resources/js/app.js`:

[](#3-add-the-following-to-pathtoresourcesjsappjs)

```
import Primer from 'bigpipe-util/src/Primer';

Primer();

window.require = (modulePath) => {
    return modulePath.startsWith('bigpipe-util/')
        ? require('bigpipe-util/' + modulePath.substring(13) + '.js').default
        : require('./' + modulePath).default;
};
```

### 4. Add this line to the page footer:

[](#4-add-this-line-to-the-page-footer)

```

```

🪄 DOMOPS API
------------

[](#-domops-api)

- **setContent**: Sets the content of an element.
- **appendContent**: Insert content as the last child of specified element.
- **prependContent**: Insert content as the first child of specified element.
- **insertAfter**: Insert content after specified element.
- **insertBefore**: Insert content before specified element.
- **remove**: Remove specified element and its children.
- **replace**: Replace specified element with content.
- **eval**: Evaluates JavaScript code represented as a string.

```
$response = new \dobron\BigPipe\AsyncResponse();

$response->setContent('div#content', $newContent);
$response->send();
```

🔄 Refresh &amp; Redirecting
---------------------------

[](#-refresh--redirecting)

```
$response = new \dobron\BigPipe\AsyncResponse();

$response->reload(250); // reload page with 250ms delay
// or
$response->redirect('/onboarding', 500); // redirect with 500ms delay

$response->send();
```

ℹ️ Payload
----------

[](#ℹ️-payload)

```
$response = new \dobron\BigPipe\AsyncResponse();

$response->setPayload([
    'username' => $_POST['username'],
    'status' => 'unavailable',
    'message' => 'Username is unavailable.',
]);

$response->send();
```

🛠️ BigPipe API
--------------

[](#️-bigpipe-api)

- **require**: Call JavaScript module method. You can call a specific class method or a regular function with the custom arguments.

Example PHP code:

```
$asyncResponse = new \dobron\BigPipe\AsyncResponse();

$asyncResponse->bigPipe()->require("require('SecretModule').run()", [
    'first argument',
    'second argument',
    ...
]);
// is same as $asyncResponse->bigPipe()->require(["SecretModule", "run"], ...)
// is same as $asyncResponse->bigPipe()->require()->SecretModule()->run(...)
$asyncResponse->send();
```

Example JavaScript code:

```
class SecretModule {
    run(first, second) {
        // ...
    }
}
```

- **transport**: Through transport markers you can send HTML content but also transform the content into JavaScript objects (such as Map, Set or Element).

Example PHP code:

```
$asyncResponse = new \dobron\BigPipe\AsyncResponse();
$asyncResponse->bigPipe()->require("require('Chart').setup()", [
    'element' => \dobron\BigPipe\TransportMarker::transportElement('chart-div'),
    'dataPoints' => $asyncResponse->transport()->transportSet([
        ['x' => 10, 'y' => 71],
        ['x' => 20, 'y' => 55],
        ['x' => 30, 'y' => 50],
        ['x' => 40, 'y' => 65],
    ]),
]);
$asyncResponse->send();
```

⚡️ What all can be Ajaxifed?
============================

[](#️-what-all-can-be-ajaxifed)

🔗 Links
-------

[](#-links)

```
Remove Item
```

📝 Forms
-------

[](#-forms)

```

```

💬 Dialogs
---------

[](#-dialogs)

```
Open Modal
```

🌟 Inspiration
-------------

[](#-inspiration)

BigPipe is inspired by Facebook's BigPipe. For more details read their blog post: [Pipelining web pages for high performance](https://web.archive.org/web/20160223093221/https://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919).

💡 Motivation
------------

[](#-motivation)

There is a large number of PHP projects for which moving to modern frameworks like Laravel Livewire, React, Vue.js (and many more!) could be very challenging.

The purpose of this library is to rapidly reduce the continuously repetitive code to work with the DOM and improve the communication barrier between PHP and JavaScript.

📑 Version Guidance
------------------

[](#-version-guidance)

VersionReleasedStatusRepoPHP Version0.x2022-03-27Maintained[v0.x](https://github.com/richarddobron/bigpipe-php/tree/0.x)&gt;=7.11.x2022-07-29Latest[v1.x](https://github.com/richarddobron/bigpipe-php)^8.0🤝 Contributing
--------------

[](#-contributing)

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

📜 License
---------

[](#-license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance77

Regular maintenance activity

Popularity34

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

17

Last Release

128d ago

Major Versions

0.2.0 → 1.0.02022-07-29

0.2.1 → 1.0.22023-02-04

0.2.3 → 1.0.42025-01-16

0.x-dev → 1.1.02026-01-10

PHP version history (2 changes)0.1.1PHP &gt;=7.1

1.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ce70053083f807f4416f0bafe680691b66cd14f3c1bdf7b3df51b6f5b5cfdea?d=identicon)[dobron](/maintainers/dobron)

---

Top Contributors

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

---

Tags

asyncbigpipedomhtmljavascriptlaravelmicroframeworkphpxhrasyncjavascripthtmldomxhrbigpipe

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/richarddobron-bigpipe/health.svg)

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

###  Alternatives

[amphp/amp

A non-blocking concurrency framework for PHP applications.

4.4k123.4M323](/packages/amphp-amp)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k116.9M402](/packages/react-socket)[revolt/event-loop

Rock-solid event loop for concurrent PHP applications.

91943.6M138](/packages/revolt-event-loop)[amphp/parallel

Parallel processing component for Amp.

84746.2M74](/packages/amphp-parallel)[react/dns

Async DNS resolver for ReactPHP

535114.1M100](/packages/react-dns)[amphp/byte-stream

A stream abstraction to make working with non-blocking I/O simple.

392116.2M104](/packages/amphp-byte-stream)

PHPackages © 2026

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