Skip to content

Commit 7d7d60e

Browse files
committed
docs: update README
1 parent fed822c commit 7d7d60e

13 files changed

+214
-228
lines changed

README.md

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,27 @@
1515

1616
</div>
1717

18-
**Sponge** is a powerful `Go` development framework. Its core concept is to generate modular code by parsing `SQL`, `Protobuf`, or `JSON` files in reverse, these modular codes can be flexibly combined into various types of complete backend services (`similar to the characteristics of sponge cells, where disassembled sponge cells can automatically recombine into a new sponge`).
19-
20-
Sponge offers outstanding project engineering capabilities, providing an all-in-one project development solution that covers code generation, development, testing, API documentation generation, and deployment. Sponge deeply integrates a modular architecture with an AI assistant to significantly enhance development efficiency and reduce technical barriers, empowering developers to easily build stable and reliable backend systems using a "low-code" approach.
18+
**Sponge** is a powerful and easy-to-use `Go` development framework. Its core concept is to reverse-generate modular code by parsing `SQL`, `Protobuf`, and `JSON` files. These modular components can be flexibly combined into various types of complete backend services. Featuring a modular architecture and deeply integrated AI assistant, sponge significantly improves development efficiency and lowers the technical barrier, enabling the effortless construction of high-performance, highly available backend systems through a low-code approach.
2119

2220
<br>
2321

2422
### Applicable Scenarios
2523

26-
Sponge is suitable for rapidly building various types of high-performance backend services, including but not limited to:
24+
**Sponge** is ideal for rapidly building various types of high-performance backend services. Applicable scenarios include:
2725

28-
- `RESTful API` services
29-
- `Web` services (Gin-based)
30-
- `gRPC` services
31-
- `HTTP+gRPC` hybrid services
32-
- `gRPC Gateway API` services
33-
- `cloud-native` microservices
26+
* Developing internal enterprise API services
27+
* Quickly building microservices
28+
* Creating APIs for backend management systems
29+
* Building gRPC services for inter-service communication
30+
* Serving as a starting point for Go beginners or teams to learn Go project structure and best practices
31+
* Supporting teams that need to improve development efficiency and standardize coding practices
32+
* Cloud-native development
3433

35-
Additionally, developers can use custom templates to generate various types of code to meet specific business needs.
34+
In addition, developers can generate business-specific code by customizing templates.
3635

3736
<br>
3837

39-
### Core Advantages
38+
### Key Features
4039

4140
1. **One-click generation of complete backend service code**
4241
For `Web` or `gRPC` services that only require `CRUD APIs`, no `Go` code needs to be written. Simply connect to a database (e.g., `MySQL`, `MongoDB`, `PostgreSQL`, `SQLite`) to one-click generate complete backend service code and easily deploy it to Linux servers, Docker, or Kubernetes.
@@ -71,7 +70,7 @@ Additionally, developers can use custom templates to generate various types of c
7170

7271
1. **Install sponge**
7372

