PHPackages                             skydiablo/react-crate - 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. skydiablo/react-crate

ActiveLibrary

skydiablo/react-crate
=====================

0208PHP

Since May 27Pushed 2w ago1 watchersCompare

[ Source](https://github.com/skydiablo/ReactCrate)[ Packagist](https://packagist.org/packages/skydiablo/react-crate)[ RSS](/packages/skydiablo-react-crate/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

React Crate
===========

[](#react-crate)

`React Crate` ist eine PHP-Bibliothek, die eine Schnittstelle zu CrateDB bietet, um IoT-Daten effizient zu speichern und abzurufen. Diese Bibliothek nutzt die ReactPHP-Architektur, um asynchrone Operationen zu unterstützen.

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

[](#installation)

Um die Bibliothek zu installieren, verwenden Sie Composer:

```

composer require skydiablo/react-crate

```

Anforderungen
-------------

[](#anforderungen)

- PHP 8.3 oder höher
- CrateDB
- ReactPHP

Verwendung
----------

[](#verwendung)

### Initialisierung

[](#initialisierung)

Um die Bibliothek zu verwenden, müssen Sie zuerst einen `Client` erstellen und die `IoT`-Serviceklasse initialisieren:

```

use SkyDiablo\ReactCrate\Client;
use SkyDiablo\ReactCrate\Services\IoT;

$client = new Client('http://localhost:4200');
$iotService = new IoT($client);

```

### Password authentication (HTTP Basic Auth)

[](#password-authentication-http-basic-auth)

By default, the client assumes host-based (trust) authentication. When CrateDB requires username and password for HTTP clients, use `BasicAuthClient`:

```
use SkyDiablo\ReactCrate\BasicAuthClient;

$client = new BasicAuthClient(
    'https://crate.example.com:4200',
    'myuser',
    'mypassword',
);
```

For clusters, wrap each node client before passing them to `ClusterClient`.

### Tabelle initialisieren

[](#tabelle-initialisieren)

Bevor Sie Messungen hinzufügen, sollten Sie die Tabelle mit der Funktion `initTable` initialisieren. Diese Funktion erstellt die notwendige Tabelle in CrateDB, falls sie noch nicht existiert:

```

$iotService->initTable()->then(function() {
    echo "Tabelle erfolgreich initialisiert.";
});

```

### Messungen hinzufügen

[](#messungen-hinzufügen)

Sie können Messungen hinzufügen, indem Sie die `Measurement`-Klasse verwenden:

```

use SkyDiablo\ReactCrate\DataObject\IoT\Measurement;

$measurement = new Measurement(new \DateTime(), 'temperature', ['location' => 'office'], ['value' => 23.5]);
$iotService->addMeasurement($measurement);

```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance63

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/956423?v=4)[Volker](/maintainers/skydiablo)[@skydiablo](https://github.com/skydiablo)

---

Top Contributors

[![skydiablo](https://avatars.githubusercontent.com/u/956423?v=4)](https://github.com/skydiablo "skydiablo (34 commits)")

### Embed Badge

![Health badge](/badges/skydiablo-react-crate/health.svg)

```
[![Health](https://phpackages.com/badges/skydiablo-react-crate/health.svg)](https://phpackages.com/packages/skydiablo-react-crate)
```

PHPackages © 2026

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