Documentation | Screenshots | Demo | Installation
OpenSCRM is a high-quality enterprise WeChat private domain traffic management system based on Go and React
We rely on docker-compose to start mysql and redis. The api-server back-end API is compiled and started locally, and the dashboard front-end interface is also compiled and started locally.
docker-compose up
http://localhost:9000/
https://go.dev/doc/install
conf/config.example.yaml -> conf/config.yaml
go run main.go
http://dashboard.dev.openscrm.cn:9000/
See for details: https://github.com/openscrm/dashboard
Session Archive Service Management Panel Enterprise WeChat H5 Sidebar
High security : Enterprise WeChat controls the sensitive data of all employees and customers of the company, such as phone numbers, positions, customer tags, contact information, etc. If leaked, the blow to the company will be fatal. Our team has extensive web security experience to ensure project security.
High performance and high stability : Thanks to Go's excellent engineering capabilities and simple and effective concurrency control capabilities, OpenSCRM has high performance and stability comparable to that of leading SaaS vendors.
Prioritize code readability : We deeply agree with Google’s views on code management. The completion of project development is only the beginning of the project. More work lies in maintenance and iteration. Only readable code can ensure the high quality and efficiency of later iterations. This is also the design goal of the Go language. We have very complete code comments, and all codes strive to be clear and easy to read.
Easy to develop : As an open source project, in order to allow more people to benefit from this project, we have done a lot of work to make the project simple and easy to use. We only make necessary abstractions (MVC) and avoid introducing new concepts. We insist on having as few middleware dependencies as possible, relying only on Mysql and Redis. For example, we implement delay queue based on Redis without introducing Kafka; for example, full-text retrieval is implemented based on Mysql8 full-text retrieval without introducing ES.
Python, PHP, and NodeJS developers can use this project with confidence. A lot of work has been done in this project to make it simple and very easy to get started.
├─app
│ ├─callback 企业微信事件回调处理
│ │ ├─customer_event
│ │ ├─department_event
│ │ ├─group_chat_event
│ │ ├─msg_arch_event
│ │ ├─staff_event
│ │ └─tag_event
│ ├─constants 常量定义
│ ├─consumers 队列消费
│ ├─controller 控制器
│ ├─entities 消息实体,主要定义参数,请求,响应结构体
│ ├─middleware gin请求中间件
│ ├─models 数据库模型
│ ├─requests 请求定义
│ ├─responses 响应定义
│ ├─services 服务
│ ├─tasks 定时任务
├─bin 二进制文件
├─common 共同库
│ ├─app 基于Gin封装的常用请求响应处理函数
│ ├─delay_queue 基于Redis延迟队列
│ ├─ecode 错误码
│ ├─id_generator uuid生成
│ ├─log 日志
│ ├─redis redis操作库
│ ├─session session会话
│ ├─storage 存储
│ ├─util 常用工具函数
│ └─validator 请求验证
├─conf 配置文件
├─docker
│ ├─data
│ │ ├─dashboard
│ │ │ └─dist 管理后台构建的前端静态文件
│ │ ├─mysql
│ │ │ ├─conf mysql容器配置文件
│ │ │ └─db mysql容器数据文件
│ │ ├─nginx
│ │ │ ├─conf nginx容器配置文件
│ │ │ │ └─conf.d
│ │ │ └─logs
│ │ ├─redis
│ │ │ └─db redis容器数据文件
│ │ └─sidebar
│ │ └─dist 侧边栏构建的前端静态文件
│ └─lib 企业微信提供的会话存档动态链库
├─docs 文档
├─pkg 三方库
│ └─easywework 企业微信Api调用库
│ ├─errcodes 企业微信Api错误码
├─routers Gin路由
├─scripts 脚本
└─test 测试代码
https://github.com/openscrm/api-server/wiki/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B
docs目录包含postman导出文件,可方便调试api
OpenSCRM follows the Apache2.0 protocol and is free for commercial use
get all departments from wx failedClientError { Code: 60020, Msg: "not allow to access from your ip, 错误
Log in to the Enterprise WeChat administrator backend->Security and Management->Management Tools->Contact Book Synchronization->Enterprise Trusted IP Add a public IP that allows access to the Enterprise WeChat interface
Enterprise WeChat scan login needs to configure the authorized login address domain name. If the domain name is inconsistent, this error will be prompted. The demo site uses my configuration. You need to build your own application to complete the relevant configuration.
Log in to the Enterprise WeChat administrator backend->Application Management->Application->Self-built application (your application)->Enterprise WeChat authorized login->Authorized callback domain
Check nginx configuration docker/nginx/conf/conf.d/dashboard.conf
The host IP address in docker is 172.17.0.1. All docker services default listening ports to the host. In the configuration file, fill in 172.17.0.1 where host is required.