Giter Site home page Giter Site logo

lvyitian / coffeechat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xmcy0011/coffeechat

0.0 1.0 0.0 135.54 MB

opensource im with server(go) and client(flutter+swift)

License: MIT License

Go 21.42% Shell 0.46% Kotlin 0.03% Swift 36.72% Objective-C 0.01% Dart 40.72% Ruby 0.57% Batchfile 0.08%

coffeechat's Introduction

CoffeeChat

opensource im with server(go) and client(flutter+swift)

Preview

flutter

screenshot

swift

screenshot

Features

设计

  • 架构设计:参考瓜子 IM
  • 协议设计:参考网易云 IM、环信、TeamTalk
  • 数据库设计
  • 消息分表存储设计
  • IM 消息 ID 生成设计

单聊群聊

  • flutter 客户端

  • 单聊

  • 多媒体消息:文本

  • 会话列表

  • 消息存储

  • 历史消息

  • 漫游消息(用户切换到任何设备都可以读取到最近的历史消息)

  • 离线消息(用户离线重新上线后收到最近 30 天的未读消息)

  • 多媒体消息:表情

  • 多媒体消息:图片

  • 未读消息计数

  • 消息推送(APNS)

  • 群聊

  • 群最高人数:200

  • 群管理:群主、加人、踢人

  • 群消息免打扰

  • 群成员管理

服务端特有

  • 负载均衡
  • 双机容灾
  • 性能压测 Benchmark
  • 业务监控
  • Redis 集群
  • docker
  • 阿里云OSS对象存储接入(40GB存储一年7块,每月100GB下行带宽一年200)
  • antispam

客户端特有

  • 消息推送提醒(系统通知栏消息提醒)
  • 消息转发
  • 网络连接状态
  • 图片管理器
  • 查找聊天记录
  • 消息同步缓存
  • 会话同步缓存
  • 头像同步缓存
  • 未读计数桌面角标
  • 免打扰模式
  • 图片压缩

特色功能

  • 阅后即焚
  • 撤回
  • 正在输入
  • 已读回执(用户发送消息,获取对方是否已读状态 )
  • 多终端已读同步(同个产品多终端情况下,同步消息已读未读的状态)
  • 端到端加密
  • 高清语音消息
  • 文件上传下载
  • 语音通话(声网FlutterSDK)
  • 视频通话
  • electron 跨平台桌面客户端
  • flutter 跨平台移动端
  • swift/iOS 客户端+SDK
  • kotlin/Android 客户端+SDK
  • vue/Web 客户端+SDK

客服功能

  • 客服会话
  • 欢迎语
  • 自动分配在线客服
  • 客服正在输入提醒
  • 回头客

智能问答功能

  • AnyQ 百度开源 FAQ 问答系统接入

聊天机器人功能

  • 图灵机器人接入
  • 小爱机器人接入
  • 思知机器人接入
  • 微信机器人接入

Architecture

总体架构:
总体架构

逻辑架构:
逻辑架构

模块架构:
模块架构

单聊模块交互图: 单聊

See More architecture

Quick Start

Build

PS:请切换到master分支,编译和运行!

client

目前仅支持 Flutter 客户端,在 ios11 模拟器下测试通过。仅测试了登录登出、单聊、发文本、未读消息计数等功能。

  1. Flutter 安装,请参考 官网
  2. 下载 IntelliJ IDEA Ultimate,链接
  3. 使用 idea 打开 cc_flutter_app
  4. 打开终端,初始化项目,命令如下
cd client/cc_flutter_app
flutter pub get
  1. 点击 Open IOS Simulator,等待模拟器启动
  2. 点击 Run 图标

server(以 mac 环境为例)

golang 的包管理工具使用的 dep,相关依赖都已经提交到 github,所以可以直接 build。

  1. golang 环境
brew isntall golang # 安装go
vim ~/.bash_profile # 加入如下配置

export GOROOT=/usr/local/Cellar/go/1.12.5/libexec
export GOPATH="/Users/xuyc/repo/go" # 使用go mod后,代码不能存放到gopath下,请注意。
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN:$GOPATH/bin

source ~/.bash_profile # 生效
go env                 # 确认goroot和gopath正确

unset GOPROXY          # go mod有些包拉不下来,可以配置GOPROXY。但是,对go get无效😭
go env -w GOPROXY=https://goproxy.cn,direct

# git clone 
cd /Users/xuyc/repo #注意不是gopath路径!
mkdir github
cd github
git clone https://github.com/xmcy0011/CoffeeChat.git
  1. gate 网关服务编译
cd server/src/app/gate
go build
  1. logic 逻辑服务编译
cd server/src/app/logic
go build

Run

  1. client see here
  2. server see here

Environment

Configuration

Dependencies

Document

  1. 产品介绍
  2. 架构和协议设计
  3. 消息分表存储
  4. IM 消息 ID 生成原理和常见技术难点
  5. 进度计划
  6. MQ在IM中的实践和选型

Examples

Benchmark

Contact

email:[email protected]

LICENSE

CoffeeChat is provided under the mit license.

coffeechat's People

Contributors

xmcy0011 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.