74-
Sponge supports installation on Windows, macOS, and Linux. Click to view the [**sponge installation guide**](https://github.com/go-dev-frame/sponge/blob/main/assets/install-en.md).
73+
Sponge supports installation on Windows, macOS, Linux and Docker. Click to view the [**sponge installation guide**](https://github.com/go-dev-frame/sponge/blob/main/assets/install-en.md).
7574

7675
2. **Open the code generation UI**
7776

@@ -87,7 +86,7 @@ Additionally, developers can use custom templates to generate various types of c
8786
<img width="1500px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/en_sponge-ui.png">
8887
</p>
8988

90-
> To access from a browser on a different host, specify the host IP or domain when starting the UI, e.g., `sponge run -a http://your_host_ip:24631`. Alternatively, you can run the UI service in Docker to support cross-host access. Click to view the guide on [running the sponge UI service in Docker](https://github.com/go-dev-frame/sponge/blob/main/assets/install-en.md#Docker%E7%8E%AF%E5%A2%83).
89+
> To access from a browser on a different host, specify the host IP or domain when starting the UI, e.g., `sponge run -a http://your_host_ip:24631`.
9190
9291
<br>
9392

@@ -97,7 +96,7 @@ Sponge has built-in rich components (for on-demand use):
9796

9897
| Components | Examples |
9998
| :--- | :-------- |
100-
| Web framework [gin](https://github.com/gin-gonic/gin) | [gin example](https://github.com/go-dev-frame/sponge/blob/main/internal/routers/routers.go#L35)<br>[gin middleware examples](https://github.com/go-dev-frame/sponge/blob/main/pkg/gin/middleware/README.md) |
99+
| Web framework [gin](https://github.com/gin-gonic/gin) | [gin example](https://github.com/go-dev-frame/sponge/blob/main/internal/routers/routers.go#L32)<br>[gin middleware examples](https://github.com/go-dev-frame/sponge/blob/main/pkg/gin/middleware/README.md) |
101100
| RPC framework [gRPC](https://github.com/grpc/grpc-go) | [gRPC example](https://github.com/go-dev-frame/sponge/blob/main/internal/server/grpc.go#L312)<br>[gRPC interceptor examples](https://github.com/go-dev-frame/sponge/blob/main/pkg/grpc/interceptor/README.md) |
102101
| Configuration parsing [viper](https://github.com/spf13/viper) | [example](https://github.com/go-dev-frame/sponge/blob/main/pkg/conf/README.md#example-of-use) |
103102
| Logging [zap](https://github.com/uber-go/zap) | [example](https://github.com/go-dev-frame/sponge/blob/main/pkg/logger/README.md#example-of-use) |
@@ -118,36 +117,36 @@ Sponge has built-in rich components (for on-demand use):
118117
| Service registration and discovery [etcd](https://github.com/etcd-io/etcd), [consul](https://github.com/hashicorp/consul), [nacos](https://github.com/alibaba/nacos) | [service registration example](https://github.com/go-dev-frame/sponge/blob/main/pkg/servicerd/registry/README.md#example-of-use)<br>[service discovery example](https://github.com/go-dev-frame/sponge/blob/main/pkg/servicerd/discovery/README.md#example-of-use) |
119118
| Adaptive collecting [profile](https://go.dev/blog/pprof) | [example](https://github.com/go-dev-frame/sponge/blob/main/pkg/prof/go-profile-en.md) |
120119
| Resource statistics [gopsutil](https://github.com/shirou/gopsutil) | [example](https://github.com/go-dev-frame/sponge/tree/main/pkg/stat#example-of-use) |
121-
| Configuration cente [nacos](https://github.com/alibaba/nacos) | [example](https://go-sponge.com/components?id=configuration-center) |
120+
| Configuration center [nacos](https://github.com/alibaba/nacos) | [example](https://go-sponge.com/component/config-center.html) |
122121
| Code quality checking [golangci-lint](https://github.com/golangci/golangci-lint) | - |
123-
| Continuous integration and deployment CI/CD [kubernetes](https://github.com/kubernetes/kubernetes), [docker](https://www.docker.com/), [jenkins](https://github.com/jenkinsci/jenkins) | [example](https://go-sponge.com/deployment?id=continuous-integration-and-deployment) |
122+
| Continuous integration and deployment CI/CD [kubernetes](https://github.com/kubernetes/kubernetes), [docker](https://www.docker.com/), [jenkins](https://github.com/jenkinsci/jenkins) | [example](https://go-sponge.com/deployment/kubernetes.html) |
124123
| Generate project business architecture diagram [spograph](https://github.com/go-dev-frame/spograph) | [example](https://github.com/go-dev-frame/spograph?tab=readme-ov-file#example-of-use) |
125-
| Custom template generation code [go template](https://pkg.go.dev/text/template@go1.23.3) | [json example](https://go-sponge.com/custom-template-field)<br>[sql example](https://go-sponge.com/custom-template-sql)<br>[protobuf example](https://go-sponge.com/custom-template-protobuf) |
124+
| Custom template generation code [go template](https://pkg.go.dev/text/template@go1.23.3) | [json example](https://go-sponge.com/guide/customize/template-json.html)<br>[sql example](https://go-sponge.com/guide/customize/template-sql.html)<br>[protobuf example](https://go-sponge.com/guide/customize/template-protobuf.html) |
126125
| AI assistant [DeepSeek](https://deepseek.com), [ChatGPT](https://chatgpt.com), [Gemini](https://gemini.google.com) | [example](https://github.com/go-dev-frame/sponge/blob/main/cmd/sponge/commands/assistant/generate.go#L44) |
127126

128127
<br>
129128

130129
### Code Generation Engine
131130

132-
The code generation engine of sponge supports two methods for generating the required project code: **built-in templates** and **custom templates**. Below are the framework diagrams for both approaches.
131+
**Sponge** offers powerful code generation capabilities, supporting both `built-in templates` and `custom templates` to quickly generate the code required for your project. It also integrates an `AI assistant` to help generate business logic code.
133132

134-
1. The framework for code generation based on built-in templates in sponge is shown below, supporting both SQL and Protobuf formats.
133+
1. Sponge generates a code framework based on built-in templates, as shown in the diagram below:
135134

136135
<p align="center">
137136
<img width="1500px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/sponge-framework.png">
138137
</p>
139138

140139
<br>
141140

142-
2. The framework for code generation based on custom templates in sponge is shown below, supporting JSON, SQL, and Protobuf formats.
141+
2. Sponge generates a code framework based on custom templates, as shown in the diagram below:
143142

144143
<p align="center">
145144
<img width="1200px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/template-framework.png">
146145
</p>
147146

148147
<br>
149148

150-
3. Sponge generates business logic code framework based on function description information, as shown in the following figure:
149+
3. Sponge generates a business logic code framework based on functions and comments, as shown in the diagram below:
151150

152151
<p align="center">
153152
<img width="1200px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/ai-assistant-framework.png">
@@ -157,10 +156,10 @@ The code generation engine of sponge supports two methods for generating the req
157156

158157
### Microservice framework
159158

160-
Back-end services created by sponge are typical microservice architectures. The diagram below illustrates a typical layered microservice structure, featuring high performance, scalability, and built-in service governance capabilities.
159+
**Sponge** is a modern Go microservice framework that adopts a typical layered microservice architecture. It comes with a rich set of built-in service governance features, enabling developers to quickly build and maintain complex microservice systems. The structure of the framework is shown in the diagram below:
161160

162161
<p align="center">
163-
<img width="1000px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/microservices-framework.png">
162+
<img width="1000px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/en_microservices-framework.png">
164163
</p>
165164

166165
<br>
@@ -175,6 +174,12 @@ Click to view the [**test code**](https://github.com/zhufuyi/microservices_frame
175174

176175
<br>
177176

177+
### sponge Development Guide
178+
179+
You're welcome to explore the [complete technical documentation for the Sponge project](https://go-sponge.com/), which provides in-depth coverage of core topics such as code generation, development workflows, system configuration, and deployment strategies.
180+
181+
<br>
182+
178183
### Project Code Directory Structure
179184

180185
The project code directory structure created by sponge follows the [project-layout](https://github.com/golang-standards/project-layout).
@@ -191,11 +196,11 @@ Sponge supports creating three types of project code structures: `Monolithic app
191196
├── configs # Directory for configuration files
192197
├── deployments # Bare metal, docker, k8s deployment script directory.
193198
├── docs # Directory for API interface Swagger documentation.
194-
├── internal # Directory for business logic code.
199+
├── internal # Directory for project internal code.
195200
│ ├── cache # Cache directory wrapped around business logic.
196201
│ ├── config # Directory for Go structure configuration files.
197202
│ ├── dao # Data access directory.
198-
│ ├── database # database directory.
203+
│ ├── database # Directory for database initialization and migration.
199204
│ ├── ecode # Directory for system error codes and custom business error codes.
200205
│ ├── handler # Directory for implementing HTTP business functionality (specific to web services).
201206
│ ├── model # Database model directory.
@@ -235,15 +240,9 @@ Sponge supports creating three types of project code structures: `Monolithic app
235240

236241
<br>
237242

238-
### Sponge Development Documentation
239-
240-
Click to view [the detailed documentation](https://go-sponge.com/) for Sponge development project, including code generation, development, configuration, and deployment instructions, and more.
243+
### Examples
241244

242-
<br>
243-
244-
### Examples of use
245-
246-
#### Examples of create services
245+
#### Sponge Create Server Code Examples
247246

248247
- [Create **web** service based on **sql** (including CRUD)](https://github.com/go-dev-frame/sponge_examples/tree/main/1_web-gin-CRUD)
249248
- [Create **grpc** service based on **sql** (including CRUD)](https://github.com/go-dev-frame/sponge_examples/tree/main/2_micro-grpc-CRUD)
@@ -252,20 +251,20 @@ Click to view [the detailed documentation](https://go-sponge.com/) for Sponge de
252251
- [Create **grpc gateway** service based on **protobuf**](https://github.com/go-dev-frame/sponge_examples/tree/main/5_micro-gin-rpc-gateway)
253252
- [Create **grpc+http** service based on **protobuf**](https://github.com/go-dev-frame/sponge_examples/tree/main/_10_micro-grpc-http-protobuf)
254253

255-
#### Examples of develop complete project
256-
257-
- [Simple community web backend service](https://github.com/go-dev-frame/sponge_examples/tree/main/7_community-single)
258-
- [Simple community web service broken down into microservice](https://github.com/go-dev-frame/sponge_examples/tree/main/8_community-cluster)
259-
260-
#### Distributed transaction examples
254+
#### Sponge+DTM Distributed Transaction Examples
261255

262256
- [Simple distributed order system](https://github.com/go-dev-frame/sponge_examples/tree/main/9_order-grpc-distributed-transaction)
263257
- [Flash sale](https://github.com/go-dev-frame/sponge_examples/tree/main/_12_sponge-dtm-flashSale)
264258
- [E-Commerce system](https://github.com/go-dev-frame/sponge_examples/tree/main/_14_eshop)
265259

266-
#### Sponge+AI assistant collaborative development
260+
#### Sponge+AI Assistant Collaborative Development Examples
261+
262+
- [Home appliance retail management](https://github.com/go-dev-frame/sponge_examples/tree/main/_15_appliance_store)
263+
264+
#### Sponge Development Project Examples
267265

268-
- [Home appliance retail management platform](https://github.com/go-dev-frame/sponge_examples/tree/main/_15_appliance_store)
266+
- [Community backend services](https://github.com/go-dev-frame/sponge_examples/tree/main/7_community-single)
267+
- [Monolithic service split into microservices](https://github.com/go-dev-frame/sponge_examples/tree/main/8_community-cluster)
269268

270269
<br>
271270
<br>

assets/ai-assistant-framework.png

29.6 KB
Loading

assets/en_microservices-framework.png

115 KB
Loading

assets/en_sponge-ui.png

-9.52 KB
Loading

0 commit comments

Comments
 (0)