This commit is contained in:
wsl-d4
2025-08-26 16:44:41 +08:00
parent 4c586c6cfc
commit 722e15b458
30 changed files with 3900 additions and 3889 deletions

View File

@@ -1,26 +1,26 @@
name: bbs-go-server
on: [ push ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Install dependencies
working-directory: ./server
run: |
go mod download
- name: Build
working-directory: ./server
run: |
make build
name: bbs-go-server
on: [ push ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Install dependencies
working-directory: ./server
run: |
go mod download
- name: Build
working-directory: ./server
run: |
make build

View File

@@ -1,32 +1,32 @@
name: bbs-go-site
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.x ]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: site/pnpm-lock.yaml
- name: Install dependencies
working-directory: ./site
run: |
pnpm install
- name: Build
working-directory: ./site
run: |
name: bbs-go-site
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.x ]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: site/pnpm-lock.yaml
- name: Install dependencies
working-directory: ./site
run: |
pnpm install
- name: Build
working-directory: ./site
run: |
pnpm build

12
bbs-go/.gitignore vendored
View File

@@ -1,7 +1,7 @@
.idea
dist
*.log
.DS_Store
node_modules
.nuxt
.idea
dist
*.log
.DS_Store
node_modules
.nuxt
.docker-compose/mysql/data

File diff suppressed because it is too large Load Diff

View File

