Skip to content
Projets

À propos

Bien plus qu’une simple messagerie instantanée (IM).

Productivité et automatisation

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
+20
in 15 days
+30
in 1 month
+45

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

WuKongIM — One binary. Your entire real-time messaging core.

One binary. Your entire real-time messaging core.

Open-source, self-hosted real-time messaging for chat, AI streaming, Agent workflows, customer support, live rooms, and IoT.
Built-in Pebble storage, 256-slot Raft clustering, and embedded observability — no MySQL, Redis, Kafka, or Etcd required.

v3.1.0 GitHub Stars Go 1.26+ Docker multi-arch Apache 2.0 6 Live Demos

Try 6 Live Demos ↗ · Quick Start · Architecture · Documentation · v3.0.0 Launch · 简体中文

[!TIP] WuKongIM v3.0.0 is now generally available. Upgrading from v2 or an earlier v3 beta? Read the upgrade & offline migration guide (wkcli migrate).


See It in Action

Explore six live end-to-end scenarios running on a real WuKongIM cluster at demo.githubim.com — zero installation, zero LLM API key required. Click any preview to try it in your browser.

AI Streaming Replies Demo
AI Streaming Replies · Live Demo ↗ · Source
Incremental LLM output over durable channels with mid-stream cancel, error boundaries, and reconnect recovery.
Agent Tool Calling and Confirmation Demo
Agent Task Assistant · Live Demo ↗ · Source
Live tool-call traces, human-in-the-loop approval cards, pause, and cancel — synced across devices and durably audited.
Customer Support AI and Human Takeover Demo
Customer Support Desk · Live Demo ↗ · Source
AI first-response with seamless handoff to human agents, preserving full visitor context across isolated channels.
Live Product Launch Barrage Demo
Live Room & Barrage · Live Demo ↗ · Source
Transient real-time barrage, burst likes, pinned host notices, per-room mute moderation, and snapshot reconnect recovery.
MQTT 5 Smart Store IoT and IM Demo
MQTT 5 Smart Store (IoT × IM) · Live Demo ↗ · Source
Freezer alarms, remote commands, QoS 1 receipts, offline session backlog, and direct IM colleague collaboration on one cluster.
Direct and Group Chat Demo
Direct & Group Chat · Live Demo ↗ · Source
Ordered delivery, edits, multi-device sessions, and offline history recovery (also responsive on mobile).

Why WuKongIM?

Most teams either pay recurring per-MAU SaaS bills with vendor lock-in, or stitch together MySQL, Redis, Kafka, Etcd, custom sync workers, and monitoring stacks just to ship reliable messaging.

WuKongIM collapses the entire messaging core into one self-hosted Go binary.

WuKongIM v3 Single-Binary Architecture — zero external dependencies

Built for Production Scale

Pillar What You Get Out of the Box
Zero External Middleware Built-in Pebble message/metadata storage, Raft replication, and online backup/restore. No database, cache, or MQ to operate.
One Cluster Model (1 → N) A single-node cluster executes the exact same 256-hash-slot Raft path as a multi-node cluster. Add or drain nodes online without rewriting business logic.
100k-Member Group Ready Multicore gnet gateway, bounded backpressure queues, durable Channel Authority Promises, and per-channel ordered delivery with offline sync.
AI & Multi-Protocol Native Binary WKProto (TCP / WS / WSS), JSON-RPC, durable incremental AI streams (POST /message/event), MQTT 5 (preview), HTTP API, and sync before_send Webhooks.
Extensible & Observable Hot-reload sandboxed .wkp plugins, embedded Web Manager, bundled Prometheus, unified wkcli (top, bench, db, migrate), and read-only Operations MCP.
100% Ownership Apache 2.0 licensed. Your app keeps full ownership of UI, accounts, permissions, and data.

Verified Performance Baseline

From our reproducible three-process local acceptance gate (3 nodes · 3 replicas · 256 hash slots · 5,000 channels · 30-minute sustained load):

