PHPackages                             beauty-framework/grpc - 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. beauty-framework/grpc

ActiveLibrary[Framework](/categories/framework)

beauty-framework/grpc
=====================

Beauty gRPC

1.0.1(11mo ago)02MITPHPPHP &gt;=8.1

Since Jun 15Pushed 11mo agoCompare

[ Source](https://github.com/beauty-framework/grpc)[ Packagist](https://packagist.org/packages/beauty-framework/grpc)[ RSS](/packages/beauty-framework-grpc/feed)WikiDiscussions main Synced 1mo ago

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

Beauty gRPC
===========

[](#beauty-grpc)

Support for gRPC services in the [Beauty Framework](https://github.com/beauty-framework/app), powered by [RoadRunner GRPC plugin](https://docs.roadrunner.dev/docs/plugins/grpc).

✨ Installation
--------------

[](#-installation)

Via composer:

```
make composer require beauty-framework/grpc
# or manually, if you don't use docker
composer require beauty-framework/grpc
```

Run the following command:

```
make beauty grpc:install
# or manually
./beauty grpc:install
```

```
make composer du
# or manually
composer dump-autoload
```

This will:

- 📁 Create the `generated/` directory for compiled gRPC PHP classes
- 🧪 Add `"GRPC\\": "generated/"` to `composer.json` autoload
- 📝 Copy the `grpc-worker.php` stub into the `workers/` directory
- 🔌 Run `vendor/bin/rr download-protoc-binary` to install the `protoc` binary

Add command to `makefile`:

```
grpcgen:
	docker-compose exec -u www-data $(APP_CONTAINER) protoc --plugin=protoc-gen-php-grpc \
		--php_out=./generated \
		--php-grpc_out=./generated \
		$(filter-out $@,$(MAKECMDGOALS))
```

and to `PHONY` block append this command name: `grpcgen`

---

🛠 Usage
-------

[](#-usage)

### 1. Compile your `.proto` files:

[](#1-compile-your-proto-files)

```
make grpcgen proto/helloworld.proto
```

To compile multiple:

```
make grpcgen proto/*.proto
```

Alternatively, use manually:

```
docker-compose exec -u www-data app protoc \
  --plugin=protoc-gen-php-grpc \
  --php_out=./generated \
  --php-grpc_out=./generated \
  proto/helloworld.proto
```

---

### 2. Configure `.rr.yaml`

[](#2-configure-rryaml)

```
grpc:
  listen: tcp://0.0.0.0:51015
  pool:
    command: "php workers/grpc-worker.php"
  proto:
    - "proto/helloworld.proto"
```

---

### 3. Start the server

[](#3-start-the-server)

Add new `ports` in `docker-compose.yml` in `app` service:

```
services:
  app:
    ports:
      - "51015:51015"
```

```
make stop && make up
# or manually
./vendor/bin/rr serve
```

This will start the gRPC server at `127.0.0.1:9001`.

---

🔧 Example Service
-----------------

[](#-example-service)

```
namespace App\Controllers\GRPC;

use GRPC\Greeter\GreeterInterface;
use GRPC\Greeter\HelloRequest;
use GRPC\Greeter\HelloReply;
use Beauty\GRPC\GrpcService;
use Spiral\RoadRunner\GRPC\ContextInterface;

#[GrpcService(GreeterInterface::class)]
class Greeter implements GreeterInterface
{
    public function SayHello(ContextInterface $ctx, HelloRequest $in): HelloReply
    {
        return new HelloReply([
            'message' => 'Hello ' . $in->getName(),
        ]);
    }
}
```

---

📎 Documentation
---------------

[](#-documentation)

Official RoadRunner gRPC plugin docs: 🔗

---

🛋 Notes
-------

[](#-notes)

- Services are automatically discovered from `app/Controllers/GRPC/**/*.php` via `#[GrpcService(...)]`
- All generated classes are stored in `generated/`
- Re-run `make grpcgen` whenever you change `.proto` files

---

❤️ Stack
--------

[](#️-stack)

- [roadrunner-php/grpc](https://github.com/roadrunner-php/grpc)
- [google/protobuf-php](https://github.com/protocolbuffers/protobuf-php)
- [beauty-framework/app](https://github.com/beauty-framework/app)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance52

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Total

2

Last Release

337d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/068f8c26f06f513a9c38d2a01c4d90a85eae1125a5b9d14eae7059715be860e4?d=identicon)[m1n64](/maintainers/m1n64)

---

Top Contributors

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

---

Tags

gRPCbeauty

### Embed Badge

![Health badge](/badges/beauty-framework-grpc/health.svg)

```
[![Health](https://phpackages.com/badges/beauty-framework-grpc/health.svg)](https://phpackages.com/packages/beauty-framework-grpc)
```

###  Alternatives

[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k235.4M9.7k](/packages/symfony-framework-bundle)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/pennant

A simple, lightweight library for managing feature flags.

57311.1M53](/packages/laravel-pennant)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)

PHPackages © 2026

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