mirror of
https://github.com/zhufuyi/sponge.git
synced 2025-12-24 10:40:55 +08:00
docs: update README
This commit is contained in:
20
.github/RELEASE.md
vendored
20
.github/RELEASE.md
vendored
@@ -1,22 +1,4 @@
|
||||
|
||||
## Changelog
|
||||
|
||||
### 1. **Enhanced TLS Encryption Support**
|
||||
|
||||
The web service now supports multiple TLS encryption methods, including automatic certificate generation, manual certificate upload, Let's Encrypt auto-renewal, and dynamic certificate retrieval via remote APIs. Additionally, it features extensible architecture for dynamically obtaining certificates from configuration centers like etcd and Consul.
|
||||
|
||||
### 2. **Route Reverse Proxy Capability**
|
||||
|
||||
The web services support reverse proxy capabilities similar to Nginx, supporting flexible route configuration and request forwarding.
|
||||
|
||||
### 3. **Static Resource Serving**
|
||||
|
||||
Efficient serving of static files and web pages through route mapping, enabling one-stop hosting for frontend resources.
|
||||
|
||||
### 4. **Customizable CORS Middleware**
|
||||
|
||||
CORS middleware now supports fully customizable configurations to meet diverse cross-origin access requirements.
|
||||
|
||||
### 5. **Bug Fix**
|
||||
|
||||
Resolved PostgreSQL `timestamptz` type mapping issue [#141](https://github.com/go-dev-frame/sponge/issues/141).
|
||||
- Fix the issue of error when the parameter `sort` value of the custom query API interface is set to `ignore count`.
|
||||
|
||||
42
README.md
42
README.md
@@ -17,8 +17,6 @@
|
||||
|
||||
---
|
||||
|
||||
<br>
|
||||
|
||||
### Introduction
|
||||
|
||||
**Sponge** is a powerful and easy-to-use **Go development framework**. Built on the core philosophy of **"Definition is Code"**, it aims to reshape the backend development experience through automatic generation technology, unleashing productivity and boosting development efficiency.
|
||||
@@ -27,20 +25,20 @@ Sponge deeply integrates a **code generation engine**, **Gin (Web framework)**,
|
||||
|
||||
**Core Features:**
|
||||
|
||||
* **Definition-Driven Development**: Automatically parses SQL, Protobuf, and JSON configuration files to generate high-quality modular code.
|
||||
* **LEGO-style Assembly**: Flexibly combines code modules in a loosely coupled manner, supporting the rapid construction of **monolithic applications**, **microservice clusters**, and **gateway services**, including `RESTful API`, `gRPC`, `HTTP+gRPC`, `gRPC Gateway`, etc.
|
||||
* **Low Code, High Efficiency**: Completely eliminates tedious repetitive work such as CRUD, routing configuration, and service governance. Developers only need to focus on core business logic to deliver standardized, high-quality backend services.
|
||||
- **Definition-Driven Development**: Automatically parses SQL, Protobuf, and JSON configuration files to generate high-quality modular code.
|
||||
- **LEGO-style Assembly**: Flexibly combines code modules in a loosely coupled manner, supporting the rapid construction of **monolithic applications**, **microservice clusters**, and **gateway services**, including `RESTful API`, `gRPC`, `HTTP+gRPC`, `gRPC Gateway`, etc.
|
||||
- **Low Code, High Efficiency**: Eliminate the tedious, repetitive tasks of building underlying frameworks, developing CRUD operations, and configuring routing and governance. This allows developers to focus solely on core business logic and rapidly deliver standardized, high-quality backend services.
|
||||
|
||||
<br>
|
||||
|
||||
### Why Choose Sponge?
|
||||
|
||||
- **Extreme Development Efficiency**: One-click generation of complete, production-ready backend services (Zero-Code), including CRUD, routing, documentation, and service framework code, multiplying development efficiency.
|
||||
- **Extreme Development Efficiency**: One-click generation of complete, production-ready backend services, including CRUD, routing, documentation, and service framework code, multiplying development efficiency.
|
||||
- **Out-of-the-box Toolchain**: Provides a complete development toolchain (Generation → Business Logic → Testing → Deployment → Monitoring), eliminating the need to piece together fragmented tools.
|
||||
- **Industry Best Practices**: Built on the mainstream Go community tech stack (Gin/GORM/gRPC/Protobuf, etc.), with a standardized architecture to reduce technology selection risks.
|
||||
- **Extremely Low Learning Curve**: Easy to get started and beginner-friendly, while also meeting the customization needs of senior developers.
|
||||
- **Ideal for Team Collaboration**: Unifies project structure, improving team collaboration efficiency and code maintainability.
|
||||
* **Flexible and Extensible**: Supports custom templates, not limited to Go; capable of extending to frontend, test scripts, and other arbitrary code generation.
|
||||
- **Flexible and Extensible**: Supports custom templates, not limited to Go; capable of extending to frontend, test scripts, and other arbitrary code generation.
|
||||
- **AI-Driven Development (AI-Native)**:
|
||||
- **Sponge:** automatically builds standardized infrastructure (API, data layer, service framework).
|
||||
- **AI Assistant:** analyzes project context and generates code intelligently fill in core business logic based on project context, achieving "Infrastructure Automation, Business Intelligence".
|
||||
@@ -51,11 +49,11 @@ Sponge deeply integrates a **code generation engine**, **Gin (Web framework)**,
|
||||
|
||||
Sponge is suitable for building high-performance, maintainable backend systems, specifically for:
|
||||
|
||||
- **Rapid development of RESTful API services.**
|
||||
- **Building large-scale microservice architectures.**
|
||||
- **Cloud-native application development.**
|
||||
- **Rapid refactoring and migration of legacy projects.**
|
||||
- **Standardized engineering templates for Go beginners or teams.**
|
||||
- Rapid development of RESTful API services.
|
||||
- Building large-scale microservice architectures.
|
||||
- Cloud-native application development.
|
||||
- Rapid refactoring and migration of legacy projects.
|
||||
- Standardized engineering templates for Go beginners or teams.
|
||||
|
||||
<br>
|
||||
|
||||
@@ -82,7 +80,7 @@ No installation required, experience the code generation feature directly in you
|
||||
3. **Example: One-click Generation of Web Service Backend Code Based on SQL**
|
||||
|
||||
<p align="center">
|
||||
<img width="1500px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/en_sponge-ui.png">
|
||||
<img width="750px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/en_sponge-ui.png">
|
||||
</p>
|
||||
|
||||
- Operation Process:
|
||||
@@ -120,7 +118,7 @@ Sponge provides multiple code generation engines, supporting **built-in template
|
||||
1. Code generation engine based on **built-in templates**, as shown below:
|
||||
|
||||
<p align="center">
|
||||
<img width="1500px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/sponge-framework.png">
|
||||
<img width="1200px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/sponge-framework.png">
|
||||
</p>
|
||||
|
||||
<br>
|
||||
@@ -128,7 +126,7 @@ Sponge provides multiple code generation engines, supporting **built-in template
|
||||
2. Code generation engine based on **custom templates**, as shown below:
|
||||
|
||||
<p align="center">
|
||||
<img width="1200px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/template-framework.png">
|
||||
<img width="600px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/template-framework.png">
|
||||
</p>
|
||||
|
||||
<br>
|
||||
@@ -136,17 +134,17 @@ Sponge provides multiple code generation engines, supporting **built-in template
|
||||
3. Code generation engine based on **AI-assisted business logic**, as shown below:
|
||||
|
||||
<p align="center">
|
||||
<img width="1200px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/ai-assistant-framework.png">
|
||||
<img width="600px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/ai-assistant-framework.png">
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
||||
#### Microservice Architecture
|
||||
|
||||
The code generated by Sponge follows a typical layered architecture with built-in service governance capabilities. The structure is clear and easy to maintain. A modern microservice framework structure is shown below:
|
||||
The code generated by Sponge follows a typical layered architecture with built-in service governance capabilities. The structure is clear and easy to maintain. The microservice framework structure of Sponge is shown below:
|
||||
|
||||
<p align="center">
|
||||
<img width="1000px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/en_microservices-framework.png">
|
||||
<img width="750px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/en_microservices-framework.png">
|
||||
</p>
|
||||
|
||||
<br>
|
||||
@@ -156,10 +154,14 @@ The code generated by Sponge follows a typical layered architecture with built-i
|
||||
Based on tests with 50 concurrency and 1 million requests, services generated by Sponge demonstrate excellent performance:
|
||||
|
||||
1. **HTTP Service**
|
||||

|
||||
<p align="center">
|
||||
<img width="900px" src="https://raw.githubusercontent.com/zhufuyi/microservices_framework_benchmark/main/test/assets/http-server.png">
|
||||
</p>
|
||||
|
||||
2. **gRPC Service**
|
||||

|
||||
<p align="center">
|
||||
<img width="900px" src="https://raw.githubusercontent.com/zhufuyi/microservices_framework_benchmark/main/test/assets/grpc-server.png">
|
||||
</p>
|
||||
|
||||
👉 [**View detailed test code and environment**](https://github.com/zhufuyi/microservices_framework_benchmark).
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
## [English](../README.md) | 简体中文
|
||||
|
||||
---
|
||||
|
||||
<br>
|
||||
|
||||
### 简介
|
||||
|
||||
**Sponge** 是一款强大且易用的 **Go 开发框架**。它基于 **"Definition is Code" (定义即代码)** 的核心理念,致力于通过自动生成技术重塑后端开发体验,解放生产力,大幅提升开发效率。
|
||||
@@ -12,20 +8,20 @@ Sponge 深度集成了 **代码生成引擎**、 **Gin (Web 框架)** 与 **gRPC
|
||||
|
||||
**核心特性:**
|
||||
|
||||
* **定义驱动开发**:自动解析 SQL、Protobuf 和 JSON 配置文件,生成高质量的模块化代码。
|
||||
* **积木式组装**:以松耦合的方式灵活组合代码模块,支持快速构建 **单体应用**、**微服务集群** 及 **网关服务**,包括 `RESTful API`、`gRPC`、`HTTP+gRPC`、`gRPC Gateway` 等。
|
||||
* **低代码,高效率**:彻底消除 CRUD、路由配置、服务治理等繁琐的重复性工作。开发者只需专注于核心业务逻辑,即可交付标准化、高质量的后端服务。
|
||||
- **定义驱动开发**:自动解析 SQL、Protobuf 和 JSON 配置文件,生成高质量的模块化代码。
|
||||
- **积木式组装**:以松耦合的方式灵活组合代码模块,支持快速构建 **单体应用**、**微服务集群** 及 **网关服务**,包括 `RESTful API`、`gRPC`、`HTTP+gRPC`、`gRPC Gateway` 等。
|
||||
- **低代码,高效率**:彻底消除从底层框架搭建、CRUD开发到路由配置、服务治理等一系列繁琐的重复性工作。开发者只需专注于核心业务逻辑,即可快速交付标准化、高质量的后端服务。
|
||||
|
||||
<br>
|
||||
|
||||
### 为什么选择 Sponge?
|
||||
|
||||
- **极致的开发效率**:一键生成可直接线上部署的完整后端服务 (Zero-Code),包括 CRUD、路由、文档及服务框架代码等,开发效率成倍提升。
|
||||
- **极致的开发效率**:一键生成可直接线上部署的完整后端服务,包括 CRUD、路由、文档及服务框架代码等,开发效率成倍提升。
|
||||
- **开箱即用的工具链**:提供完整的开发工具链(生成 → 填充业务 → 测试 → 部署 → 监控),无需拼凑碎片化工具。
|
||||
- **行业最佳实践**:基于 Go 社区主流技术栈(Gin/GORM/gRPC/Protobuf 等)构建,架构规范,降低技术选型风险。
|
||||
- **极低的学习门槛**:上手简单,对新手友好,同时满足资深开发者的定制需求。
|
||||
- **适合团队协作**:统一项目结构,提升团队协作效率和代码可维护性。
|
||||
* **灵活可扩展**:支持自定义模板,不仅限于 Go,还可扩展前端、测试脚本等任意代码生成。
|
||||
- **灵活可扩展**:支持自定义模板,不仅限于 Go,还可扩展前端、测试脚本等任意代码生成。
|
||||
- **AI 驱动开发 (AI-Native)**:
|
||||
- **Sponge:** 自动构建标准化的基础设施(API、数据层、服务框架)。
|
||||
- **AI 助手:** 基于项目上下文,智能填充核心业务逻辑,实现“基建自动化,业务智能化”。
|
||||
@@ -36,11 +32,11 @@ Sponge 深度集成了 **代码生成引擎**、 **Gin (Web 框架)** 与 **gRPC
|
||||
|
||||
Sponge 适用于构建高性能、可维护的后端系统,特别适合:
|
||||
|
||||
- **快速开发 RESTful API 服务。**
|
||||
- **构建大规模微服务架构。**
|
||||
- **云原生应用开发。**
|
||||
- **旧有项目的快速重构与迁移。**
|
||||
- **Go 语言初学者或团队的标准化工程模板。**
|
||||
- 快速开发 RESTful API 服务。
|
||||
- 构建大规模微服务架构。
|
||||
- 云原生应用开发。
|
||||
- 旧有项目的快速重构与迁移。
|
||||
- Go 语言初学者或团队的标准化工程模板。
|
||||
|
||||
<br>
|
||||
|
||||
@@ -67,7 +63,7 @@ Sponge 适用于构建高性能、可维护的后端系统,特别适合:
|
||||
3. **示例:基于 SQL 一键生成 Web 服务后端代码**
|
||||
|
||||
<p align="center">
|
||||
<img width="1500px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/sponge-ui.png">
|
||||
<img width="750px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/sponge-ui.png">
|
||||
</p>
|
||||
|
||||
- 操作流程:
|
||||
@@ -105,7 +101,7 @@ Sponge 提供多种代码生成引擎,支持**内置模板**、**自定义模
|
||||
1. 基于**内置模板**的代码生成引擎,如下图所示:
|
||||
|
||||
<p align="center">
|
||||
<img width="1500px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/sponge-framework.png">
|
||||
<img width="1200px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/sponge-framework.png">
|
||||
</p>
|
||||
|
||||
<br>
|
||||
@@ -113,7 +109,7 @@ Sponge 提供多种代码生成引擎,支持**内置模板**、**自定义模
|
||||
2. 基于**自定义模板**代码生成引擎,如下图所示:
|
||||
|
||||
<p align="center">
|
||||
<img width="1200px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/template-framework.png">
|
||||
<img width="600px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/template-framework.png">
|
||||
</p>
|
||||
|
||||
<br>
|
||||
@@ -121,17 +117,17 @@ Sponge 提供多种代码生成引擎,支持**内置模板**、**自定义模
|
||||
3. **AI 辅助业务逻辑**代码生成引擎,如下图所示:
|
||||
|
||||
<p align="center">
|
||||
<img width="1200px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/ai-assistant-framework.png">
|
||||
<img width="600px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/ai-assistant-framework.png">
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
||||
#### 微服务架构
|
||||
|
||||
Sponge 生成的代码遵循典型的分层架构,内置服务治理能力,结构清晰,易于维护。一个现代的微服务框架结构如下图所示:
|
||||
Sponge 生成的代码遵循典型的分层架构,内置服务治理能力,结构清晰,易于维护。Sponge 的微服务框架结构如下图所示:
|
||||
|
||||
<p align="center">
|
||||
<img width="1000px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/microservices-framework.png">
|
||||
<img width="750px" src="https://raw.githubusercontent.com/go-dev-frame/sponge/main/assets/microservices-framework.png">
|
||||
</p>
|
||||
|
||||
<br>
|
||||
@@ -141,10 +137,14 @@ Sponge 生成的代码遵循典型的分层架构,内置服务治理能力,
|
||||
基于 50 并发、100 万次请求的测试结果显示,Sponge 生成的服务具有优异的性能表现:
|
||||
|
||||
1. **HTTP 服务**
|
||||

|
||||
<p align="center">
|
||||
<img width="900px" src="https://raw.githubusercontent.com/zhufuyi/microservices_framework_benchmark/main/test/assets/http-server.png">
|
||||
</p>
|
||||
|
||||
2. **gRPC 服务**
|
||||

|
||||
<p align="center">
|
||||
<img width="900px" src="https://raw.githubusercontent.com/zhufuyi/microservices_framework_benchmark/main/test/assets/grpc-server.png">
|
||||
</p>
|
||||
|
||||
👉 [**查看详细测试代码与环境**](https://github.com/zhufuyi/microservices_framework_benchmark)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user