Skip to content

Commit d1be844

Browse files
committed
feat(jzero): refactor jzero frame structure
feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure feat(jzero): release v0.39.0-alpha feat(jzero): release v0.39.0-alpha feat(jzero): refactor jzero frame structure feat(jzero): refactor jzero frame structure
1 parent 90cf58b commit d1be844

282 files changed

Lines changed: 4528 additions & 1342 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,19 @@ jobs:
2323

2424
- name: Install Tool
2525
run: |
26+
cd cmd/jzero
2627
go install
2728
jzero check
2829
2930
- name: format go
3031
run: |
31-
jzero format --git-change=false
32+
jzero format -d --git-change=false
3233
3334
- uses: actions/checkout@v4
3435
- name: golangci-lint
35-
uses: golangci/golangci-lint-action@v6
36+
uses: golangci/golangci-lint-action@v7
3637
with:
37-
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
3838
version: latest
39-
40-
# Optional: working directory, useful for monorepos
41-
working-directory: ./
42-
43-
# Optional: golangci-lint command line arguments.
44-
args: --timeout 300s --verbose
45-
46-
# Optional: show only new issues if it's a pull request. The default value is `false`.
47-
# only-new-issues: true
48-
49-
# Optional: if set to true then the action will use pre-installed Go.
39+
working-directory: ${{ matrix.workdir }}
5040
skip-go-installation: true
51-
52-
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
5341
skip-pkg-cache: true
54-
55-
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
56-
# skip-build-cache: true

.github/workflows/upload.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424

2525
- name: Install Jzero and Grum
2626
run: |
27+
cd cmd/jzero
2728
go install
2829
jzero check
2930
go install github.com/jaronnie/grum@latest

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
.idea
33
dist
44
node_modules
5-
docs/package-lock.json
6-
/jzero
7-
/testdata
5+
docs/package-lock.json

.golangci.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1+
version: "2"
12
run:
2-
go: '1.24'
3+
modules-download-mode: readonly
34
linters:
5+
default: none
46
enable:
57
- thelper
6-
- gofumpt
78
- tparallel
89
- unconvert
10+
- unused
911
- wastedassign
10-
- tagliatelle
11-
12-
linters-settings:
13-
gofumpt:
14-
# Module path which contains the source code being formatted.
15-
# Default: ""
16-
module-path: github.com/jzero-io/jzero
17-
# Choose whether to use the extra rules.
18-
# Default: false
19-
extra-rules: true
20-
staticcheck:
21-
checks: [ "-SA1019" ]
12+
- whitespace
13+
formatters:
14+
enable:
15+
- gofmt
16+
- gofumpt
17+
- goimports
18+
settings:
19+
goimports:
20+
local-prefixes:
21+
- github.com/jzero-io/jzero

.goreleaser.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1
1+
version: 2
22

33
before:
44
hooks:
@@ -14,6 +14,9 @@ builds:
1414
goarch:
1515
- amd64
1616
- arm64
17+
dir: ./cmd/jzero
18+
id: jzero
19+
binary: jzero
1720

1821
archives:
1922
- format: tar.gz

.template/docs/markdown/dos.md.tpl

Lines changed: 0 additions & 4 deletions
This file was deleted.

.template/frame/api/app/go.mod.tpl

Lines changed: 0 additions & 7 deletions
This file was deleted.

.template/frame/gateway/app/go.mod.tpl

Lines changed: 0 additions & 7 deletions
This file was deleted.

.template/frame/rpc/app/go.mod.tpl

Lines changed: 0 additions & 7 deletions
This file was deleted.

README-EN.md

