Skip to content

Commit

Permalink
Merge pull request #20 from fluent-qa/feat/fluent-app
Browse files Browse the repository at this point in the history
Feat/fluent app
  • Loading branch information
qdriven authored May 17, 2024
2 parents 3bce4cc + 280e21d commit 7bc856f
Show file tree
Hide file tree
Showing 126 changed files with 876 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ build/
.env
.evn.local
.env
susu-portal/
fluent-apps/susu-portal/
28 changes: 0 additions & 28 deletions README_bnk.md

This file was deleted.

6 changes: 5 additions & 1 deletion components/fluent-builtin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
</dependency>

<dependency>
<groupId>io.github.cdimascio</groupId>
<artifactId>dotenv-java</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package io.fluent.builtin.config;

import io.github.cdimascio.dotenv.Dotenv;

public class DotEnvConfig {

static Dotenv dotenv = Dotenv.load();


public static String getValue(String key) {
return dotenv.get(key);
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.fluent.builtin.config;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class DotEnvConfigTest {

@Test
public void testGetValue(){
var result = DotEnvConfig.getValue("TW_BEAR_TOKEN");
System.out.println(result);
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## db.setting文件

url = jdbc:postgresql://127.0.0.1:7432/test_hub?currentSchema=demo
url = jdbc:postgresql://127.0.0.1:7432/workspace?schema=qa
user = postgres
pass = changeit
pass = postgres

## 可选配置
# 是否在日志中显示执行的SQL
Expand Down
16 changes: 16 additions & 0 deletions docs/0-setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# README

- Setup By AI ChatGPT Prompt

## 环境准备

- 操作系统管理/Docker: OrbStack
- 数据库/Database: Supabase
- 开发环境: JAVA/MAVEN

## JAVA MAVEN Project Setup With Erupts




## Run it
56 changes: 56 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# README

工具,平台都好,但是如何快速构建一些可以使用的应用。一般测试开发团队需要开发能力配置:
1. 前端开发
2. 后端开发
3. 数据库管理
4. 需求编写/或者和业务测试进行沟通

带来的挑战是:
1. 成本不低,试错成本高
2. 沟通不顺畅,业务测试和测试开发想的可能会有出入
3. 有些可能不是在解决实际的问题

## 如何降低试错成本

- 把开发成本降到足够低
- 业务测试也可以通过一些方式解决自己的问题

## 低代码解决方案

- 表格方式
- 后端接口低代码
- 前端页面低代码
- 前后端一体化解决方案
- 第三方组件形式

## 表格方式

- 飞书多维表格
- Vika多维表格
- 开源替代
- nocodb
- rows
- 。。。。。。。。。。。
## 后端低代码
减少API编写开发工作量:

1. ###Database###:
- Supabase

## 一体化多代码

- erupt
- illabuilder
- 。。。。。。。。

## 第三方组件

- [] 登录授权组件
- [] 开发框架
- [] 成熟组件

## AI如何引入

AI能够带来好处

3 changes: 0 additions & 3 deletions docs/ai-help/README.md

This file was deleted.

36 changes: 36 additions & 0 deletions docs/architecture-as-code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# jianmu-architecture-as-code

#### 介绍
建木架构即代码(architecture as code)

#### 使用说明

本项目使用[Structurizr DSL](https://github.com/structurizr/dsl) 的Cli工具来生成C4 Model的架构图

该工具可以输出为PlantUML格式文件

Mac环境下可以使用Homebrew安装该工具

```
brew install structurizr-cli
```

安装完成后,可以使用以下命令来生成.puml文件到c4文件夹下

```
structurizr-cli export -workspace jianmu.dsl -format plantuml -output c4
```

#### 生成效果

*建木容器图*
![容器图](out/c4/structurizr-jianmu-container/structurizr-jianmu-container.png)

*主服务内部组件图*
![组件图](out/c4/structurizr-web-component/structurizr-web-component.png)

*执行器组件图*
![执行器组件图](out/c4/structurizr-worker-component/structurizr-worker-component.png)

*服务部署图*
![部署图](out/c4/structurizr-DevelopmentDeployment/structurizr-DevelopmentDeployment.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@startuml
title 建木自动化集成平台 - Deployment - dev

!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml
LAYOUT_WITH_LEGEND()

Deployment_Node(55, "Docker Container - Worker Server", "Docker") {
Deployment_Node(56, "Worker Server", "Golang") {
Container(57, "docker-worker", "容器化执行环境")
}

}

Deployment_Node(45, "Web Browser", "Chrome, Firefox, Safari, or Edge") {
Container(46, "SPA单页面应用", "TypeScript and Vue 3.0", "Provides all of the Jianmu functionality to customers via their web browser.")
}

Deployment_Node(47, "Docker Container - Web Server", "Docker") {
Deployment_Node(48, "Spring boot", "Spring boot 2.x") {
Container(49, "主服务", "主服务")
}

}

Deployment_Node(51, "Docker Container - Database Server", "Docker") {
Deployment_Node(52, "Database Server", "Mysql 8.0") {
Container(53, "数据库", "Mysql 8.0")
}

}

Rel_D(46, 49, "启动流程或任务", "Rest API")
Rel_D(49, 53, "读写数据", "JDBC/SSL")
Rel_D(57, 49, "获取任务执行", "http/https")
@enduml
24 changes: 24 additions & 0 deletions docs/architecture-as-code/c4/structurizr-jianmu-container.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml
title 建木自动化集成平台 - Containers

!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
LAYOUT_WITH_LEGEND()

Person(1, "用户", "泛指用户")

System_Boundary("2_boundary", "建木自动化集成平台") {
Container(11, "数据库", "Mysql 8.0")
Container(12, "docker-worker", "容器化执行环境")
Container(16, "shell-worker", "非容器化执行环境")
Container(3, "SPA单页面应用", "TypeScript and Vue 3.0", "Provides all of the Jianmu functionality to customers via their web browser.")
Container(4, "主服务", "主服务")
}

Rel_D(1, 3, "操作或查看流程与任务", "Rest API")
Rel_D(4, 11, "读写数据", "JDBC/SSL")
Rel_D(12, 4, "获取任务执行", "http/https")
Rel_D(16, 4, "获取任务执行", "http/https")
Rel_D(3, 4, "启动流程或任务", "Rest API")
@enduml
35 changes: 35 additions & 0 deletions docs/architecture-as-code/c4/structurizr-web-component.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@startuml
title 建木自动化集成平台 - 主服务 - Components

!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
LAYOUT_WITH_LEGEND()

Container(3, "SPA单页面应用", "TypeScript and Vue 3.0", "Provides all of the Jianmu functionality to customers via their web browser.")

Container_Boundary("4_boundary", "主服务") {
Component(10, "参数管理", "参数上下文")
Component(5, "DSL解析器", "DSL语法解析器")
Component(6, "触发器", "触发器上下文")
Component(7, "流程流转", "流程上下文")
Component(8, "el引擎", "表达式引擎")
Component(9, "任务分发", "任务上下文")
}

Rel_D(3, 6, "启动流程或任务", "Rest API")
Rel_D(3, 5, "提交DSL定义", "Rest API")
Rel_D(5, 7, "保存流程定义", "Java API")
Rel_D(6, 7, "触发流程启动", "Java API")
Rel_D(6, 9, "直接触发任务启动", "Java API")
Rel_D(7, 9, "任务节点激活事件触发任务启动", "Java API")
Rel_D(7, 9, "任务节点中止事件触发任务中止", "Java API")
Rel_D(7, 8, "执行表达式", "Java API")
Rel_D(8, 7, "返回表达式结果", "Java API")
Rel_D(9, 7, "返回任务执行状态", "Java API")
Rel_D(7, 10, "读取参数信息", "Java API")
Rel_D(7, 10, "流程执行结果参数写入", "Java API")
Rel_D(9, 10, "读取参数信息", "Java API")
Rel_D(9, 10, "任务执行结果参数写入", "Java API")
@enduml
22 changes: 22 additions & 0 deletions docs/architecture-as-code/c4/structurizr-worker-component.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@startuml
title 建木自动化集成平台 - docker-worker - Components

!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
LAYOUT_WITH_LEGEND()

Container(4, "主服务", "主服务")

Container_Boundary("12_boundary", "docker-worker") {
Component(13, "daemon", "worker守护容器")
Component(14, "代码编译", "任务运行容器")
Component(15, "Ansible执行", "任务运行容器")
}

Rel_D(13, 4, "获取任务执行", "http/https")
Rel_D(13, 4, "返回执行结果", "http/https")
Rel_D(13, 14, "启动容器", "Docker API")
Rel_D(13, 15, "启动容器", "Docker API")
@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7bc856f

Please sign in to comment.