Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add gomall #52

Merged
merged 221 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
ba2915a
Initial commit
baiyutang Nov 25, 2023
d8e537d
feat: add template
rogerogers Nov 26, 2023
15c70d5
feat: product init
rogerogers Dec 2, 2023
b65704c
feat: product init
rogerogers Dec 2, 2023
cdb365f
chore: template path
rogerogers Dec 3, 2023
cea8392
chore: template change
rogerogers Dec 3, 2023
82186f0
chore: grpc compress
rogerogers Dec 3, 2023
a584672
feat: remove template
rogerogers Dec 3, 2023
c84c09d
feat: idl
rogerogers Dec 3, 2023
67528ff
feat: frontend template
rogerogers Dec 4, 2023
fa567a5
chore: beautiful
rogerogers Dec 5, 2023
892cf63
feat: template
rogerogers Dec 5, 2023
70560d6
feat: template
rogerogers Dec 5, 2023
38dd796
refactor(*):frontent rename to frontend
baiyutang Dec 6, 2023
fde0dd2
chore: remove source map
rogerogers Dec 6, 2023
df303d1
style(*)
baiyutang Dec 6, 2023
a461834
chore: remove reload, use air
rogerogers Dec 6, 2023
3b707dc
chore: change color
rogerogers Dec 6, 2023
f0fa9b0
chore: rename to tmpl
rogerogers Dec 6, 2023
e241049
feat: frontend product rpc
rogerogers Dec 6, 2023
7ed856d
fix(*):conflicts
baiyutang Dec 7, 2023
9722039
chore: new product
rogerogers Dec 7, 2023
f32788a
chore: change go version to 1.20
rogerogers Dec 7, 2023
e24d8c4
chore: change go version to 1.20
rogerogers Dec 7, 2023
0bb6126
chore: image compress
rogerogers Dec 7, 2023
ce11168
Merge branch 'main' of github.com:baiyutang/gomall
rogerogers Dec 7, 2023
a92d880
feat: product
rogerogers Dec 7, 2023
2e091ca
chore: remove print
rogerogers Dec 7, 2023
5fe56f1
feat: add robots.txt
rogerogers Dec 8, 2023
96dedfd
feat: frontend template
rogerogers Dec 9, 2023
12d6f6c
Merge branch 'main' of github.com:baiyutang/gomall
rogerogers Dec 9, 2023
52dccc8
feat: template checkout
rogerogers Dec 9, 2023
872f2e9
feat: template result
rogerogers Dec 9, 2023
9929de0
feat: template result
rogerogers Dec 9, 2023
f9cfb92
feat: cart redirect
rogerogers Dec 9, 2023
d2614ba
chore: add demo notice
rogerogers Dec 9, 2023
ece5174
chore: move notice to banner
rogerogers Dec 9, 2023
e325800
feat: mtl
rogerogers Dec 10, 2023
f7f4ed5
chore: update prometheus version
rogerogers Dec 10, 2023
f02babb
feat: add cart
rogerogers Dec 10, 2023
f9cea97
chore: new proto
rogerogers Dec 11, 2023
430e1ef
feat: user
rogerogers Dec 17, 2023
29a63d6
chore: go version 1.20
rogerogers Dec 17, 2023
0a95203
feat: checkout payment
rogerogers Dec 17, 2023
500714c
chore: default exist timeout 1s
rogerogers Dec 17, 2023
105ade1
feat: login
rogerogers Dec 17, 2023
c481041
fix: checkout page user
rogerogers Dec 17, 2023
64cd81d
chore: 1.20
rogerogers Dec 18, 2023
3495f5e
feat: redirect 302
rogerogers Dec 18, 2023
e20c052
feat(payment/order):client&server impl code
baiyutang Dec 18, 2023
58125c2
feat(payment/order):client&server impl code
baiyutang Dec 18, 2023
1d866e3
chore(*):makefile & go.work
baiyutang Dec 18, 2023
5a3f50f
chore(*):makefile
baiyutang Dec 18, 2023
605d62b
feat: registry
rogerogers Dec 18, 2023
419d5ba
chore: merge origin
rogerogers Dec 18, 2023
83a8cd5
chore: merge origin
rogerogers Dec 18, 2023
ba81769
Merge remote-tracking branch 'github/main'
rogerogers Dec 18, 2023
6dc9b8f
chore: gen payment
rogerogers Dec 18, 2023
8538251
chore: update workspace
rogerogers Dec 18, 2023
d7b3b3d
chore(*):docker-compose
baiyutang Dec 19, 2023
492f0af
chore(*):docker-compose
baiyutang Dec 19, 2023
1ff4143
feat: otel prometheus
rogerogers Dec 19, 2023
4df7921
Merge branch 'main' of github.com:baiyutang/gomall
rogerogers Dec 19, 2023
1a5c1e3
chore(*):docker-compose
baiyutang Dec 19, 2023
79b0b01
refactor(checkout): idl change
rogerogers Dec 19, 2023
58a192f
chore: work sync
rogerogers Dec 19, 2023
93d5897
chore: rename client name
rogerogers Dec 19, 2023
9f135ec
feat: checkout
rogerogers Dec 19, 2023
acbadcb
chore(*):makefile
baiyutang Dec 20, 2023
8fffbf6
chore(*):makefile
baiyutang Dec 20, 2023
75439e3
feat: payment logic
rogerogers Dec 20, 2023
cf4cd44
chore(*):tidy&lint
baiyutang Dec 21, 2023
844a3d1
Merge branch 'main' of github.com:baiyutang/gomall
baiyutang Dec 21, 2023
c9fb0db
chore(*):makefile gen code
baiyutang Dec 21, 2023
7a0a3b0
go fmt
baiyutang Dec 21, 2023
7ceccd3
chore: try biz error
rogerogers Dec 21, 2023
5c2cb96
Merge branch 'main' of github.com:baiyutang/gomall
rogerogers Dec 21, 2023
45e6dea
feat: rpcinfo
rogerogers Dec 21, 2023
b53b906
feat: use suit
rogerogers Dec 21, 2023
e09f54a
chore: apply warn
rogerogers Dec 21, 2023
4d02504
chore: unite port number
rogerogers Dec 23, 2023
f6dfa3c
feat: otel
rogerogers Dec 23, 2023
e986b0a
chore: re-gen order
rogerogers Dec 23, 2023
6f786a1
add circuitbreaker and fallback for listproducts
rogerogers Dec 23, 2023
6500304
fix: fallback pass when no err
rogerogers Dec 23, 2023
e24989c
feat: frontend cart
rogerogers Dec 23, 2023
dc12465
feat: checkout
rogerogers Dec 24, 2023
22fb432
makefile
baiyutang Dec 24, 2023
4631d27
feat: payment
rogerogers Dec 24, 2023
6c4b381
feat: cart opt
rogerogers Dec 24, 2023
563ae4c
fix: use query
rogerogers Dec 24, 2023
311aebc
feat: finish
rogerogers Dec 24, 2023
c183b94
chore: remove log for card info
rogerogers Dec 24, 2023
099fd6e
feat(*)frontend&user
baiyutang Dec 25, 2023
c26bc21
chore(*):frontend
baiyutang Dec 25, 2023
bc1a607
chore(*):frontend
baiyutang Dec 25, 2023
6584a66
chore(*):frontend
baiyutang Dec 25, 2023
68fd1d8
chore(*):frontend
baiyutang Dec 25, 2023
54006fc
chore(*):frondend
baiyutang Dec 25, 2023
d1a8e04
docs(readme.md)
baiyutang Dec 25, 2023
afc78f5
feat(order): biz data init
baiyutang Dec 25, 2023
6ea7678
chore(product):data init
baiyutang Dec 25, 2023
932a0aa
chore(frontend):about page
baiyutang Dec 25, 2023
f8d5933
Merge remote-tracking branch 'github/main'
rogerogers Dec 25, 2023
f8a0846
feat: update go.sum
rogerogers Dec 25, 2023
ebd9e52
fix: warp response
rogerogers Dec 25, 2023
8b12a2a
feat(cart)
baiyutang Dec 25, 2023
876704c
chore: add jaeger
rogerogers Dec 25, 2023
1e3b645
chore(*): fix Conflicts
baiyutang Dec 25, 2023
b1bce6a
chore(cart)
baiyutang Dec 25, 2023
9ae50f6
feat(payment): add service logic
rogerogers Dec 25, 2023
6a4f7f4
Merge branch 'main' of github.com:baiyutang/gomall
rogerogers Dec 25, 2023
caeaba9
chore(*):git ignore .env
baiyutang Dec 26, 2023
3a7b433
feat(order): frontend & order svc
baiyutang Dec 26, 2023
3f9eb5f
chore: prometheus consul
rogerogers Dec 26, 2023
0c81f51
chore(*):hotfix checkout order payment
baiyutang Dec 26, 2023
5c4f9d7
Merge branch 'main' of github.com:baiyutang/gomall
baiyutang Dec 26, 2023
770e29d
chore(checkout)
baiyutang Dec 26, 2023
e36c8c8
feat: opt mtl
rogerogers Dec 26, 2023
9dd9191
fix: log output nil
rogerogers Dec 26, 2023
253ae20
feat: prometheus consul sd
rogerogers Dec 26, 2023
a2e1e9a
feat: server prometheus
rogerogers Dec 27, 2023
4f98ce2
feat: product cache
rogerogers Dec 27, 2023
2f5eac8
chore(*):frontend & order
baiyutang Dec 27, 2023
6262fdb
chore(*):fix CONFLICT
baiyutang Dec 27, 2023
e28be44
chore(*):lint
baiyutang Dec 27, 2023
4fe75d7
chore(*):tidy
baiyutang Dec 27, 2023
848b8d5
feat: hertz prometheus
rogerogers Dec 27, 2023
848ecc7
Merge branch 'main' of github.com:baiyutang/gomall
rogerogers Dec 27, 2023
ae2ad67
chore(*):.gitignore
baiyutang Dec 27, 2023
cc16f1d
Merge branch 'main' of github.com:baiyutang/gomall
baiyutang Dec 27, 2023
e1a8b30
chore(*):.makefile & tidy
baiyutang Dec 27, 2023
9a37ed8
chore: remove sth
rogerogers Dec 27, 2023
d4656e3
Merge branch 'main' of github.com:baiyutang/gomall
rogerogers Dec 27, 2023
4375d62
docs(readme.md)
baiyutang Dec 27, 2023
0880bbe
Merge branch 'main' of github.com:baiyutang/gomall
baiyutang Dec 27, 2023
a40a95e
docs(readme.md)
baiyutang Dec 27, 2023
0ef518b
chore(makefile):help
baiyutang Dec 27, 2023
16c371c
chore: air kill delay
rogerogers Dec 27, 2023
cb8568a
feat: add trace id header
rogerogers Dec 27, 2023
2d5f460
chore(makefile):help
baiyutang Dec 27, 2023
00676a9
feat: frontend use cwgo
rogerogers Dec 28, 2023
6137c56
chore: new idl
rogerogers Dec 29, 2023
c8d936c
chore: lint fix
rogerogers Dec 29, 2023
79a3038
chore: fix name
rogerogers Dec 29, 2023
866cc50
chore: gen frontend idl
rogerogers Dec 29, 2023
80a577c
feat: update checkout idl
rogerogers Dec 29, 2023
455e43d
style: update frontend checkout idl
rogerogers Dec 29, 2023
8ca6dcf
chore: copy to new dir
rogerogers Dec 29, 2023
b2de747
feat: cwgo frontend finish
rogerogers Dec 29, 2023
6a84c85
feat: frontend middleware
rogerogers Dec 29, 2023
d1345ae
chore(*):tidy
baiyutang Dec 30, 2023
07603c7
chore(*):fmt
baiyutang Dec 30, 2023
be29837
feat(frontend):logout
baiyutang Dec 30, 2023
375943f
feat(frontend):show error msg
baiyutang Dec 30, 2023
375c9a6
feat(frontend):order page
baiyutang Dec 30, 2023
fab2690
feat(*):config server
baiyutang Dec 30, 2023
8afe0a4
chore(*):tidy
baiyutang Dec 30, 2023
ab2e58a
chore(*):remove frontend.bak
baiyutang Dec 30, 2023
735a924
chore(*):readme & makefile
baiyutang Dec 30, 2023
d2d59e4
docs(readme.md)
baiyutang Dec 30, 2023
a128e55
docs(tutorial)
baiyutang Jan 2, 2024
61e0c4b
chore: rename all
rogerogers Jan 3, 2024
66c995e
Merge remote-tracking branch 'fork/main'
rogerogers Jan 3, 2024
bdf9223
chore: rename all
rogerogers Jan 3, 2024
634cf70
chore: add license header
rogerogers Jan 3, 2024
b6c5d13
ci(.licenserc):ignore && makefile
baiyutang Jan 4, 2024
e345220
ci(gomod check):go version
baiyutang Jan 4, 2024
1a17bbf
ci(gomod check):go version
baiyutang Jan 4, 2024
00de9f0
ci(.licenserc):ignore && makefile
baiyutang Jan 4, 2024
b1792bc
ci(typos)
baiyutang Jan 4, 2024
6676839
chore: change workflow go version
rogerogers Jan 4, 2024
f900923
style(cart): fix cart lint
rogerogers Jan 4, 2024
13b97d4
style(checkout): fix checkout lint
rogerogers Jan 4, 2024
98187e1
style(frontend): fix frontend lint
rogerogers Jan 4, 2024
a22e050
style(order): fix order lint
rogerogers Jan 4, 2024
d3478ee
style(payment): fix payment lint
rogerogers Jan 4, 2024
5efc7eb
style(product): fix product lint
rogerogers Jan 4, 2024
f23b26b
style(user): fix user lint
rogerogers Jan 4, 2024
4512190
chore: remove test for now
rogerogers Jan 4, 2024
3586545
test(user):just remove fail ut
baiyutang Jan 4, 2024
91d194c
test(*):just remove fail ut
baiyutang Jan 4, 2024
5e42950
test(*):just remove fail ut
baiyutang Jan 4, 2024
6af2923
chore(book-shop):upgarade frugal & pid
baiyutang Jan 4, 2024
a0b26c9
chore(*):upgarade frugal & pid
baiyutang Jan 4, 2024
b5f7206
chore(easy_note):upgarade frugal & pid
baiyutang Jan 4, 2024
7b86856
style(gomall):lint
baiyutang Jan 4, 2024
a4f84e2
refactor: move common mod
rogerogers Jan 5, 2024
2ad65fb
chore: add lint fix
rogerogers Jan 5, 2024
a1e69e8
style(gomall/idl):rename some fields
baiyutang Jan 5, 2024
2dbdaf1
refactor(rpc_gen): remove all kitex_gen code to rpc_gen
baiyutang Jan 5, 2024
85364e0
ci(makefile)
baiyutang Jan 5, 2024
c3362ea
ci(makefile)
baiyutang Jan 5, 2024
b3a9bbe
ci(makefile)
baiyutang Jan 5, 2024
73281a2
ci(makefile)
baiyutang Jan 5, 2024
f0cb1cc
chore(idl):remove unused kitex_gen code
baiyutang Jan 5, 2024
a5622e9
chore: remove unused file
rogerogers Jan 5, 2024
5f923fa
Merge branch 'feat/gomall-idl' of github.com:rogerogers/biz-demo into…
rogerogers Jan 5, 2024
43405e6
chore(user): rename
rogerogers Jan 5, 2024
a03085c
feat: add email service
rogerogers Jan 6, 2024
36b9056
chore: deps update
rogerogers Jan 6, 2024
d08f8bc
feat: noop email
rogerogers Jan 7, 2024
2093ebe
fix: to email
rogerogers Jan 7, 2024
96760a9
style: lint fix
rogerogers Jan 7, 2024
e0fe5d0
feat(order):markorderpaid api
baiyutang Jan 7, 2024
5e0fa12
chore: split
rogerogers Jan 7, 2024
7b1847e
Merge branch 'feat/gomall' of github.com:rogerogers/biz-demo into fea…
rogerogers Jan 7, 2024
22ed3c4
ci(.licenserc.yaml)
baiyutang Jan 8, 2024
a91d12e
ci(.licenserc.yaml)
baiyutang Jan 8, 2024
374a824
ci(email.svc): licenserc
baiyutang Jan 8, 2024
61034aa
ci(order.svc): licenserc
baiyutang Jan 8, 2024
084752a
typos(docs)
baiyutang Jan 8, 2024
d341d45
test(order):remove unsed ut
baiyutang Jan 8, 2024
daa04a1
test(email):remove unsed ut
baiyutang Jan 8, 2024
35ed59f
ci(find_modules): ignore gomall some dir
baiyutang Jan 8, 2024
c3cd1db
chore: update lint go version
rogerogers Jan 8, 2024
2628d3a
chore: lint fix
rogerogers Jan 8, 2024
52cd0f7
chore: move tutorial
rogerogers Jan 8, 2024
a213e72
chore: change license ignore
rogerogers Jan 8, 2024
6b5c237
chore: merge main
rogerogers Jan 8, 2024
282b649
chore(docker-compose.yaml):image version
baiyutang Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Pull Request Check

