
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
github.com/zhufuyi/sponge
Sponge is a powerful and easy-to-use Go development framework. Its core philosophy is "Definition is Code". It generates modular Go code by parsing SQL
, Protobuf
, and JSON
files. These code modules can be flexibly combined to build various types of complete backend services.
Sponge provides a one-stop project development solution, covering code generation, development, testing, API documentation, and deployment. It helps developers easily build stable and reliable high-performance backend services (including RESTful API, gRPC, HTTP+gRPC, gRPC Gateway, etc.) in a "low-code" manner, significantly improving the efficiency and quality of project development.
For
Web
,gRPC
, orHTTP+gRPC
services that only requireCRUD APIs
, there is no need to write anyGo
code. Simply connect to a database (such asMySQL
,MongoDB
,PostgreSQL
,SQLite
), and you can generate the complete backend service code with one click and easily deploy it to a Linux server, Docker, or Kubernetes.
To build general-purpose
Web
,gRPC
,HTTP+gRPC
, orgRPC Gateway
services, you only need to focus on these three steps:
- Define database tables (SQL DDL);
- Describe the API in a Protobuf file (Protobuf IDL);
- Implement the business logic (supports a built-in AI assistant to automatically generate and merge business logic code).
All basic code, including CRUD APIs, service framework, and glue code, is automatically generated by Sponge, allowing developers to focus on core business and comprehensively improve development efficiency.
Sponge supports generating various types of code required for a project through custom templates, not limited to the
Go
language. Examples includebackend code
,frontend code
,test code
,build and deployment scripts
, etc.
Sponge provides code generation on a web page, avoiding complex command-line operations. Simply fill in the parameters on the page to generate code with one click.
Sponge, combined with its built-in AI assistants (DeepSeek, ChatGPT, Gemini), creates a complete, efficient, and intelligent development solution:
- Sponge: Responsible for the automatic generation of infrastructure code, including
service framework
,CRUD APIs
,custom APIs (without business logic)
, etc., ensuring a unified and standardized architecture.- AI Assistant: Focuses on business logic implementation, assisting with tasks such as
database table design
,Protobuf API definition
, andbusiness logic writing
, reducing repetitive work and improving R&D efficiency.
Sponge is suitable for rapidly building various types of high-performance backend services, including the following scenarios:
Additionally, developers can generate various types of code to meet business needs through custom templates.
Sponge provides an online experience for code generation: Code Generation.
Note: If you need to run the downloaded service code locally, you must first complete the local installation of Sponge.
Install Sponge: Supports Windows/macOS/Linux/Docker, see the Sponge Installation Guide.
Open the Code Generation UI Page
sponge run
Access http://localhost:24631
in your local browser to generate code.
Example: One-Click Generation of Complete Web Service Backend Code
make docs
.make run
.http://localhost:8080/swagger/index.html
in the browser and use the Swagger UI to test APIs.Sponge has built-in support for over 30 common components in the Go ecosystem (used on demand), including mainstream technology stacks such as Gin, gRPC, GORM, MongoDB, Redis, Kafka, DTM, WebSocket, Prometheus, etc. View all components.
Sponge provides 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.
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:
Performance testing of http and grpc service code created by the microservices framework: 50 concurrent, 1 million total requests.
Click to view the test code.
The project code directory structure created by sponge follows the project-layout.
Sponge supports creating project code structures for monolithic application in a single repository (monolith)
, microservices in multiple repositories (multi-repo)
, and microservices in a single repository (mono-repo)
.
.
├── api # Protobuf files and generated * pb.go directory
├── assets # Store various static resources, such as images, markdown files, etc.
├── cmd # Program entry directory
├── configs # Directory for configuration files
├── deployments # Bare metal, docker, k8s deployment script directory.
├── docs # Directory for API interface Swagger documentation.
├── internal # Directory for project internal code.
│ ├── cache # Cache directory wrapped around business logic.
│ ├── config # Directory for Go structure configuration files.
│ ├── dao # Data access directory.
│ ├── database # Directory for database initialization and migration.
│ ├── ecode # Directory for system error codes and custom business error codes.
│ ├── handler # Directory for implementing HTTP business functionality (specific to web services).
│ ├── model # Database model directory.
│ ├── routers # HTTP routing directory.
│ ├── rpcclient # Directory for client-side code that connects to grpc services.
│ ├── server # Directory for creating servers, including HTTP and grpc.
│ ├── service # Directory for implementing grpc business functionality (specific to grpc services).
│ └── types # Directory for defining request and response parameter structures for HTTP.
├── pkg # Directory for shared libraries.
├── scripts # Directory for scripts.
├── test # Directory for scripts required for testing services and test SQL.
├── third_party # Directory for third-party protobuf files or external helper programs.
├── Makefile # Develop, test, deploy related command sets .
├── go.mod # Go module dependencies and version control file.
└── go.sum # Go module dependencies key and checksum file.
.
├── api
│ ├── server1 # Protobuf files and generated *pb.go directory for service 1.
│ ├── server2 # Protobuf files and generated *pb.go directory for service 2.
│ ├── server3 # Protobuf files and generated *pb.go directory for service 3.
│ └── ...
├── server1 # Code directory for Service 1, it has a similar structure to the microservice multi repo directory.
├── server2 # Code directory for Service 2, it has a similar structure to the microservice multi repo directory.
├── server3 # Code directory for Service 3, it has a similar structure to the microservice multi repo directory.
├── ...
├── third_party # Third-party protobuf files.
├── go.mod # Go module dependencies and version control file.
└── go.sum # Go module dependencies' checksums and hash keys.
Click to view the Sponge Official Documentation, which completely covers core content such as development guides, components, service configuration, and deployment solutions.
Issues/PRs are welcome! Contribution Guide.
If Sponge is helpful to you, please give it a ⭐ Star! This will motivate us to keep iterating.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.