@@ -1,85 +1,85 @@
## 项目地址
- 演示站:[https://bbs.bbs-go.com](https://bbs.bbs-go.com)
- 文档地址:[https://bbs-go.com](https://bbs-go.com)
- 问题反馈: [https://mlog.club/topics/node/3](https://mlog.club/topics/node/3)
- Github: [https://github.com/mlogclub/bbs-go](https://github.com/mlogclub/bbs-go)
- Gitee: [https://gitee.com/mlogclub/bbs-go](https://gitee.com/mlogclub/bbs-go)
## 联系我
### 用户交流群
![BBS-GO用户交流群](docs/images/qq.png)
### 加我微信
![BBS-GO用户交流群](docs/images/wechat.png)
## 介绍
`bbs-go` 是一个基于 Go 语言开发的开源社区论坛系统。它的设计旨在提供轻量、高效的社区讨论平台,支持现代化的 Web 技术栈并且易于扩展和部署。bbs-go 项目采用模块化架构,能够与其他服务和前端框架无缝集成,适合各种规模的在线社区。
项目的主要特点包括:
- **高性能**:基于 Go 语言的并发特性,能够在高负载下保持良好的性能表现。
- **灵活性**:支持自定义配置、插件扩展,易于适应不同需求。
- **简单易用**:提供简洁的管理后台,方便社区管理员管理论坛内容和用户。
- **支持 MySQL 数据库**:提供对常见数据库的支持,确保数据存储的可靠性和稳定性。
- **响应式设计**:前端使用现代化的技术,能够在移动设备和桌面设备上提供良好的用户体验。
项目主要面向开发者和社区管理者,适合搭建技术讨论、兴趣分享等类型的社区论坛。
![bbs-go功能简介](docs/images/features.jpg)
## 模块
### server
[![bbs-go-server](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-server.yml/badge.svg)](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-server.yml)
> 基于`Golang`搭建,提供接口数据支撑。
技术栈
- iris ([https://github.com/kataras/iris](https://github.com/kataras/iris)) Go语言 mvc 框架
- gorm ([http://gorm.io](http://gorm.io)) 最好用的Go语言数据库orm框架
- resty ([https://github.com/go-resty/resty](https://github.com/go-resty/resty)) Go语言好用的 http-client
- cron ([https://github.com/robfig/cron](https://github.com/robfig/cron)) 定时任务框架
- goquery ([https://github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery)) html dom 元素解析
### site
[![bbs-go-site](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-site.yml/badge.svg)](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-site.yml)
> 前端页面渲染服务,基于`nuxt.js`搭建。
技术栈
- vue.js ([https://vuejs.org](https://vuejs.org)) 渐进式 JavaScript 框架
- nuxt.js ([https://nuxtjs.org](https://nuxtjs.org)) 基于Vue的服务端渲染框架效率高到爆
### admin
[![bbs-go-admin](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-admin.yml/badge.svg)](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-admin.yml)
> 管理后台系统,基于`vue.js + element-ui`搭建。
技术栈
- vue.js ([https://vuejs.org](https://vuejs.org)) 渐进式 JavaScript 框架
- element-ui ([https://element.eleme.cn](https://element.eleme.cn)) 饿了么开源的基于 vue.js 的前端库
## 功能预览
![首页.png](https://s2.loli.net/2022/04/12/DpvPwB9dlQ6Chef.png)
![发帖.png](https://s2.loli.net/2022/04/12/KC8eXfE6sDLq34V.png)
![发动态.png](https://s2.loli.net/2022/04/12/14pMPuGjEU6kiWV.png)
![个人中心.png](https://s2.loli.net/2022/04/12/1PVNjMh9nUAXsl8.png)
![手机版.png](https://s2.loli.net/2022/04/12/mowWb78CGIaH6T2.png)
![后台首页.png](https://s2.loli.net/2022/04/12/ErX2BLTnh7ldz8D.png)
![后台配置.png](https://s2.loli.net/2022/04/12/PwK6aC74XEZlIOL.png)
## Contributors
<a href="https://github.com/mlogclub/bbs-go/graphs/contributors"><img src="https://opencollective.com/bbs-go/contributors.svg?width=890&button=false" /></a>
## 项目地址
- 演示站:[https://bbs.bbs-go.com](https://bbs.bbs-go.com)
- 文档地址:[https://bbs-go.com](https://bbs-go.com)
- 问题反馈: [https://mlog.club/topics/node/3](https://mlog.club/topics/node/3)
- Github: [https://github.com/mlogclub/bbs-go](https://github.com/mlogclub/bbs-go)
- Gitee: [https://gitee.com/mlogclub/bbs-go](https://gitee.com/mlogclub/bbs-go)
## 联系我
### 用户交流群
![BBS-GO用户交流群](docs/images/qq.png)
### 加我微信
![BBS-GO用户交流群](docs/images/wechat.png)
## 介绍
`bbs-go` 是一个基于 Go 语言开发的开源社区论坛系统。它的设计旨在提供轻量、高效的社区讨论平台,支持现代化的 Web 技术栈并且易于扩展和部署。bbs-go 项目采用模块化架构,能够与其他服务和前端框架无缝集成,适合各种规模的在线社区。
项目的主要特点包括:
- **高性能**:基于 Go 语言的并发特性,能够在高负载下保持良好的性能表现。
- **灵活性**:支持自定义配置、插件扩展,易于适应不同需求。
- **简单易用**:提供简洁的管理后台,方便社区管理员管理论坛内容和用户。
- **支持 MySQL 数据库**:提供对常见数据库的支持,确保数据存储的可靠性和稳定性。
- **响应式设计**:前端使用现代化的技术,能够在移动设备和桌面设备上提供良好的用户体验。
项目主要面向开发者和社区管理者,适合搭建技术讨论、兴趣分享等类型的社区论坛。
![bbs-go功能简介](docs/images/features.jpg)
## 模块
### server
[![bbs-go-server](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-server.yml/badge.svg)](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-server.yml)
> 基于`Golang`搭建,提供接口数据支撑。
技术栈
- iris ([https://github.com/kataras/iris](https://github.com/kataras/iris)) Go语言 mvc 框架
- gorm ([http://gorm.io](http://gorm.io)) 最好用的Go语言数据库orm框架
- resty ([https://github.com/go-resty/resty](https://github.com/go-resty/resty)) Go语言好用的 http-client
- cron ([https://github.com/robfig/cron](https://github.com/robfig/cron)) 定时任务框架
- goquery ([https://github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery)) html dom 元素解析
### site
[![bbs-go-site](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-site.yml/badge.svg)](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-site.yml)
> 前端页面渲染服务,基于`nuxt.js`搭建。
技术栈
- vue.js ([https://vuejs.org](https://vuejs.org)) 渐进式 JavaScript 框架
- nuxt.js ([https://nuxtjs.org](https://nuxtjs.org)) 基于Vue的服务端渲染框架效率高到爆
### admin
[![bbs-go-admin](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-admin.yml/badge.svg)](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-admin.yml)
> 管理后台系统,基于`vue.js + element-ui`搭建。
技术栈
- vue.js ([https://vuejs.org](https://vuejs.org)) 渐进式 JavaScript 框架
- element-ui ([https://element.eleme.cn](https://element.eleme.cn)) 饿了么开源的基于 vue.js 的前端库
## 功能预览
![首页.png](https://s2.loli.net/2022/04/12/DpvPwB9dlQ6Chef.png)
![发帖.png](https://s2.loli.net/2022/04/12/KC8eXfE6sDLq34V.png)
![发动态.png](https://s2.loli.net/2022/04/12/14pMPuGjEU6kiWV.png)
![个人中心.png](https://s2.loli.net/2022/04/12/1PVNjMh9nUAXsl8.png)
![手机版.png](https://s2.loli.net/2022/04/12/mowWb78CGIaH6T2.png)
![后台首页.png](https://s2.loli.net/2022/04/12/ErX2BLTnh7ldz8D.png)
![后台配置.png](https://s2.loli.net/2022/04/12/PwK6aC74XEZlIOL.png)
## Contributors
<a href="https://github.com/mlogclub/bbs-go/graphs/contributors"><img src="https://opencollective.com/bbs-go/contributors.svg?width=890&button=false" /></a>

View File

@@ -1,41 +1,41 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
.DS_Store
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
bbs-go
bbs-go.yaml
bbs-go.prod.yaml
bbs-go.dev.yaml
bbs-go.test.yaml
.idea/*
build/*
cscope.files
tags
logs/*.log
web/*
tmp/*
admin/*
internal/web*
cmd/generator/*
go.work
go.work.sum
ip2region.xdb
__debug_bin*
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
.DS_Store
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
bbs-go
bbs-go.yaml
bbs-go.prod.yaml
bbs-go.dev.yaml
bbs-go.test.yaml
.idea/*
build/*
cscope.files
tags
logs/*.log
web/*
tmp/*
admin/*
internal/web*
cmd/generator/*
go.work
go.work.sum
ip2region.xdb
__debug_bin*

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,2 @@
## 介绍
该项目使用Golang进行构建具体参见https://mlog.club
## 介绍
该项目使用Golang进行构建具体参见https://mlog.club

View File

@@ -1,65 +1,65 @@
Port: 8082 # 端口
BaseUrl: https://mlog.club # 网站域名
IpDataPath: # IP数据文件默认读取当前目录下ip2region.xdb文件最新数据文件请从这里下载https://github.com/lionsoul2014/ip2region/tree/master/data
AllowedOrigins:
- "*"
# 日志配置
Logger:
Filename: /data/logs/bbs-go.log # 日志文件的位置
MaxSize: 100 # 文件最大尺寸以MB为单位
MaxAge: 10 # 保留旧文件的最大天数
MaxBackups: 10 # 保留的最大旧文件数量
# 数据库连接
DB:
Url: username:password@tcp(localhost:3306)/bbsgo_db?charset=utf8mb4&parseTime=True&multiStatements=true&loc=Local
MaxIdleConns: 50
MaxOpenConns: 200
# 上传配置
Uploader:
# 启用上传方式
Enable: Oss
# 阿里云oss配置
AliyunOss:
Host: # 阿里云OSS资源外网访问地址
Bucket: # 阿里云OSS bucket名称
Endpoint: # 阿里云OSS Endpoint
AccessId: # 阿里云OSS accessID
AccessSecret: # 阿里云OSS accessKey
StyleSplitter: # 阿里云oss图片样式分隔符
StyleAvatar: # 头像图片样式名称
StylePreview: # 预览图片样式名称
StyleSmall: # 小图样式名称
StyleDetail: # 详情图片样式名称
# 本地文件上传
Local:
Host: https://st.mlog.club/ # 上传文件域名
Path: /data/www/st.mlog.club # 上传目录
# 邮件服务器配置,用于邮件通知
Smtp:
Host: # smtp服务地址请设置成你自己的例如smtp.qq.com
Port: # smtp服务端口请设置成你自己额例如25
Username: # 请配置成你自己的
Password: # 请配置成你自己的
SSL: true
# 百度SEO相关配置
# 文档https://ziyuan.baidu.com/college/courseinfo?id=267&page=2#h2_article_title14
BaiduSEO:
Site:
Token:
# 神马搜索SEO相关
# 文档https://zhanzhang.sm.cn/open/mip
SmSEO:
Site:
UserName:
Token:
# search
Search:
Port: 8082 # 端口
BaseUrl: https://mlog.club # 网站域名
IpDataPath: # IP数据文件默认读取当前目录下ip2region.xdb文件最新数据文件请从这里下载https://github.com/lionsoul2014/ip2region/tree/master/data
AllowedOrigins:
- "*"
# 日志配置
Logger:
Filename: /data/logs/bbs-go.log # 日志文件的位置
MaxSize: 100 # 文件最大尺寸以MB为单位
MaxAge: 10 # 保留旧文件的最大天数
MaxBackups: 10 # 保留的最大旧文件数量
# 数据库连接
DB:
Url: username:password@tcp(localhost:3306)/bbsgo_db?charset=utf8mb4&parseTime=True&multiStatements=true&loc=Local
MaxIdleConns: 50
MaxOpenConns: 200
# 上传配置
Uploader:
# 启用上传方式
Enable: Oss
# 阿里云oss配置
AliyunOss:
Host: # 阿里云OSS资源外网访问地址
Bucket: # 阿里云OSS bucket名称
Endpoint: # 阿里云OSS Endpoint
AccessId: # 阿里云OSS accessID
AccessSecret: # 阿里云OSS accessKey
StyleSplitter: # 阿里云oss图片样式分隔符
StyleAvatar: # 头像图片样式名称
StylePreview: # 预览图片样式名称
StyleSmall: # 小图样式名称
StyleDetail: # 详情图片样式名称
# 本地文件上传
Local:
Host: https://st.mlog.club/ # 上传文件域名
Path: /data/www/st.mlog.club # 上传目录
# 邮件服务器配置,用于邮件通知
Smtp:
Host: # smtp服务地址请设置成你自己的例如smtp.qq.com
Port: # smtp服务端口请设置成你自己额例如25
Username: # 请配置成你自己的
Password: # 请配置成你自己的
SSL: true
# 百度SEO相关配置
# 文档https://ziyuan.baidu.com/college/courseinfo?id=267&page=2#h2_article_title14
BaiduSEO:
Site:
Token:
# 神马搜索SEO相关
# 文档https://zhanzhang.sm.cn/open/mip
SmSEO:
Site:
UserName:
Token:
# search
Search:
IndexPath: # 索引路径