on: [ pull_request ]
on: [pull_request]

jobs:
compliant:
runs-on: [ self-hosted, X64 ]
runs-on: [self-hosted, X64]
steps:
- uses: actions/checkout@v3

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Tests

on: [ push, pull_request ]
on: [push, pull_request]

jobs:
ut:
Expand All @@ -10,9 +10,9 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21

- uses: actions/cache@v3
with:
Expand Down
10 changes: 7 additions & 3 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ header:
copyright-owner: CloudWeGo Authors

paths:
- '**/*.go'
- '**/*.s'
- "**/*.go"
- "**/*.s"

paths-ignore:
- bookinfo/kitex_gen/**
Expand All @@ -19,5 +19,9 @@ header:
- easy_note/cmd/api/router_gen.go
- book-shop/kitex_gen/**
- book-shop/docs/**
- gomall/app/frontend/hertz_gen/**
- gomall/rpc_gen/**
- gomall/tutorial/**

comment: on-failure

comment: on-failure
10 changes: 9 additions & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Typo check: https://github.com/crate-ci/typos

[files]
extend-exclude = ["go.mod", "go.sum", "hack/*", "check_branch_name.sh", "*/licenses/*"]
extend-exclude = [
"go.mod",
"go.sum",
"hack/*",
"check_branch_name.sh",
"*/licenses/*",
"bootstrap.*.js",
"go.work.sum"
]

[default.extend-identifiers]
7 changes: 7 additions & 0 deletions gomall/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
app/cart/.env
app/**/nohup.out
.idea/
app/**/log/
app/**/tmp/
app/**/kitex_gen/
99 changes: 99 additions & 0 deletions gomall/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
.PHONY: all
all: help

