MCPcopy Index your code
hub / github.com/openscrm/api-server

github.com/openscrm/api-server @v1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0 ↗ · + Follow
2,342 symbols 6,859 edges 390 files 1,020 documented · 44% 3 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

logo

安全,强大,易开发的企业微信SCRM

文档 | 截图 | 演示 | 安装

项目简介

OpenSCRM是一套基于GoReact超高质量企业微信私域流量管理系统

项目特点

  • 安全性高:企业微信控制了企业所有员工和客户的敏感数据,如电话号码,职位,客户标签,联系方式等,如果发生泄露, 对企业的打击是非常致命的。我们团队有来自360的资深安全开发工程师cover此问题。

  • 高性能,高稳定性:得益于Go出色的工程能力,简单有效的并发控制能力,OpenSCRM具备比肩头部Saas厂商的高性能和高稳定

  • 代码可读性优先:我们深刻认同Google对于代码管理的看法,项目开发完成只是项目的开始,更多的工作在于维护和迭代, 唯有易读的代码才能保证后期迭代的高质量,高效率,这也是Go语言的设计目标。我们有非常完善的代码注释,所有代码力求清晰易读。

  • 易开发:作为开源项目,我们为了让更多的人可以受益于此项目,我们做了大量工作力求项目简单易上手。 我们只做必要抽象(MVC),避免引入新慨念。我们坚持尽量少的中间件依赖,仅依赖Mysql和Redis, 比如延迟队列我们基于Redis实现, 没有引入Kafka;比如全文检索基于Mysql8全文检索实现,没有引入ES。

Python,PHP,NodeJS开发者可以放心使用本项目,本项目做了大量工作力求简单,非常容易上手。

对于PHPer

我想大多数PHPer看到本项目一定有强烈的熟悉感,没错,此项目吸收了大量Laravel的宝贵经验,代码清晰易读, 几乎没有额外门槛。对于没有接触过Go的PHPer,只需学习掌握Go的管道协程即可驾驭本项目。

与其学Swoole,何不用Go

Swoole和Go的学习成本是差不多的,最核心的都是协程,管道。额外的只需学习Go生态的Gin和GORM两个库即可。 Go基础库不熟,可以使用goframe过渡。

项目截图

联系作者加入交流群

扫码可加入交流群

技术栈

后端技术栈

前端技术栈

目录结构

├─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://docs.openscrm.cn/an-zhuang-jiao-cheng

演示地址

请联系作者获取演示地址

联系作者

扫码可加入交流群/获取演示地址

版权声明

OpenSCRM是开源软件,但仅用于学习和研究,商用请联系我们购买授权。

Extension points exported contracts — how you extend this code

EventDelExternalContact (Interface)
EventDelExternalContact 删除企业客户事件 [6 implementers]
pkg/easywework/rx_msg_extras.go
DataExportRepo (Interface)
(no doc) [33 implementers]
app/models/data_export.go
FileStorageInterface (Interface)
(no doc) [2 implementers]
common/storage/storage.go
CallbackHandlerFunc (FuncType)
(no doc)
app/services/callback_handler.go
Codes (Interface)
(no doc)
common/ecode/ecode.go
EventDelFollowUser (Interface)
EventDelFollowUser 删除跟进成员事件 [6 implementers]
pkg/easywework/rx_msg_extras.go
EventDeleteParty (Interface)
EventDeleteParty 删除部门门 [6 implementers]
pkg/easywework/rx_msg_extras.go
EventCreateUser (Interface)
EventCreateUser 新增员工 [9 implementers]
pkg/easywework/rx_msg_extras.go

Core symbols most depended-on inside this repo

Code
called by 701
common/ecode/ecode.go
add
called by 681
common/ecode/ecode.go
ResponseError
called by 233
common/app/app.go
ResponseBadRequestError
called by 187
common/app/app.go
NewHandler
called by 179
common/app/app.go
BindAndValidateReq
called by 147
common/app/app.go
TracedError
called by 141
common/log/log.go
ResponseItem
called by 135
common/app/app.go

Shape

Method 1,223
Struct 691
Function 316
TypeAlias 73
Interface 38
FuncType 1

Languages

Go100%

Modules by API surface

pkg/easywework/rx_msg_extras.go162 symbols
pkg/easywework/external_contact_api.go77 symbols
app/constants/field.go63 symbols
pkg/easywework/oa_model.go46 symbols
pkg/easywework/rx_msg_model.go31 symbols
app/models/staff.go29 symbols
pkg/easywework/tag_api.go28 symbols
pkg/easywework/user_info_api.go27 symbols
pkg/easywework/rx_msg.go26 symbols
common/ecode/ecode.go25 symbols
pkg/easywework/contact_way_api.go23 symbols
app/services/customer.go23 symbols

Used by 3 indexed graphs manifest dependencies, hub-wide

Datastores touched

(mysql)Database · 1 repos

For agents

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

⬇ download graph artifact