PHPackages                             ustal/stream-hub-core - 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. ustal/stream-hub-core

ActiveLibrary

ustal/stream-hub-core
=====================

StreamHub core: event-driven interaction engine with plugin system

v1.0.0(1mo ago)053↓100%3MITPHPPHP ^8.2CI passing

Since Apr 7Pushed 4w agoCompare

[ Source](https://github.com/ustal/stream-hub-core)[ Packagist](https://packagist.org/packages/ustal/stream-hub-core)[ RSS](/packages/ustal-stream-hub-core/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (3)

stream-hub-core
===============

[](#stream-hub-core)

[![CI](https://github.com/ustal/stream-hub-core/actions/workflows/ci.yml/badge.svg)](https://github.com/ustal/stream-hub-core/actions/workflows/ci.yml)

Framework-agnostic headless core for Stream Hub.

`stream-hub-core` is no longer positioned as a pluggable UI engine. In the `v1` direction it focuses on stream models, low-level write commands, command buses, backend contracts, and reusable framework-agnostic building blocks.

Current Scope
-------------

[](#current-scope)

The package currently provides:

- core models:
    - `Stream`
    - `StreamEvent`
    - `StreamParticipant`
- backend contract:
    - `StreamBackendInterface`
- application context contract:
    - `StreamContextInterface`
- command contracts:
    - `StreamCommandInterface`
    - `StreamCommandHandlerInterface`
- buses:
    - `CommandBusInterface`
    - `ModelCommandBusInterface`
    - `CommandBus`
    - `GuardedCommandBus`
- thin application facade:
    - `StreamHubInterface`
    - `StreamHub`
- guard contracts for high-level commands:
    - `StreamCommandGuardInterface`
    - `GuardDecision`
- low-level core commands and handlers:
    - create stream
    - join stream
    - append stream event
    - mark stream read
- identifier generation:
    - `IdentifierGeneratorInterface`
    - `RandomHexIdentifierGenerator`
    - `UuidV4IdentifierGenerator`
    - `UuidV7IdentifierGenerator`

Design Notes
------------

[](#design-notes)

- Core models are not persistence entities.
- Project-specific enrichment belongs in backend adapters and mappers.
- High-level feature commands may be guarded before handler execution.
- Low-level model commands should stay internal and should not be guarded.
- High-level feature workflows should orchestrate low-level core commands instead of writing directly to storage when a generic low-level command already exists.
- Business authorization rules should live in the application or policy layer, not in the backend contract.

Development
-----------

[](#development)

Run tests:

```
make test
```

Run deptrac:

```
vendor/bin/deptrac analyse
```

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance94

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

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

5

Last Release

31d ago

Major Versions

v0.3.0 → v1.x-dev2026-04-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/aab85b383915bbb7e0514577593a134969f210aa51759afc88075805e5bd97d7?d=identicon)[ustal](/maintainers/ustal)

---

Top Contributors

[![ustal](https://avatars.githubusercontent.com/u/11928397?v=4)](https://github.com/ustal "ustal (15 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ustal-stream-hub-core/health.svg)

```
[![Health](https://phpackages.com/badges/ustal-stream-hub-core/health.svg)](https://phpackages.com/packages/ustal-stream-hub-core)
```

PHPackages © 2026

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