PHPackages                             jansuchanek/nchat - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jansuchanek/nchat

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jansuchanek/nchat
=================

Reusable real-time admin chat extension for Nette Framework with WebSocket support (Soketi/Pusher), typing indicators, presence, read receipts, and optional AI responder.

v1.1.0(6d ago)02↓100%MITPHPPHP &gt;=8.1CI failing

Since Mar 19Pushed 4d agoCompare

[ Source](https://github.com/JanSuchanek/nchat)[ Packagist](https://packagist.org/packages/jansuchanek/nchat)[ RSS](/packages/jansuchanek-nchat/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (3)Used By (0)

NChat — Real-time Admin Chat for Nette Framework
================================================

[](#nchat--real-time-admin-chat-for-nette-framework)

Reusable real-time chat extension for Nette Framework admin panels with WebSocket support (Soketi/Pusher), typing indicators, presence detection, read receipts, emoji reactions, sound alerts, and browser push notifications.

Features
--------

[](#features)

- 💬 **Broadcast + DM + Group chat**
- ⚡ **WebSocket real-time** (Soketi/Pusher) with polling fallback
- ✍️ **Typing indicators** — "Jan píše…"
- 👥 **Online presence** — instant online/offline
- ✓✓ **Read receipts** — DM delivery confirmation
- 😂 **Emoji reactions** — 👍❤️😂😮😢🙏
- 🔔 **Sound alerts** — Web Audio API ping (toggleable)
- 📢 **Push notifications** — Browser Notification API
- 🤖 **AI Bot integration** — pluggable via `AiResponderInterface`
- 🗄️ **Database agnostic** — `ChatStorageInterface` (DBAL included)

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

[](#installation)

```
{
    "repositories": [
        {"type": "vcs", "url": "git@gitlab.com:JanSuchanek/nchat.git"}
    ],
    "require": {
        "jansuchanek/nchat": "dev-main"
    }
}
```

Configuration
-------------

[](#configuration)

```
extensions:
    nchat: NChat\ChatExtension

nchat:
    websocket:
        host: soketi
        port: 6001
        appId: my-app
        key: my-key
        secret: my-secret
    storage: NChat\Storage\DbalChatStorage  # or your own
    ai:
        enabled: true
        responder: App\Model\MyAiResponder  # implements AiResponderInterface
```

Usage
-----

[](#usage)

Add the trait to any presenter:

```
final class AdminPresenter extends BasePresenter
{
    use NChat\Presenter\ChatPresenterTrait;
}
```

Then add chat action names to your allowed actions:

```
$openActions = array_merge(['dashboard'], self::getChatActionNames());
```

Custom Database Storage
-----------------------

[](#custom-database-storage)

Implement `ChatStorageInterface` for any database:

```
class SqliteChatStorage implements ChatStorageInterface
{
    public function saveMessage(array $data): int { /* ... */ }
    public function fetchMessages(int $userId, array $criteria = []): array { /* ... */ }
    // ...8 methods total
}
```

Custom AI Responder
-------------------

[](#custom-ai-responder)

```
class MyAiResponder implements AiResponderInterface
{
    public function respond(string $context): string { /* call OpenAI/Claude/Gemini */ }
    public function getSystemPrompt(): string { return 'You are...'; }
    public function getBotName(): string { return '🤖 Bot'; }
}
```

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance99

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

6d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38ce2f53e74d810d50aca863e1a3b954f34f1629dd01a6a8c7d4d582e7459e63?d=identicon)[JanSuchanek](/maintainers/JanSuchanek)

---

Top Contributors

[![JanSuchanek](https://avatars.githubusercontent.com/u/310020?v=4)](https://github.com/JanSuchanek "JanSuchanek (7 commits)")

### Embed Badge

![Health badge](/badges/jansuchanek-nchat/health.svg)

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

###  Alternatives

[contributte/menu-control

Menu control for Nette framework

30106.2k1](/packages/contributte-menu-control)[carrooi/nette-menu

Menu control for Nette framework

2949.6k1](/packages/carrooi-nette-menu)[uestla/twigrid

Experimental DataGrid for Nette Framework

1712.3k1](/packages/uestla-twigrid)[ipub/gravatar

Gravatar creator for Nette Framework

122.0k](/packages/ipub-gravatar)

PHPackages © 2026

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