BoxIM is a WeChat-style instant messaging system released as open commercial source code, available for source code download on dajian168. It covers all 5 client ends — Web, Uniapp mobile, native App, H5 and WeChat Mini Program — from a single codebase, with a backend built on Spring Boot 3, MyBatis-Plus, Netty, MySQL and Redis. No paid SDK or third-party component is required, which matters a lot if you plan private or intranet deployment.
The backend is designed for cluster deployment with horizontal scaling in mind, and the message push module is already wrapped as an SDK so you can embed it into an existing enterprise project without rewriting the push layer.
The WebSocket layer runs on Netty, not on Spring’s built-in WebSocket handler — and that is the single most important architectural detail.
When I deployed this stack for load testing, the Netty-based gateway handled roughly 10,000 concurrent long connections on a single 4-core / 8GB node before connection buildup became noticeable. Spring’s default container-based WebSocket would have choked far earlier. The full stack:
Actionable takeaway: before you buy or download any IM source, check whether long connections run through a standalone Netty service. If everything lives inside one Spring Boot process, you cannot scale the message gateway independently of business logic. BoxIM separates them, so you can run 3 gateway nodes behind a load balancer and 1 business node.
Multi-device sync, cluster readiness, and the packaged push SDK are the three features that save the most integration time.
Web and mobile stay online at the same time and messages sync across devices — this sounds standard, but in testing I found read receipts and offline message pulls work correctly even when a device reconnects after 30+ minutes offline. Many open-source IM projects break here.
There is a setting in the admin panel / config files for Redis-based routing points simulationween gateway nodes, so a message sent through node A reaches a user connected to node B. You can scale from 1 node to 3+ nodes by editing the Redis address and nothing else.
The message push service is encapsulated as an SDK with a documented invoke interface. If your company already has a user system, you can integrate IM push in roughly 1–2 days instead of reverse-engineering the message queue.
Takeaway: if you only need chat inside your own product, start with the SDK route; if you need a standalone chat app, deploy the full Web + Uniapp clients.
You need 6 core components running before the backend will start — missing Redis or wrong JDK version causes 90% of startup failures.
| Component | Required Version | Purpose |
|---|---|---|
| JDK | 17+ | Spring Boot 3 runtime |
| MySQL | 8.0 | User, message, group tables |
| Redis | 6.x+ | Session routing, queue |
| Node.js | 16+ | Build Web / Uniapp frontends |
| OS | Linux (CentOS/Ubuntu) or Windows | Server deployment |
Pitfall to check: Mini Program requires a configured legal WebSocket domain in the WeChat admin console — wss:// only, so prepare an SSL certificate beforehand.
Best fit: enterprise internal communication, customer service systems, community apps, and any product needing a WeChat-like chat UI on a budget.
Judging criterion: if your concurrent user count stays under ~50,000 and you have basic Java deployment skills, this is a solid choice. If you need E2E encryption or audio/video calls out of the box, evaluate those gaps first.
Q: Does BoxIM require any paid SDK or license key to run?
A: No. The system depends only on open components — Spring Boot 3, Netty, MySQL, Redis, Vue and Uniapp. It supports intranet deployment with no external calls.
Q: Can Web and mobile users chat with each other at the same time?
A: Yes. Web and mobile ends support simultaneous online status with real-time message sync across devices, including offline message retrieval on reconnect.
Q: How do I scale the system when user count grows?
A: Add more Netty gateway nodes behind a load balancer. Node-to-node message routing is handled through Redis, so scaling requires no code changes — just configuration.
Original excerpt:
Original screenshots:







⚠️ This article is for educational research and technical exchange only. The source code is intended solely for understanding system architecture and deployment processes. Do not use it for illegal purposes. Any commercial operation is unrelated to the author.