GitHunt

SSR Bridge

Latest Version on Packagist
Total Downloads
License
Tests

A universal PHP bridge for interacting with Node.js SSR services.

πŸ“¦ Installation

composer require codemonster-ru/ssr-bridge

πŸš€ Usage

use Codemonster\Ssr\SsrBridge;

// Local mode (Node.js runs directly)
$bridge = new SsrBridge('local', null, __DIR__.'/../node_modules/ssr-service/dist/ssr.js');
$html = $bridge->render('Home', ['message' => 'Hello']);

// HTTP mode (connecting to the remote SSR API)
$bridge = new SsrBridge('http', 'http://127.0.0.1:3000');
$html = $bridge->render('Home', ['message' => 'Hello']);

✨ Features

  • Local SSR execution via the node process
  • Connection to a remote HTTP SSR server API
  • Easy integration into any PHP project (Laravel, Symfony, Annabel, etc.)

πŸ§ͺ Testing

You can run tests with the command:

composer test

πŸ‘¨β€πŸ’» Author

Kirill Kolesnikov

πŸ“œ License

MIT

Languages

PHP100.0%

Contributors

MIT License
Created September 23, 2025
Updated September 28, 2025
codemonster-ru/ssr-bridge | GitHunt