No description
  • Java 41.7%
  • TypeScript 37%
  • CSS 10.1%
  • HTML 9.5%
  • JavaScript 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-23 20:34:01 +01:00
.github Configure weekly grouped Dependabot updates 2026-10-25 09:21:20 +01:00
chat upgrade maven wrapper 2026-11-23 20:34:01 +01:00
datachannel upgrade maven wrapper 2026-11-23 20:34:01 +01:00
gauge upgrade maven wrapper 2026-11-23 20:34:01 +01:00
iss upgrade maven wrapper 2026-11-23 20:34:01 +01:00
map-cursors upgrade maven wrapper 2026-11-23 20:34:01 +01:00
maps upgrade maven wrapper 2026-11-23 20:34:01 +01:00
pg-orders upgrade maven wrapper 2026-11-23 20:34:01 +01:00
poll upgrade maven wrapper 2026-11-23 20:34:01 +01:00
presence-dashboard upgrade maven wrapper 2026-11-23 20:34:01 +01:00
recovery-lab upgrade maven wrapper 2026-11-23 20:34:01 +01:00
shared-poll-votes upgrade maven wrapper 2026-11-23 20:34:01 +01:00
simple-chat upgrade maven wrapper 2026-11-23 20:34:01 +01:00
simple-chat-2 upgrade maven wrapper 2026-11-23 20:34:01 +01:00
smoothie upgrade maven wrapper 2026-11-23 20:34:01 +01:00
snake upgrade maven wrapper 2026-11-23 20:34:01 +01:00
tennis-delta upgrade maven wrapper 2026-11-23 20:34:01 +01:00
whiteboard upgrade maven wrapper 2026-11-23 20:34:01 +01:00
.gitignore Refactor and upgrade demos 2026-09-05 07:48:04 +02:00
config.json Upgrade and add more demos 2026-06-27 18:47:29 +02:00
docker-compose.yml upgrade 2026-10-21 04:18:24 +02:00
LICENSE initial commit 2025-08-01 14:36:48 +02:00
README.md upgrade 2026-10-21 04:18:24 +02:00

jcentserver-client demos

Runnable examples for jcentserver-client and Centrifugo 6.

The clients use Centrifuge 5.8.0, and Docker Compose pins Centrifugo 6.10.1. Centrifuge now disconnects when a page enters the browser's back/forward cache and reconnects with recovery when it is restored. Exceptions thrown from SDK event handlers stop the connection, so handle application errors inside those callbacks.

Demo What it demonstrates Server port Client port
chat Multi-room chat with cached history 8080 5173
datachannel WebRTC data-channel signaling 8080 5173
gauge Live gauge telemetry 8080 5173
iss ISS tracking with a server-side subscription 8080 5173
map-cursors Ephemeral map-subscription cursors and server-side clear 8094 4177
maps Live vehicle positions on a map 8080 5173
pg-orders Transactional PostgreSQL stream broker and state recovery 8096 4179
poll Persistent live poll 8080 5173
presence-dashboard Presence, presence stats, and join/leave events 8093 4176
recovery-lab Reconnect and publication recovery 8092 4175
shared-poll-votes HMAC-authorized shared-poll tracking and publishing 8095 4178
simple-chat Minimal real-time chat 8080 5173
simple-chat-2 Chat with participant counts and typing indicators 8080 5173
smoothie Scrolling CPU telemetry charts 8080 5173
snake Multiplayer snake game 8080 5173
tennis-delta Plain versus Fossil delta-compressed match feeds 8091 4174
whiteboard Collaborative pointer, touch, and pen drawing 8080 5173

Requirements

  • Java 25
  • Node.js 20.19+ or 22.12+
  • Docker Compose
  • A MapTiler API key for iss and maps

Run a demo

Start the shared Centrifugo and PostgreSQL services from the repository root:

docker compose up -d

Then start one server and its matching client in separate terminals. For example:

cd chat/server
./mvnw spring-boot:run
cd chat/client
npm install
npm run dev

On Windows, use mvnw.cmd instead of ./mvnw. The older demos share ports 8080 and 5173, so run only one of those pairs at a time. The six Centrifugo 6.8 feature demos use the dedicated ports in the table and can run together.

For iss and maps, create a client .env.local file containing:

VITE_MAPTILER_API_KEY=your-key

Every client also supports optional endpoint overrides:

VITE_SERVER_URL=http://localhost:8080
VITE_CENTRIFUGO_BASE_ADDRESS=localhost:8000

pg-orders requires the PostgreSQL service from the root Compose stack. Centrifugo creates its cf_stream_* functions and controller schema when it starts.