PHPackages                             make0x20/driplet - 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. make0x20/driplet

ActiveLibrary

make0x20/driplet
================

A PHP library for broadcasting messages using Driplet microservice

v0.1(1y ago)089—0%GPL-3.0-or-laterPHPPHP ^8.3

Since Jan 29Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (2)Used By (0)

Driplet PHP Library
===================

[](#driplet-php-library)

A PHP library for broadcasting messages through WebSocket connections using the [Driplet](https://github.com/make0x20/driplet) microservice. This library provides a way to generate JWT tokens and send messages the microservice.

Requirements
------------

[](#requirements)

- PHP 8.3 or higher
- Composer

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require make0x20/driplet
```

Usage
-----

[](#usage)

### Sending a message

[](#sending-a-message)

```
use Driplet\Client\DripletClient;

// Initialize the client
$client = new DripletClient(
    'https://your-driplet-server.com/api/default/message',
    'your-secret-key'
);

// Create and send a message
$message = $client->createMessage()
    ->setMessage(['event' => 'update'])
    ->setTopic('system')
    ->include()
        ->setTarget('roles', ['admin'])
        ->setTarget('departments', ['IT'])
    ->exclude()
        ->setTarget('users', [123, 456]);

$success = $client->sendMessage($message);
```

Generate JWT tokens
-------------------

[](#generate-jwt-tokens)

```
use Driplet\Token\JwtManager;

// Initialize the JWT manager
$jwtManager = new JwtManager('your-jwt-secret', 60); // 60 seconds expiration

// Generate a token with custom claims
$token = $jwtManager->generateToken([
    'uid' => 123,
    'roles' => ['user', 'admin']
]);
```

Message structure
-----------------

[](#message-structure)

```
[
    'nonce' => 'random-unique-string',
    'timestamp' => 1234567890,
    'message' => [
        // Your message content
    ],
    'target' => [
        'include' => [
            // Targets to include
        ],
        'exclude' => [
            // Targets to exclude
        ]
    ],
    'topic' => 'your-topic'
]
```

Target system
-------------

[](#target-system)

The target system allows you to specify which clients should receive the message:

```
$client->createMessage()
    ->setMessage(['event' => 'update'])
    ->setTopic('system')
    ->include()
        ->setTarget('roles', ['admin'])
        ->setTarget('departments', ['IT'])
    ->exclude()
        ->setTarget('users', [123, 456])
    ->build();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance45

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

465d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/755ec357572d2b860455cd0e0f073d8987eb16d26bb6d2bcef1b42ed9e57b155?d=identicon)[make0x20](/maintainers/make0x20)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/make0x20-driplet/health.svg)

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

###  Alternatives

[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[drupal/core-recommended

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

6939.5M340](/packages/drupal-core-recommended)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)

PHPackages © 2026

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