Skip to content

Commit cc171f2

Browse files
release: v4.3.9
1 parent 742448c commit cc171f2

301 files changed

Lines changed: 1395 additions & 243 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.

README.md

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# bbs-go
44

5-
`bbs-go` is an open-source, self-hosted community platform for forums, Q&A, and reusable knowledge.
5+
A lightweight community and Q&A platform for forums, knowledge bases, and discussions.
66

77
It combines discussions, Q&A workflows, articles, comments, notifications, moderation, roles, an admin dashboard, and optional engagement mechanics such as tasks, points, levels, and badges. Use it when chat is too noisy, static docs are not interactive enough, or heavyweight forum suites feel like too much for your team.
88

@@ -71,42 +71,7 @@ This comparison is based on public product positioning and common use cases. The
7171

7272
## Feature Map
7373

74-
```mermaid
75-
flowchart TB
76-
A["bbs-go<br/>Self-hosted Community, Q&A, and Knowledge Platform"]
77-
78-
A --> B["Forums"]
79-
A --> C["Q&A"]
80-
A --> D["Knowledge Articles"]
81-
A --> E["Discussions"]
82-
83-
B --> B1["Topics"]
84-
B --> B2["Nodes and Tags"]
85-
B --> B3["Feeds"]
86-
87-
C --> C1["Questions"]
88-
C --> C2["Answers and Comments"]
89-
C --> C3["Solved Status"]
90-
91-
D --> D1["Articles"]
92-
D --> D2["Search"]
93-
D --> D3["Organized Knowledge"]
94-
95-
E --> E1["Likes and Favorites"]
96-
E --> E2["Followers"]
97-
E --> E3["Notifications"]
98-
99-
A --> F["Admin and Moderation"]
100-
A --> G["Engagement"]
101-
102-
F --> F1["Dashboard"]
103-
F --> F2["Roles and Permissions"]
104-
F --> F3["Reports and Audit Logs"]
105-
106-
G --> G1["Tasks"]
107-
G --> G2["Points and Levels"]
108-
G --> G3["Badges"]
109-
```
74+
![bbs-go feature overview](docs/images/features_en.svg)
11075

11176
## Core Features
11277

@@ -142,11 +107,11 @@ flowchart TB
142107
- Site configuration and system settings
143108
- Operation logs and audit trails
144109

145-
## Screenshots
110+
<!-- ## Screenshots
146111
147112
![bbs-go feature overview](docs/images/features.jpg)
148113
149-
More English screenshots and short product GIFs are planned for the overseas launch materials.
114+
More English screenshots and short product GIFs are planned for the overseas launch materials. -->
150115

151116
## Roadmap
152117

README.zh-CN.md

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -28,42 +28,7 @@
2828

2929
## 功能地图
3030

31-
```mermaid
32-
flowchart TB
33-
A["bbs-go<br/>轻量级社区和问答平台"]
34-
35-
A --> B["论坛"]
36-
A --> C["问答"]
37-
A --> D["知识库"]
38-
A --> E["讨论社区"]
39-
40-
B --> B1["帖子"]
41-
B --> B2["节点与标签"]
42-
B --> B3["动态信息流"]
43-
44-
C --> C1["问题"]
45-
C --> C2["回答与评论"]
46-
C --> C3["已解决状态"]
47-
48-
D --> D1["文章"]
49-
D --> D2["站内搜索"]
50-
D --> D3["知识沉淀"]
51-
52-
E --> E1["点赞收藏"]
53-
E --> E2["关注粉丝"]
54-
E --> E3["消息通知"]
55-
56-
A --> F["管理与治理"]
57-
A --> G["用户激励"]
58-
59-
F --> F1["管理后台"]
60-
F --> F2["角色权限"]
61-
F --> F3["举报与审计"]
62-
63-
G --> G1["任务"]
64-
G --> G2["积分与等级"]
65-
G --> G3["勋章"]
66-
```
31+
![bbs-go 功能概览](docs/images/features_zh.svg)
6732

6833
## 核心功能
6934

docker-compose.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ services:
2929
mysql:
3030
condition: service_healthy
3131
volumes:
32-
- app-data:/app/data
33-
- app-logs:/app/logs
34-
- app-uploads:/app/res/uploads
32+
# bbs-go.yaml is stored in /app/data. Keep runtime files on the host
33+
# so deleting/recreating the container does not reset the install config.
34+
- ./docker-data/data:/app/data
35+
- ./docker-data/logs:/app/logs
36+
- ./docker-data/uploads:/app/res/uploads
3537
ports:
3638
- "3000:3000"
3739
environment:
@@ -49,6 +51,3 @@ services:
4951

