2 Star 14 Fork 13

navlange奇辰开源 / open-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

logo

奇辰Open-API

官网文档:https://www.lokei.cn

开放接口:https://open.lokei.cn:2443/api/documentation

演示后台:https://https://open.lokei.cn:2443/html/admin 用户名:admin 密码:123456

一、系统简介

为软件服务提供一套开源框架,快速落地需求解决方案;设计实现规范化标准接口,避免工程技术实现重复劳动;采用主流技术路线接入各大平台,构建开放生态。努力达到采用奇辰Open-API进行软件服务的简单化目标。

二、环境部署

奇辰Open-API支持多语言、多框架共同实现一套统一云原生API。

环境需求

要求
操作系统 Linux系统
PHP 8.0版本以上
Web服务 推荐Nginx

安装部署

1、nginx服务配置

root /path_to_root;  #网站根路径

location /api {
    try_files $uri $uri/ /open-api/php-api/public/index.php?$query_string;
}

'/open-api/php-api/public/index.php?$query_string'表示到后端api接口由网站根目录‘/path_to_root’下面的/open-api/php-api/public目录内index.php作为请求处理的入口文件。

2、部署后端api

  • 下载源码

在网站根路径/path_to_root下执行:git clone https://gitee.com/navlange/open-api.git ,下载open-api源码。

  • 安装第三方库

进入源码目录下php-api目录,执行composer install命令安装第三方库。

  • 初始化

拷贝一份php-api目录下的.env.example到php-api目录下面,取名为.env。修改.env数据库配置:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=******   #设置数据库名称
DB_USERNAME=******   #设置数据库用户名
DB_PASSWORD=******   #设置数据库密码
  • 导入数据库

建立数据库,数据库配置需要和.env配置文件一致。将源码install目录下origin.sql数据库导入。

3、部署前端

将install目录下admin.zip解压至网站根目录/path_to_root下的html/admin目录。

4、登入后台

通过 http://域名/html/adminhttps://域名/html/admin 访问后台。

三、业务流程

奇辰Open-API业务流程

奇辰Open-API面向的业务参与者包括:

  • 用户:使用应用功能的人;
  • 应用:由服务商提供或者自研具备用户所需功能的应用,包括H5、小程序、APP等;
  • 服务商:具备开发能力的服务商;
  • 第三方平台:微信小程序、微信支付、支付宝等第三方平台。

其中,服务商是奇辰Open-API面向的主要使用者。

奇辰Open-API业务流程主要为服务商提供开源框架为各种场地提供应用软件服务。业务所需要的后端服务由Open-API提供,包括第三方服务也通过Open-API统一调用,避免服务商重复开发第三方接口;业务前端功能可以基于奇辰Open-API提供的通用基础前端框架实现。

四、代码结构

admin----------------------后台,基于vue-element-admin实现前后端分离
doc------------------------项目文档,基于vuepress实现
iot------------------------物联网
|-gateway------------------物联网网关,基于Java Springboot框架实现
|-coap---------------------物联网CoAP协议,基于Java Springboot框架实现
|-sim----------------------物联网模拟平台,基于Java Springboot框架实现
task-----------------------任务中心,支持队列的任务管理调度中心
mobile---------------------前端,采用uniapp实现多端支持
php-api--------------------后端业务,采用Lumen框架实现的PHP版本后端

整个代码包含多个独立子项目,php-api的代码是采用Lumen(php轻型MVC框架:https://lumen.laravel-china.org/https://lumen.laravel.com/)实现的前后端分离PHP后端业务;admin目录是基于vue-element-admin实现前后端分离的后台业务,mobile目录是采用uniapp实现的支持多端(H5、小程序、APP)前端业务;task目录是采用Springboot框架实现的支持队列的任务管理调度子项目;doc目录是基于vuepress实现的全系统文档;iot包含了物联网相关子项目,其中gateway是基于Java Springboot框架实现的物联网网关。

五、业务板块

1、RBAC权限管理

  • 创始人
  • 管理员
  • 普通用户
  • 权限管理

2、用户中心

  • 用户管理
  • 粉丝管理

3、CMS内容管理

  • 表单
  • 公告
  • 文章
  • 海报
  • 二维码
  • 投诉建议
  • 评价体系

4、SCRM客户关系管理

  • 部门管理
  • 成员管理
  • 分销系统

5、会员系统

  • 会员管理
  • 等级管理

6、公共平台

  • 系统设置
  • 标签分类

7、城市商家

  • 商家门店管理
  • 商家门店Dashboard
  • 城市小区管理

8、支付系统

微信支付

  • 微信支付平台证书管理
  • JSAPI支付
  • 小程序支付
  • 支付回调

支付宝支付

  • 支付宝支付

储值系统

*储值卡

收银系统

9、消息中心

  • 微信模板消息
  • 小程序订阅模板消息

10、物联网

  • 物联网网关

11、行业应用

  • 从业人员管理
  • 调度中心

12、物流系统

  • 快递公司
  • 快递配送

13、社区论坛

  • 帖子动态

六、技术路线

体系结构

体系结构

奇辰Open-API体系机构如图所示,自顶向下端层最靠近用户,提供PC、Web、微信公众号和小程序等多种接入方式;业务层和端层分别构成前后端分离架构的后端和前端,后端业务层提供RBAC权限管理、用户中心、SCRM客户关系管理、支付系统、消息中心、物联网业务和AI业务等;为了支撑业务层高效运行需要服务层实现队列服务、元数据服务、内容管理、配置服务和监控服务等;往下的数据库层提供数据持久化功能;为了更高效数据服务设计数据缓存、数据对账、数据同步和数据事务的数据层。

技术路线

框架采用的相关技术如下表所示:

模块 技术
端层 Vue:开发语言
vue-element-admin:后台框架
uniapp:前端多端开发框架
后端 lumen:php微服务后端开发框架
消息中心 Java Springboot:开发框架
Redis:消息队列
物联网网关 MQTT:物联网网关协议
CoAP:物联网CoAP协议
数据缓存 Redis:数据缓存
数据库 Mysql:关系数据库

七、第三方平台

腾讯


foo foo foo foo
微信公众号 微信小程序 微信支付 企业微信

八、关注了解更多

logo

九、奇辰Open-API交流群

QQ群:933289062 奇辰Open-API交流

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

构建软件服务SaaS的开源生态,提供前后端分离的基础软件框架,开放微服务接口API,接入主流第三方微信小程序、微信支付平台、企业微信、物联网软硬件平台等。 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
PHP
1
https://gitee.com/navlange/open-api.git
git@gitee.com:navlange/open-api.git
navlange
open-api
open-api
master

搜索帮助