kevachat / npsapp
KevaChat App for NPS Protocol
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
pkg:composer/kevachat/npsapp
Requires
- cboden/ratchet: ^0.4.4
 - gregwar/captcha: ^1.2
 - ixnode/php-cli-image: ^0.1.2
 - kevachat/kevacoin: ^1.10
 
This package is auto-updated.
Last update: 2025-10-30 22:51:50 UTC
README
KevaChat Server for NPS Protocol
Listen connections on 1915 port and save messages to given namespace in KevaCoin blockchain
To read messages, use KevaChat webapp, geminiapp or any KevaCoin explorer!
Components
- kevachat/kevacoin-php - KevaCoin library for PHP 8
 - cboden/ratchet - Asynchronous Socket server
 - gregwar/captcha - Captcha library to prevent spam abuse
 - ixnode/php-cli-image - Library converts captcha to ASCII format
 
Install
git clone https://github.com/kevachat/npsapp.gitcd npsappcomposer update
Setup
cd npsappcp config/example.json config/name.json- edit connection and provide room namespace
Launch
php src/app.php name.json- wherename.jsonargument is any config, placed atconfigfolder
Autostart
Launch server as the systemd service
You can create as many servers as wanted by providing separated config for each instance!
Following example require npsapp installed into the home directory of npsapp user (useradd -m npsapp)
# /etc/systemd/system/npsapp.service [Unit] After=network.target [Service] Type=simple User=npsapp Group=npsapp ExecStart=/usr/bin/php /home/npsapp/npsapp/src/app.php name.json StandardOutput=file:/home/npsapp/debug.log StandardError=file:/home/npsapp/error.log Restart=on-failure [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload- reload systemd configurationsudo systemctl enable npsapp- enablenpsappservice on system startupsudo systemctl start npsapp- startnpsappserver
Proxy
Like NEX Protocol, NPS data could be simply forwarded using any proxy server that support TCP streams
Nginx
# /etc/nginx/nginx.conf
stream {
        server {
                listen 1915;
                proxy_pass 127.0.0.1:1915;
        }
}
Clients
nc 127.0.0.1 1915- IPv4 only, installnetcat-openbsdto add IPv6 supportncat 127.0.0.1 1915telnet 127.0.0.1 1915