5052
volumes:
5153
mysql-data:
52-
app-data:
53-
app-logs:
54-
app-uploads:

docker/bbs-go-docker.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: zh-CN
2+
port: 8082
3+
allowedOrigins:
4+
- "*"
5+
installed: false
6+
7+
ipLocator:
8+
ipv4DataPath:
9+
ipv6DataPath:
10+
11+
idCodec:
12+
key: 0
13+
14+
logger:
15+
filename: /app/logs/bbs-go.log
16+
maxSize: 100
17+
maxAge: 10
18+
maxBackups: 10
19+
20+
db:
21+
type: mysql
22+
url:
23+
maxIdleConns: 50
24+
maxOpenConns: 200
25+
26+
search:
27+
indexPath: /app/data/topic_index

docs/images/features_en.svg

Lines changed: 242 additions & 0 deletions
Loading

docs/images/features_zh.svg

Lines changed: 242 additions & 0 deletions
Loading

internal/controllers/admin/user_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ func (c *UserController) PostForbidden() *web.JsonResult {
137137
if user == nil {
138138
return web.JsonError(errs.NotLogin())
139139
}
140-
if !user.HasRole(constants.RoleOwner) {
141-
return web.JsonErrorMsg(locales.Get("errors.no_permission"))
142-
}
143140
var (
144141
userId = params.FormValueInt64Default(c.Ctx, "userId", 0)
145142
days = params.FormValueIntDefault(c.Ctx, "days", 0)
146143
reason = params.FormValue(c.Ctx, "reason")
147144
)
145+
if !services.PermissionService.CanForbiddenUser(user, days) {
146+
return web.JsonErrorMsg(locales.Get("errors.no_permission"))
147+
}
148148
if userId < 0 {
149149
return web.JsonErrorMsg(locales.Get("admin.user_id_required"))
150150
}

internal/controllers/api/user_controller.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package api
33
import (
44
"bbs-go/internal/models/constants"
55
"bbs-go/internal/models/resp"
6-
"bbs-go/internal/permissions"
76
"bbs-go/internal/pkg/common"
87
"bbs-go/internal/pkg/config"
98
"bbs-go/internal/pkg/errs"
@@ -317,20 +316,17 @@ func (c *UserController) PostForbidden() *web.JsonResult {
317316
if user == nil {
318317
return web.JsonError(errs.NotLogin())
319318
}
320-
if !services.PermissionService.HasPermission(user, permissions.PermissionUserForbidden.Code) {
321-
return web.JsonErrorMsg(locales.Get("user.no_permission"))
322-
}
323319
var (
324320
userId = common.GetID(c.Ctx, "userId")
325321
days = params.FormValueIntDefault(c.Ctx, "days", 0)
326322
reason = params.FormValue(c.Ctx, "reason")
327323
)
324+
if !services.PermissionService.CanForbiddenUser(user, days) {
325+
return web.JsonErrorMsg(locales.Get("user.no_permission"))
326+
}
328327
if userId < 0 {
329328
return web.JsonErrorMsg("param: userId required")
330329
}
331-
if days == -1 && !user.HasRole(constants.RoleOwner) {
332-
return web.JsonErrorMsg(locales.Get("user.no_permission"))
333-
}
334330
if days == 0 {
335331
services.UserService.RemoveForbidden(user.Id, userId, c.Ctx.Request())
336332
} else {

internal/controllers/render/tag_render.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ func BuildTag(tag *models.Tag) *resp.TagResponse {
99
if tag == nil {
1010
return nil
1111
}
12-
return &resp.TagResponse{Id: tag.Id, Name: tag.Name}
12+
return &resp.TagResponse{
13+
Id: tag.Id,
14+
Name: tag.Name,
15+
Description: tag.Description,
16+
}
1317
}
1418

1519
func BuildTags(tags []models.Tag) *[]resp.TagResponse {

internal/models/resp/response.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ type UserProfile struct {
9191
}
9292

9393
type TagResponse struct {
94-
Id int64 `json:"id"`
95-
Name string `json:"name"`
94+
Id int64 `json:"id"`
95+
Name string `json:"name"`
96+
Description string `json:"description"`
9697
}
9798

9899
type ArticleSimpleResponse struct {

0 commit comments

Comments
 (0)