Metric Measured Result
Sustained throughput 4,499.7 msg/s (8.1M SENDs / 16.2M deliveries)
Tail latency (P99) 379 ms SENDACK · 320 ms RECV
Admission / rejection errors 0 (continuous process, full drain)
Aggregate 3-node heap < 859 MB
Large group acceptance 100,000-member group gate passed

Results reflect the recorded hardware and revision in the full acceptance report. Benchmark your own hardware and workload anytime with wkcli bench.


Quick Start (30 Seconds)

Pick the fastest way to spin up a single-node cluster (256 hash slots, embedded Manager, and Chat Demo included):

Option 1: Linux Package (APT / DNF)

Signed stable repositories for Ubuntu 24.04, Debian 13, Rocky Linux 9, AlmaLinux 9, and RHEL 9 (amd64/x86_64). No Go required.

# Ubuntu / Debian (see below for Rocky / Alma / RHEL 9)
curl -fsSL https://packages.githubim.com/repo | sudo sh
sudo apt update && sudo apt install -y wukongim

# Initialize secure config (save the printed Manager password), start & verify
sudo wukongim init
sudo systemctl enable --now wukongim
curl --fail http://127.0.0.1:5001/readyz

Once {"ready":true} returns, open Chat Demo at http://127.0.0.1:5001/demo/?lang=en and Manager at http://127.0.0.1:5301.

Rocky / Alma / RHEL 9 commands & remote SSH tunnel
# Rocky Linux / AlmaLinux / RHEL 9
curl -fsSL https://packages.githubim.com/repo | sudo sh
sudo dnf -y --disablerepo='*' --enablerepo=wukongim-stable makecache --refresh
sudo dnf install -y wukongim
sudo wukongim init && sudo systemctl enable --now wukongim

Default config binds to loopback (127.0.0.1). Accessing from your laptop over SSH:

ssh -N -L 5001:127.0.0.1:5001 -L 5200:127.0.0.1:5200 -L 5301:127.0.0.1:5301 user@server-ip

See the full Linux deployment guide and Multi-node cluster guide.

Option 2: Docker (linux/amd64 & linux/arm64)

Identical canonical digest published across GHCR, Docker Hub, and Alibaba Cloud Registry, with bundled Prometheus.

cat > wukongim.toml <<'EOF'
[node]
id = 1
data_dir = "/var/lib/wukongim"
[api]
listen_addr = "0.0.0.0:5001"
[manager]
listen_addr = "0.0.0.0:5301"
auth_on = true
jwt_secret = "replace-with-a-random-64-character-secret-before-production-use!"
users = [{ username = "admin", password = "change-me-now", permissions = [{ resource = "*", actions = ["*"] }] }]
EOF

docker run -d --name wukongim --restart unless-stopped \
  -p 127.0.0.1:5001:5001 -p 5100:5100 -p 5200:5200 -p 127.0.0.1:5301:5301 \
  -v "$PWD/wukongim.toml:/etc/wukongim/wukongim.toml:ro" \
  -v wukongim-data:/var/lib/wukongim \
  ghcr.io/wukongim/wukongim:3.0.0

Mainland China mirror (identical digest): registry.cn-shanghai.aliyuncs.com/wukongim/wukongim:3.0.0. Full setup & Linux non-root (10001:10001) notes in the Docker guide.

Option 3: Run all 6 interactive demos locally from source

Requires Go 1.26+, Node.js 22.12+ (or 20.19+), and npm (uses a built-in simulated model — no API key needed):

git clone https://github.com/WuKongIM/WuKongIM.git
cd WuKongIM
node demo/start.mjs

Starts a local 256-slot single-node cluster + all six demo backends on loopback and opens the Demo Home automatically. Pass --no-open for headless output; press Ctrl+C to stop. See the launcher guide.


10 Lines to Your First Real-Time Message

WuKongIM stays cleanly decoupled from your business logic: your backend authenticates users and calls the WuKongIM HTTP API; your clients connect directly to the WuKongIM Gateway via our SDKs.

1. Connect & listen on the client (easyjssdk)

