Skip to content
This repository has been archived by the owner on Jul 13, 2024. It is now read-only.

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
xezzon committed Jan 14, 2024
1 parent 0a3764c commit e7ce4d0
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 21 deletions.
33 changes: 16 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

```
geom
├── geom-app # 服务目录
│ ├── geom-app-admin # 后台管理服务
│ └── geom-app-openapi # 开放接口服务
├── geom-service # 服务目录
│ ├── geom-service-admin # 系统管理服务
│ └── geom-service-openapi # 开放平台服务
├── geom-common # 各服务共享的 bean
├── geom-core # 用于存放一些共享的内容(如全局常量、DTO)
└── geom-sdk # 提供给系统内其他服务调用 geom 服务的客户端
Expand All @@ -20,9 +20,9 @@ geom

```mermaid
flowchart LR
geom-app-admin-->geom-common
geom-app-openapi-->geom-common
geom-app-openapi-->geom-sdk
geom-service-admin-->geom-common
geom-service-openapi-->geom-common
geom-service-openapi-->geom-sdk
geom-common-->geom-core
geom-sdk--> geom-core
```
Expand All @@ -32,19 +32,20 @@ flowchart LR
一个服务可能会提供多种功能,所以我们将会像这样组织项目的包:

```
geom-app-admin
geom-service-admin
├── src
│ ├── main
│ │ ├── java
│ │ │ └── io/github/xezzon/geom
│ │ │ ├── auth # 认证功能
│ │ │ │ ├── adaptor # 服务接口
│ │ │ │ ├── domain # 充血模型
│ │ │ │ │ └── convert # MapStruct 接口
│ │ │ │ ├── repository # 基础 DAO 接口
│ │ │ │ │ └── wrapper # 增强的 DAO 类
│ │ │ │ └── service # 控制逻辑接口
│ │ │ │ └── impl # 承担绝大部分业务逻辑
│ │ │ ├── user # 用户功能
│ │ │ │ ├── UserService.java # 该功能的逻辑运转中枢
│ │ │ │ ├── UserController.java # 提供前端调用的 HTTP 接口
│ │ │ │ ├── UserRpcAdaptor.java # 提供其他服务调用的 RPC 接口
│ │ │ │ ├── domain # 模型
│ │ │ │ ├── convert # MapStruct 接口
│ │ │ │ ├── repository # DAO 接口
│ │ │ │ ├── service # 向其他包提供的功能的接口定义
│ │ │ │ └── README.md # 该功能的细节说明
│ │ │ ├── dict # 字典功能
│ │ │ └── AdminApplication.java # 启动类
│ │ └── resources
Expand All @@ -56,8 +57,6 @@ geom-app-admin
└── generated-sources # 由 Maven 插件生成的代码,是成品的一部分,请不要试图改动
```

其余部分与之类似,会先按功能分包,再按层级分包。

## 如何运行与测试

`TODO`
Expand Down
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
# geom

一组可独立部署、提供 SDK 的微服务
一组面向云原生开发的基础设施服务。帮助开发者专注于业务代码的开发

## 功能特性

`TODO`
geom 后端提供 2 个服务与 1 个 SDK。

- admin 系统管理服务
- 认证
- 菜单权限
- 数据权限
- SSO
- 字典
- openapi 开发平台服务
- 发布接口
- 订阅接口
- WEBHOOK
- 消息解密/验证
- sdk

## 如何使用

![部署架构](doc/assets/部署架构.png)
最简单的方式是通过 [docker-compose](./docker-compose.yml) 启动。

`TODO`
```shell
#!/bin/bash
# 只需要运行需要的服务
docker-compose up -d geom-service-admin geom-service-openapi
```

## 技术栈

Expand Down
29 changes: 29 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3'
services:
geom-service-admin:
image: ghcr.io/xezzon/geom-service-admin
container_name: geom-service-admin
environment:
- GEOM_JWT_ISSUER=xezzon.github.io
- OTEL_SDK_DISABLED=false # 启用 OpenTelemetry
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel:4317
restart: unless-stopped
geom-service-openapi:
image: ghcr.io/xezzon/geom-service-openapi
container_name: geom-service-openapi
environment:
- GEOM_JWT_ISSUER=xezzon.github.io
- OTEL_SDK_DISABLED=false
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel:4317
restart: unless-stopped
myapp: # 开发者自己的业务代码 打包为 Docker 镜像
image: myapp
container_name: myapp

networks:
default:
driver: bridge
gateway_default: # 与网关处于同一网络下
external: true
telemetry_collector: # 与 OpenTelemetry Collector 处于同一网络下,可以通过其容器名作为域名进行访问
external: true
5 changes: 5 additions & 0 deletions geom-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 应用服务

## jib-maven-plugin

## OpenTelemetry
1 change: 1 addition & 0 deletions geom-service/geom-service-openapi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 开放平台服务

0 comments on commit e7ce4d0

Please sign in to comment.