default: help

.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

##@ Initialize Project
.PHONY: init
init: ## Just copy `.env.example` to `.env` with one click, executed once.
@scripts/copy_env.sh

##@ Build

.PHONY: gen
gen: ## gen client code of {svc}. example: make gen svc=product
@scripts/gen.sh ${svc}

.PHONY: gen-client
gen-client: ## gen client code of {svc}. example: make gen svc=product
@cd rpc_gen && cwgo client --type RPC --service ${svc} --module github.com/cloudwego/biz-demo/gomall/rpc_gen -I ../idl --idl ../idl/${svc}.proto

.PHONY: gen-server
gen-server: ## gen service code of {svc}. example: make gen-server svc=product
@cd app/${svc} && cwgo server --type RPC --service ${svc} --module github.com/cloudwego/biz-demo/gomall/app/${svc} --pass "-use github.com/cloudwego/biz-demo/gomall/rpc_gen/kitex_gen" -I ../../idl --idl ../../idl/${svc}.proto

.PHONY: gen-checkout-client
gen-checkout-client:
@cd app/frontend && cwgo client -I ../../idl --type RPC --service checkout --module github.com/cloudwego/biz-demo/gomall/app/frontend --idl ../../idl/checkout.proto

.PHONY: gen-order-client
gen-order-client:
@cd app/frontend && cwgo client -I ../../idl --type RPC --service order --module github.com/cloudwego/biz-demo/gomall/app/frontend --idl ../../idl/order.proto

.PHONY: gen-frontend
gen-frontend:
@cd app/frontend && cwgo server -I ../../idl --type HTTP --service frontend --module github.com/cloudwego/biz-demo/gomall/app/frontend --idl ../../idl/frontend/checkout_page.proto

##@ Build

.PHONY: watch-frontend
watch-frontend:
@cd app/frontend && air

.PHONY: tidy
tidy: ## run `go mod tidy` for all go module
@scripts/tidy.sh

.PHONY: lint
lint: ## run `gofmt` for all go module
@gofmt -l -w app
@gofumpt -l -w app

.PHONY: vet
vet: ## run `go vet` for all go module
@scripts/vet.sh

.PHONY: lint-fix
lint-fix: ## run `golangci-lint` for all go module
@scripts/fix.sh

.PHONY: run
run: ## run {svc} server. example: make run svc=product
@scripts/run.sh ${svc}

##@ Development Env

.PHONY: env-start
env-start: ## launch all middleware software as the docker
@docker-compose up -d

.PHONY: env-stop
env-stop: ## stop all docker
@docker-compose down

.PHONY: clean
clean: ## clern up all the tmp files
@rm -r app/**/log/ app/**/tmp/

##@ Open Browser

.PHONY: open.gomall
open-gomall: ## open `gomall` website in the default browser
@open "http://localhost:8080/"

.PHONY: open.consul
open-consul: ## open `consul ui` in the default browser
@open "http://localhost:8500/ui/"

.PHONY: open.jaeger
open-jaeger: ## open `jaeger ui` in the default browser
@open "http://localhost:16686/search"

.PHONY: open.prometheus
open-prometheus: ## open `prometheus ui` in the default browser
@open "http://localhost:9090"

88 changes: 88 additions & 0 deletions gomall/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Gomall
[中文](README_cn.md)

This is a teaching project for newbie using CloudWeGo

## Technology Stack
| technology | introduce |
|---------------|----|
| cwgo | - |
| kitex | - |
| [bootstrap](https://getbootstrap.com/docs/5.3/getting-started/introduction/) | Bootstrap is a powerful, feature-packed frontend toolkit. Build anything—from prototype to production—in minutes. |
| Hertz | - |
| MySQL | - |
| Redis | - |
| ES | - |
| Prometheus | - |
| Jaeger | - |
| Docker | - |


## Biz Logic
- [x] The pages check auth
- [x] Register
- [x] Login
- [x] Logout
- [x] Product categories
- [x] Products
- [x] Add to cart
- [x] The number badge of cart products
- [x] Checkout
- [x] Payment
- [x] Orders center

## How to use
### Prepare
List required
- Go
- IDE / Code Editor
- Docker
- [cwgo](https://github.com/cloudwego/cwgo)
- kitex `go install github.com/cloudwego/kitex/tool/cmd/kitex@latest`
- [Air](https://github.com/cosmtrek/air)
- ...

### Clone code
```
git clone ...
```

### Copy `.env` file
```
make init
```
*Note:*`You must generate and input SESSION_SECRET random value for session`

### Download go module
```
make tidy
```

### Start Docker Compose
```
make env-start
```
if you want to stop their docker application,you can run `make env-stop`.

### Run Service
This cmd must appoint a service.

*Note:* `Run the Go server using air. So it must be installed`
```
make run svc=`svcName`
```
### View Gomall Website
```
make open-gomall
```
### Check Registry
```
make open-consul
```
### Make Usage
```
make
```
## Contributors
- [rogerogers](https://github.com/rogerogers)
- [baiyutang](https://github.com/baiyutang)
86 changes: 86 additions & 0 deletions gomall/README_cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Gomall
[EN](README.md)

新人学习 CloudWeGo 的教学项目

## 技术栈
| 技术 | 介绍 |
|---------------|----|
| cwgo | - |
| kitex | - |
| [bootstrap](https://getbootstrap.com/docs/5.3/getting-started/introduction/) | Bootstrap is a powerful, feature-packed frontend toolkit. Build anything—from prototype to production—in minutes. |
| Hertz | - |
| MySQL | - |
| Redis | - |
| ES | - |
| Prometheus | - |
| Jaeger | - |
| Docker | - |

## 业务逻辑
- [x] 页面访问认证检查
- [x] 注册
- [x] 登录
- [x] 退出
- [x] 产品分类
- [x] 产品
- [x] 加购
- [x] 购物车数量角标
- [x] 下单
- [x] 支付
- [x] 订单中心

## 如何使用
### 准备
必备清单
- Go
- IDE / Code Editor
- Docker
- [cwgo](https://github.com/cloudwego/cwgo)
- kitex `go install github.com/cloudwego/kitex/tool/cmd/kitex@latest`
- [Air](https://github.com/cosmtrek/air)
- ...

### 克隆项目
```
git clone ...
```

### 拷贝 `.env` 文件
```
make init
```
*Note:*`必须生成并输入 SESSION_SECRET 值供 session 功能正常使用`
### 下载 Go 依赖
```
make tidy
```

### 启动容器
```
make env-start
```
if you want to stop their docker application,you can run `make env-stop`.

### 启动某服务
该命令必须执行一个服务

*注意:* `我们使用 air 运行并热加载,必须先安装好`
```
make run svc=`svcName`
```
### 浏览 Gomall 站点
```
make open-gomall
```
### 查看注册中心
```
make open-consul
```
### Make 用法
```
make
```
## 贡献者
- [rogerogers](https://github.com/rogerogers)
- [baiyutang](https://github.com/baiyutang)
7 changes: 7 additions & 0 deletions gomall/app/cart/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MYSQL_USER=root
MYSQL_PASSWORD=root
MYSQL_HOST=127.0.0.1
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:4317
OTEL_EXPORTER_OTLP_INSECURE=true
REGISTRY_ENABLE=true
REGISTRY_ADDR=127.0.0.1:8500
Loading
Loading