import { WKIM, WKIMChannelType, WKIMEvent } from 'easyjssdk';

// Obtain { uid, token, websocketUrl } from your own authenticated backend
const im = WKIM.init(bootstrap.websocketUrl, {
  uid: bootstrap.uid,
  token: bootstrap.token,
  deviceFlag: 1,
});

im.on(WKIMEvent.Message, (msg) => console.log('Message:', msg.payload));
im.on(WKIMEvent.CustomEvent, (ev) => console.log('AI stream chunk:', ev));

await im.connect();
await im.send('bob', WKIMChannelType.Person, { type: 1, content: 'Hello from WuKongIM!' });

2. Push from your trusted backend (HTTP API)

# Register a client token (trusted backend only)
curl -fsS -X POST http://127.0.0.1:5001/user/token \
  -H 'Content-Type: application/json' \
  -d '{"uid":"bob","token":"bob-token","device_flag":1,"device_level":1}'

# Deliver a durable real-time message (base64 payload: {"type":1,"content":"Hello from WuKongIM!"})
curl -fsS -X POST http://127.0.0.1:5001/message/send \
  -H 'Content-Type: application/json' \
  -d '{"from_uid":"alice","channel_id":"bob","channel_type":1,"payload":"eyJ0eXBlIjoxLCJjb250ZW50IjoiSGVsbG8gZnJvbSBXdUtvbmdJTSEifQ=="}'

[!IMPORTANT] Always keep the WuKongIM HTTP API behind your trusted backend or an authenticated API gateway — it intentionally delegates user identity and business authorization to your application. Walk through the runnable end-to-end sample in the JavaScript / Web quickstart.

Official Client SDKs

SDK Best For Supported Platforms
WuKongIMSDK Full chat UX: local storage, conversations, unread counts & offline sync Android · iOS · JavaScript / Web · Flutter · HarmonyOS
WuKongEasySDK Lightweight real-time connections, AI streaming, notifications & IoT Android · iOS · JavaScript / Web · Flutter · Rust · C# · C++ · Python

Operate with Full Visibility

Every wukongim binary embeds the Manager Operations Console (JWT / RBAC protected), bundled Prometheus metrics, hot-path diagnostics, live slot migration, and online backup/restore.

WuKongIM Manager showing a healthy 3-node Raft cluster
3-Node Cluster Health & Lifecycle — Live node readiness, Raft Controller Leader/Followers, and online slot draining.
WuKongIM Manager showing 256 hash slots distributed across 3 Raft replicas
256 Hash Slots & Raft Quorum — Per-slot replica placement, quorum status, leader balance, and commit/apply heights.

Security & Access · Backup & Restore · Architecture · Operations & wkcli · Performance Runbook


Built with WuKongIM

TangSengDaoDao · 唐僧叨叨

An open-source, self-hosted enterprise messaging product with native clients for iOS, Android, Web, Windows, macOS, and Ubuntu Linux. WuKongIM powers its persistent connections, message routing, and storage, while TangSengDaoDao owns the complete chat UI, contacts, groups, and enterprise features.

Website ↗ · Source Code & Architecture ↗


Build & Contribute

The repository pins Go 1.26.10. See the configuration guide, repository conventions, and CI guide.

GOWORK=off go build ./cmd/wukongim ./cmd/wkcli
GOWORK=off go test ./cmd/... ./internal/... ./pkg/... ./scripts/... ./docker/... -count=1

Frontend work lives in web/ (Manager) and demo/chatdemo/; rebuild and commit embedded assets after UI changes.

Community & Support

Acknowledgements

WuKongIM stands on the shoulders of outstanding open-source projects. Special thanks to:

And thanks to every contributor and community member who reports issues, benchmarks clusters, and helps improve WuKongIM.


If WuKongIM saves you from building and operating a complex messaging stack,
give it a ⭐ on GitHub — it helps more developers discover the project!

Website · Documentation · Live Demos · 简体中文
Licensed under the Apache License 2.0.

Explorer des projets similaires

Chargement…