Hysen Labs
Open-source project
imboy-pub/imboy avatar
imboy-pub

imboy

使用erlang和PostgreSQL做后端、flutter做前端开发的一款开源的即时聊天解决方案(基于erlang/otp的高性能web框架 cowboy 做后端服务,用 "8核16G 主机(100万PPS)"压测,保持100万+TCP稳定在线90分钟以上) 支持基于webrtc 一对一视频通话功能

33 stars10 forksErlangNOASSERTION
DEEP OPEN-SOURCE ANALYSIS

An open-source instant messaging platform built on Erlang

IMBoy is a privately deployable chat platform with an Erlang/OTP backend, PostgreSQL persistence, and a Flutter client.

What the platform offers

IMBoy is a privately deployable instant messaging platform. The repository holds the Erlang/OTP backend, the database migrations, the production deployment configuration, and the product documentation, while the Flutter client and the React admin backend live in separate repositories. According to the README, the backend supports single chat, group chat, channels, moments, and message push, along with an HTTP API and WebSocket long connections. Optional end to end encryption is available, which matters for teams that need to self host sensitive communication. Persistence uses PostgreSQL, and attachment uploads go to Garage S3 with direct transfer. For deployment, a Docker Compose single node production setup is provided, while Helm and Kubernetes support are described as experimental and not yet verified on a production cluster. The project also documents a community edition and a business edition; the community edition ships with the orchestration file in the repository and includes built in Garage object storage so attachment upload works out of the box, while the payment gateway is fixed to off. The business edition and its sales policy overlay are not distributed in the open repository and are obtained through a separate commercial channel. This split lets the core stay open while a paid tier handles features some organizations need.

How the backend is organized

The backend is built on Erlang/OTP with the Cowboy web server handling requests, and the code is laid out so that a request flows through Handler, then Logic, then DS, then Repo. The source tree reflects this: src/api handles HTTP and WebSocket parameter parsing, src/adm holds admin backend interfaces, src/logic carries business logic, src/ds provides data services and caching, src/repo talks to PostgreSQL, and src/lib holds general utilities. Priv holds database migrations and static resources, deploy holds production deployment material, and docs holds architecture, protocol, and operations documentation. The README gives concrete commands for local work: a dev setup script starts PostgreSQL 18 and creates local configuration that is never committed to git, then make compile and a make run target bring the service up so you can hit an init endpoint. There are also targets for unit tests, local tests that use a local PostgreSQL, dialyzer for type checking, and control commands to inspect node status or ping the database. The guidance notes that adding a new interface usually means touching the Handler, the routes, the Logic, and adding tests, and it warns against modifying the vendored erlang.mk. This structure keeps the call path predictable as the codebase grows.

Deployment and release identity

Production deployment is documented around Debian 13 as a baseline, with Docker 24 or newer and the Compose v2 plugin, and an install script that can bootstrap Docker if it is missing. The community edition install is a three step flow: clone the repository and enter the deploy directory, run install.sh once to generate configuration and secrets, fill in three required variables such as the API domain and admin domain, then run the same command again to finish. On first run the script generates a dot env file, random secrets for the database and JWT and Garage credentials, and an RSA login keypair, then stops so a human can supply the few values only a person knows. The second run does preflight checks, starts services, issues a TLS certificate, waits for health, and prints a Release Identity triple of version, git sha, and image digest. The README explains that the published GitHub Release notes carry the same triple, so an operator can compare them and confirm the running image is the one the release gate validated. A quick demo path brings up just PostgreSQL and the backend with zero configuration for evaluation. The backend license is MulanPSL-2.0. The README also links to the E2EE protocol specification and a security brief for enterprise readers, which shows the project treats encrypted messaging as a first class concern rather than an optional extra.

Editorial conclusion

IMBoy's backend is implemented in Erlang, carries the MulanPSL-2.0 license, and was last updated on 2026-08-24, with 33 stars recorded at that point.

DEEP OPEN-SOURCE ANALYSIS

Official sources

Community notes

Community notes