Lines changed: 47 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,44 @@
66
[![GitHub release](https://img.shields.io/github/release/jzero-io/jzero.svg?style=flat-square)](https://github.com/jzero-io/jzero/releases/latest)
77
[![GitHub package version](https://img.shields.io/github/v/release/jzero-io/jzero?include_prereleases&sort=semver&label=Docker%20Image%20version)](https://github.com/jzero-io/jzero/pkgs/container/jzero)
88
[![GitHub package version](https://img.shields.io/github/v/release/jzero-io/jzero-action?include_prereleases&sort=semver&label=Jzero%20Action%20Version)](https://github.com/marketplace/actions/jzero-action)
9+
[![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fvercel.jaronnie.com%2Fapi%2Fv1%2Fshields%2Fgithub%2Fjzero-io%2Fjzero%2Fpkgs%2Fcontainer%2Fjzero%2Fdownloads&label=image%20pulls)](https://vercel.jaronnie.com/api/v1/shields/github/jzero-io/jzero/pkgs/container/jzero/downloads)
910
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/jzero-io/jzero)
1011

1112
<p align="center">
1213
<img align="center" width="150px" src="https://oss.jaronnie.com/jzero.jpg">
1314
</p>
1415

16+
![Static Badge](https://img.shields.io/badge/Latest_New_Feature-blue?style=for-the-badge)
17+
18+
* Deploy jzero applications on [Vercel](https://vercel.com), [Template repository branch](https://github.com/jzero-io/templates/tree/api-vercel), [Code example](https://github.com/jaronnie/go-serverless-vercel)
19+
* Generate code based on git changes, greatly improving development experience for large projects
20+
* [Admin management system](https://github.com/jzero-io/jzero-admin) based on jzero, [Demo 1 - deployed on Vercel](https://admin.jzero.io), [Demo 2 - deployed on Alibaba Cloud Function Compute](https://jzero-admin.jaronnie.com)
21+
* [Serverless](https://docs.jzero.io/guide/serverless.html) plugin feature based on jzero, achieving multi-module decoupling and automatic dependency injection of third-party modules at compile time
22+
* [Dynamic configuration feature](https://docs.jzero.io/guide/config/dynamic_conf.html), allowing dynamic modification of server configuration without restarting the server
23+
* Implemented jzero mcp server, allowing jzero tools to be called in mcp client dialogs to generate code
24+
* The same codebase can dynamically adapt to multiple database types
25+
1526
[中文](README.md) | ENGLISH
1627

1728
## Introduction
1829

19-
Create a project through a template and generate Server/Client/Model code based on proto/api/sql files.
30+
Create projects through templates and generate Server/Client/Model code based on proto/api/sql files.
2031

2132
It has the following features:
22-
23-
* Based on the [go-zero](https://go-zero.dev) framework but not limited to the go-zero framework. In theory, it can access any framework based on template features
24-
25-
* Optimize the existing pain points of the go-zero framework and expand new features, fully compatible with the go-zero framework
26-
27-
* Generate code through minimalist instructions based on configuration files
28-
33+
* Based on the [go-zero](https://go-zero.dev) framework but not limited to the go-zero framework. In theory, it can integrate with any framework based on template features
34+
* Optimize existing pain points of the go-zero framework and extend new features, fully compatible with the go-zero framework
35+
* Generate code through minimalist commands based on configuration files
36+
* Generate code based on git changes only for modified files, greatly improving code generation efficiency for large projects
2937
* Maintain commonly used development templates and generate projects that meet enterprise-level code specifications with one click
38+
* All supporting toolchains are cross-platform, supporting Windows/Mac/Linux
3039

31-
For more details please see: https://docs.jzero.io/en. The English documentation is incomplete and is still being supplemented
40+
For more details please see: https://docs.jzero.io
3241

33-
## Install
42+
## Download
3443

3544
```shell
36-
go install github.com/jzero-io/jzero@latest
37-
# check tools
45+
go install github.com/jzero-io/jzero/cmd/jzero@latest
46+
# Check tools and download
3847
jzero check
3948
```
4049

@@ -44,21 +53,21 @@ jzero check
4453
docker pull ghcr.io/jzero-io/jzero:latest
4554
```
4655

47-
## Quick start
56+
## Quick Start
4857

4958
```shell
50-
# new project
59+
# Create new project
5160
jzero new your_project
52-
# generate server code
61+
# Generate server code
5362
cd your_project
5463
jzero gen
55-
# download dependencies
64+
# Download dependencies
5665
go mod tidy
57-
# generate swagger json
66+
# Generate swagger json
5867
jzero gen swagger
59-
# generate http sdk
68+
# Generate http client sdk
6069
jzero gen sdk
61-
# run server
70+
# Run server
6271
go run main.go server
6372
```
6473

@@ -68,35 +77,34 @@ go run main.go server
6877
docker run --rm -v ${PWD}:/app ghcr.io/jzero-io/jzero:latest new your_project
6978
cd your_project
7079
docker run --rm -v ${PWD}:/app ghcr.io/jzero-io/jzero:latest gen
71-
# download dependencies
80+
# Download dependencies
7281
go mod tidy
73-
# generate swagger json
82+
# Generate swagger json
7483
docker run --rm -v ${PWD}:/app ghcr.io/jzero-io/jzero:latest gen swagger
75-
# generate http sdk
84+
# Generate http client sdk
7685
docker run --rm -v ${PWD}:/app ghcr.io/jzero-io/jzero:latest gen sdk
77-
# 运行服务端
86+
# Run server
7887
go run main.go server
7988
```
8089

81-
For more examples code please see: https://github.com/jzero-io/examples
90+
For more example code please see: https://github.com/jzero-io/examples
91+
92+
Project practice please see:
93+
* api framework: https://docs.jzero.io/project/api.html
94+
* gateway framework: https://docs.jzero.io/project/gateway.html
8295

83-
Project Practice please see:
84-
* api frame: https://docs.jzero.io/project/api.html
85-
* gateway frame: https://docs.jzero.io/project/gateway.html
96+
## Related Projects
97+
* jzero-admin (Admin management system based on jzero): https://github.com/jzero-io/jzero-admin
8698

8799
## Roadmap
88100

89-
please see: https://docs.jzero.io/roadmap/base.html
101+
Please see: https://docs.jzero.io/roadmap/base.html
90102

91103
## Contributors
92104

93-
[CONTRIBUTING](CONTRIBUTING.md)
105+
[Contributing](https://docs.jzero.io/guide/contribute.html)
94106

95-
<div>
96-
<a href="https://github.com/jzero-io/jzero/graphs/contributors">
97-
<img src="https://contrib.rocks/image?repo=jzero-io/jzero" />
98-
</a>
99-
</div>
107+
[![Contribution Leaderboard](https://openomy.app/svg?repo=jzero-io/jzero&chart=list)](https://openomy.app/github/jzero-io/jzero)
100108

101109
## Acknowledgements
102110

@@ -113,7 +121,11 @@ This project is supported by JetBrains Open Source development License.
113121

114122
[![Star History Chart](https://api.star-history.com/svg?repos=jzero-io/jzero&type=Date)](https://star-history.com/#jzero-io/jzero&Date)
115123

116-
## Contact me
124+
## Disclaimer
125+
126+
This project is for learning and communication purposes only. Please do not use it for illegal purposes. The author is not responsible for any consequences arising from the use of this project.
127+
128+
## Contact
117129

118130
<p align="center">
119131
<img align="left" width="250px" height="250px" src="https://oss.jaronnie.com/weixin2.jpg">

0 commit comments

Comments
 (0)