MCPcopy Index your code
hub / github.com/cherish-chat/xxim-server

github.com/cherish-chat/xxim-server @main

repository ↗ · DeepWiki ↗ · + Follow
2,904 symbols 5,535 edges 226 files 829 documented · 29% updated 2y ago★ 2,77510 open issues
README

xxim

xxim-server是一个功能超多的开箱即用的IM服务器。它的诞生是为了让每个人都能使用自己的IM APP,不需要再使用令人不爽的第三方IM APP。xxim-server是一个开源项目,欢迎大家一起来完善它。

Go Go Report Card Release Go Reference Awesome Go License: MIT XXIM

⚠️⚠️⚠️⚠️⚠️⚠️

Status:

代码重构升级中,在线体验暂时不可用。

⚠️⚠️⚠️⚠️⚠️⚠️

🤷‍ xxim 介绍

简体中文 | English

xxim-server代码不复杂,im大多逻辑都在于客户端,所以xxim-server只是一个简单的im服务器,但它具备了一个IM应有的全部功能。

~~在线体验:惺惺企业~~

全平台sdk:xxim_sdk_universal 正在开发中,欢迎各原生平台开发者加入。通用sdk选择使用rust开发,因为rust的性能和安全性都是目前最好的。

包括但不限于:

  • [x] 发送消息(可定时的、可群发),包括:文本、图片、语音、视频、文件、位置、名片、撤回、转发、@、表情、对方正在输入、自定义消息等
  • [x] 按需拉取离线消息,且没有消息数量/天数限制
  • [x] 群聊20万成员上限
  • [x] 端对端加密(ECOD密钥协商算法)
  • [x] p2p连接,无公网ip也能搭建属于自己的im服务器。(也可以使用传统网络方式)
  • [ ] 当用户不在线时,通过厂商推送(极光、腾讯、Mob)将消息推送给用户

xxim的背景

2022年初,我们公司的社交产品需要一个IM,但是我们不想使用第三方IM,所以我们自己开发了一个IM,但是我们发现开发一个IM并不容易,所以我们决定开源出来,让更多的人能够使用自己的IM。

  • 服务端使用 Go 语言开发
    • 高性能
    • 简单语法,易于维护代码
    • 部署简单
    • 服务器资源占用少
  • 客户端sdk使用 rust 开发
    • 高性能
    • 安全性高
    • 原生async/await,很适合客户端开发
    • 动静态库体积小

xxim的设计原则

通过im服务器,我们希望解决以下问题:

  • 聊天受监控
  • 消息漫游天数有限制
  • 群聊人数有限制
  • 消息占用磁盘空间过大

xxim-server 架构

点点star! ⭐

如果你喜欢或正在使用这个项目来学习或开始你的解决方案,请给它一个星。谢谢!

Star History Chart

帮助我们 🙏

如果你想帮助我们,可以投几个币给我们,你们的支持是我们开发的最大动力。

支付宝 微信 币安(USDT)
AliPay WechatPay binance

Extension points exported contracts — how you extend this code

ReqInterface (Interface)
(no doc) [38 implementers]
app/gateway/internal/handler/route.go
ReqInterface (Interface)
(no doc) [38 implementers]
sdk/types/interface.go
EnumInSliceType (Interface)
(no doc) [158 implementers]
common/utils/any.go
Indexer (Interface)
(no doc) [13 implementers]
common/xmgo/index.go
WorldService (Interface)
(no doc) [5 implementers]
app/world/client/worldservice/worldService.go
ConversationService (Interface)
(no doc) [4 implementers]
app/conversation/client/conversationservice/conversationService.go
AccountService (Interface)
(no doc) [4 implementers]
app/user/client/accountservice/accountService.go
EmailService (Interface)
(no doc) [4 implementers]
app/third/client/emailservice/emailService.go

Core symbols most depended-on inside this repo

NewToastHeader
called by 77
common/i18n/i18n.go
String
called by 49
common/utils/any.go
Marshal
called by 41
common/utils/ecdh.go
Error
called by 41
common/xmq/asynq.go
Get
called by 39
common/utils/map.go
Unmarshal
called by 35
common/utils/ecdh.go
MarshalToString
called by 25
common/utils/json.go
Lock
called by 18
common/xcache/lock.go

Shape

Method 2,099
Struct 384
Function 331
Interface 66
TypeAlias 21
FuncType 3

Languages

Go100%

Modules by API surface

common/pb/conversation.pb.go417 symbols
common/pb/user.pb.go373 symbols
common/pb/gateway.pb.go196 symbols
common/pb/message.pb.go186 symbols
common/pb/common.pb.go169 symbols
common/pb/user_grpc.pb.go130 symbols
common/pb/conversation_grpc.pb.go125 symbols
common/pb/third.pb.go118 symbols
common/pb/third_grpc.pb.go60 symbols
common/pb/message_grpc.pb.go55 symbols
common/pb/gateway_grpc.pb.go55 symbols
common/pb/xx.implement.go38 symbols

Dependencies from manifests, versioned

github.com/Masterminds/goutilsv1.1.1 · 1×
github.com/Masterminds/semverv1.5.0 · 1×
github.com/avast/retry-gov3.0.0+incompatible · 1×
github.com/beorn7/perksv1.0.1 · 1×
github.com/cespare/xxhash/v2v2.2.0 · 1×
github.com/cheekybits/gennyv1.0.0 · 1×
github.com/chenzhuoyu/base64xv0.0.0-2022111506244 · 1×
github.com/cherish-chat/imcloudx-serverv0.0.0-2023070403455 · 1×
github.com/coreos/go-semverv0.3.1 · 1×

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add xxim-server \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact