Skip to content

Commit 1ccabc3

Browse files
committed
阶段性:第一次版本
1 parent 3f370da commit 1ccabc3

File tree

298 files changed

+68253
-6571
lines changed

Some content is hidden

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

298 files changed

+68253
-6571
lines changed

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
# Output of the go coverage tool, specifically when used with LiteIDE
1212
*.out
1313

14-
# Dependency directories (remove the comment below to include it)
15-
vendor/
16-
1714
# Go workspace file
1815
go.work
1916

@@ -36,6 +33,7 @@ bin/
3633
.vscode/
3734
.idea/
3835
*.swp
39-
/deploy/*
36+
/deploy/cfg/*
37+
/deploy/local/*
4038
/node_modules/
4139
configs/*.yaml

README.md

Lines changed: 45 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,56 @@
1-
# Kratos Project Template
1+
## 我的博客
2+
[MyBlog:记录简单生活](https://blog.gwsee.com)
23

3-
## Install Kratos
4+
## Star
5+
感谢你的星星
6+
7+
已完成功能:
8+
博客,代办事项,随机名言警句,备忘录
9+
个人介绍,工作经历,项目经历
10+
旅行相册
11+
12+
## 关于技术
13+
golang+vue3为主
14+
15+
go主要是用的b站开源的kratos框架;
16+
采用了bff层和grpc通信的模式,分开了所有不同类型的应用.
17+
另外还涉及了mysql,ent,ali-oss
18+
19+
vue3 使用的vite构建的 可以在web/pc目录下看到;大部分样式是使用v0帮我优化调整的
20+
前期采用了部分的ant-design-vue的ui 后期使用的是 tailwindcss样式表
21+
22+
## 关于后续可能做的
423
```
5-
go install github.com/go-kratos/kratos/cmd/kratos/v2@latest
24+
付费博客
25+
项目脑图
26+
临时身份
627
```
7-
## Create a service
28+
### PC预览
29+
![首页](deploy/asset/home.png)
830
```
9-
# Create a template project
10-
kratos new server
11-
12-
cd server
13-
# Add a proto template
14-
kratos proto add api/server/server.proto
15-
# Generate the proto code
16-
kratos proto client api/server/server.proto
17-
# Generate the source code of service by proto file
18-
kratos proto server api/server/server.proto -t internal/service
19-
20-
go generate ./...
21-
go build -o ./bin/ ./...
22-
./bin/server -conf ./configs
31+
功能:代办事项,随机名言警句,博客查询,备忘录
2332
```
24-
## Generate other auxiliary files by Makefile
33+
![博客](deploy/asset/blog.png)
2534
```
26-
# Download and update dependencies
27-
make init
28-
# Generate API files (include: pb.go, http, grpc, validate, swagger) by proto file
29-
make api
30-
# Generate all files
31-
make all
35+
功能:博客记录
3236
```
33-
## Automated Initialization (wire)
37+
![旅行](deploy/asset/travel.png)
38+
```
39+
功能:支持不同情况展示形式不一致
40+
记录各种照片
3441
```
35-
# install wire
36-
go get github.com/google/wire/cmd/wire
37-
38-
# generate wire
39-
cd cmd/server
40-
wire
42+
![](deploy/asset/pictures.png)
4143
```
42-
43-
## Docker
44-
```bash
45-
# build
46-
docker build -t <your-docker-image-name> .
47-
48-
# run
49-
docker run --rm -p 8000:8000 -p 9000:9000 -v </path/to/your/configs>:/data/conf <your-docker-image-name>
44+
功能:按照一定规则展示的所有自己能够看到的照片
5045
```
51-
52-
计划中:
53-
后端:golang
54-
前端:vue3
55-
管理:react?目前好像不需要
56-
功能点--现在想到的
57-
首页--登录;
58-
游历(简历)
59-
留言
60-
随笔(日常记录)
61-
学习(学习记录)
62-
面试(随机面试;自己选择tag+其他的)
63-
64-
65-
## 对于单个或者说小团队 bff层不建议
66-
67-
68-
## CMD
69-
```bash
70-
kratos new blog
71-
cd blog
72-
73-
kratos new app/blog --nomod
74-
kratos proto add api/blog/v1/demo.proto
75-
kratos proto client api/blog/v1/demo.proto ##不会生成http文件
76-
kratos proto client api/blog/v1/demo.proto -- --go-http_opt=omitempty=false ##会生成http文件
77-
kratos proto server api/blog/v1/demo.proto -t internal/service
78-
kratos proto client api/tools/v1/tools.proto -- --go-http_opt=omitempty=false
79-
kratos proto client api/user/v1/user.proto -- --go-http_opt=omitempty=false
80-
kratos proto client api/account/v1/account.proto -- --go-http_opt=omitempty=false
81-
kratos proto client api/bff/v1/user.proto -- --go-http_opt=omitempty=false
82-
protoc --go_out=./ conf.proto --go_opt=paths=source_relative
83-
protoc --go_out=./ page.proto --go_opt=paths=source_relative
84-
85-
protoc --go_out=./ index.proto --go_opt=paths=source_relative
86-
protoc --go_out=./ cfg.proto --go_opt=paths=source_relative
87-
protoc --go_out=./ ./app/user/internal/conf/conf.proto --go_opt=paths=source_relative
88-
protoc --go_out=./ ./app/tools/internal/conf/conf.proto --go_opt=paths=source_relative
89-
protoc --go_out=./ ./api/global/cfg.proto --go_opt=paths=source_relative
46+
![自我介绍](deploy/asset/about.png)
47+
```
48+
功能:个人简介,工作经历,项目经历等
9049
```
50+
### 移动端预览
51+
![首页](deploy/asset/home-mobile.png)
52+
![博客](deploy/asset/blog-mobile.png)
53+
![旅行](deploy/asset/travel-mobile.png)
54+
![](deploy/asset/pictures-mobile.png)
55+
![自我介绍](deploy/asset/about-mobile.png)
56+

0 commit comments

Comments
 (0)