<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[GooseForum：Go + Vue 3 现代化开源论坛系统 - 部署与功能详解]]></title><description><![CDATA[<h2>一、项目简介</h2>
<p dir="auto"><strong>GooseForum</strong> 是一个现代化的技术交流社区平台，采用 Go + Vue 3 + TailwindCSS 技术栈开发。项目保持简单部署，同时通过服务端 payload 驱动 SPA 体验，并保留 no-js HTML 渲染用于 SEO 和降级访问。</p>
<ul>
<li><strong>GitHub 地址</strong>：<a href="https://github.com/leancodebox/GooseForum" rel="nofollow ugc">https://github.com/leancodebox/GooseForum</a></li>
<li><strong>在线体验</strong>：<a href="https://gooseforum.online/" rel="nofollow ugc">https://gooseforum.online/</a></li>
<li><strong>开源协议</strong>：MIT License</li>
</ul>
<hr />
<h2>二、核心特性</h2>
<h3>2.1 用户体系</h3>
<ul>
<li><strong>用户注册/登录</strong> — 支持邮箱激活</li>
<li><strong>权限管理</strong> — 基于角色的权限控制</li>
<li><strong>用户中心</strong> — 个人资料管理、头像上传</li>
<li><strong>积分系统</strong> — 签到、发帖、回复奖励</li>
<li><strong>管理后台</strong> — 完整的后台管理功能</li>
</ul>
<h3>2.2 内容管理</h3>
<ul>
<li><strong>文章发布</strong> — Markdown 编辑器+预览</li>
<li><strong>评论系统</strong> — 多级评论回复</li>
<li><strong>文章分类</strong> — 灵活的分类管理</li>
<li><strong>实时通知</strong> — WebSocket 驱动通知</li>
<li><strong>聊天系统</strong> — 实时消息</li>
</ul>
<h3>2.3 技术特性</h3>
<ul>
<li><strong>单文件部署</strong> — 编译后单个可执行文件</li>
<li><strong>SQLite/MySQL 支持</strong> — 默认 SQLite，可选 MySQL</li>
<li><strong>自动备份</strong> — 定时数据库备份</li>
<li><strong>响应式设计</strong> — 完美支持移动端</li>
<li><strong>品牌定制</strong> — 支持自定义 Logo/文字/图片</li>
<li><strong>Payload 驱动 SPA</strong> — 服务端输出页面 payload，前端提供平滑站内切换</li>
<li><strong>SEO 友好</strong> — 轻量 no-js GoHTML 渲染，兼顾搜索引擎和降级访问</li>
</ul>
<hr />
<h2>三、快速开始</h2>
<h3>3.1 方式一：下载预编译版本（推荐）</h3>
<ol>
<li>
<p dir="auto">从 <a href="https://github.com/leancodebox/GooseForum/releases" rel="nofollow ugc">GitHub Releases</a> 下载预编译版本</p>
</li>
<li>
<p dir="auto">解压并启动：</p>
</li>
</ol>
<pre><code class="language-bash"># 解压
tar -zxvf GooseForum_Linux_x86_64.tar.gz

# 赋予权限
chmod +x ./GooseForum

# 启动服务
./GooseForum serve
</code></pre>
<ol start="3">
<li>访问 <code>http://localhost:5234</code></li>
</ol>
<blockquote>
<p dir="auto"><img src="https://www.cnp.cc/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4a1.png?v=5fb672a5cbf" class="not-responsive emoji emoji-android emoji--bulb" style="height:23px;width:auto;vertical-align:middle" title="💡" alt="💡" /> <strong>提示</strong>：首次启动后，第一个注册的账号将自动成为管理员</p>
</blockquote>
<h3>3.2 使用 GoReleaser 构建</h3>
<pre><code class="language-bash"># 安装 GoReleaser
go install github.com/goreleaser/goreleaser@latest

# 构建所有平台
goreleaser build --snapshot --clean

# 构建当前平台
goreleaser build --snapshot --clean --single-target
</code></pre>
<h3>3.3 方式二：从源码构建</h3>
<p dir="auto"><strong>环境要求：</strong></p>
<ul>
<li>Go 1.24+</li>
<li>Node.js 18+</li>
<li>pnpm</li>
</ul>
<p dir="auto"><strong>构建步骤：</strong></p>
<pre><code class="language-bash"># 克隆项目
git clone https://github.com/leancodebox/GooseForum.git
cd GooseForum

# 构建前端
cd resource &amp;&amp; pnpm install &amp;&amp; pnpm build &amp;&amp; cd ..

# 构建后端
go mod tidy
go build -ldflags="-w -s" .

# 启动服务
./GooseForum serve
</code></pre>
<h3>3.4 开发模式</h3>
<pre><code class="language-bash"># 后端热重载
air

# 主站和管理后台前端
cd resource &amp;&amp; pnpm dev
</code></pre>
<hr />
<h2>四、配置说明</h2>
<p dir="auto">GooseForum 启动时自动创建 <code>config.toml</code>：</p>
<pre><code class="language-toml">[app]
env = "production"              # local 或 production

[server]
port = 5234                    # 服务端口
url = "http://localhost"        # 站点 URL

[db.default]
connection = "sqlite"           # 数据库类型 (sqlite/mysql)
path = "./storage/database/sqlite.db"
</code></pre>
<p dir="auto"><img src="https://www.cnp.cc/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4d6.png?v=5fb672a5cbf" class="not-responsive emoji emoji-android emoji--book" style="height:23px;width:auto;vertical-align:middle" title="📖" alt="📖" /> 详细配置说明：<a href="https://github.com/leancodebox/GooseForum/blob/main/docs/configuration.md" rel="nofollow ugc">配置文档</a></p>
<hr />
<h2>五、技术架构</h2>
<h3>5.1 后端技术栈</h3>
<ul>
<li><strong>Go 1.24+</strong> — 主要开发语言</li>
<li><strong>Gin</strong> — Web 框架</li>
<li><strong>GORM</strong> — ORM 框架</li>
<li><strong>SQLite/MySQL</strong> — 数据库支持</li>
<li><strong>JWT</strong> — 身份认证</li>
<li><strong>Cobra</strong> — 命令行工具</li>
</ul>
<h3>5.2 前端技术栈</h3>
<ul>
<li><strong>Vue 3</strong> — 主站和管理后台 UI 框架</li>
<li><strong>TypeScript</strong> — 前端类型支持</li>
<li><strong>Payload SPA Runtime</strong> — 通过 <code>X-Goose-Page</code> JSON payload 实现站内导航</li>
<li><strong>TailwindCSS 4</strong> — CSS 框架</li>
<li><strong>GoHTML</strong> — 轻量 no-js/SEO 模板</li>
<li><strong>Vite</strong> — 构建工具</li>
</ul>
<h3>5.3 管理后台技术栈</h3>
<ul>
<li><strong>Vue 3 + TypeScript</strong> — 管理后台应用</li>
<li><strong>TailwindCSS 4</strong> — 独立样式和设计变量</li>
<li><strong>Reka UI / VueUse</strong> — 可访问性基础组件和交互工具</li>
<li><strong>Unovis</strong> — 图表和统计可视化</li>
<li><strong>SortableJS / vuedraggable</strong> — 运营列表拖拽排序</li>
</ul>
<hr />
<h2>六、项目结构</h2>
<pre><code>GooseForum/
├── app/                # 后端代码
│   ├── bundles/       # 工具包（JWT、缓存、事件）
│   ├── console/        # CLI 命令
│   ├── http/           # 控制器、中间件、路由
│   ├── models/         # GORM 模型
│   └── service/        # 业务服务
├── resource/          # 前端资源
│   ├── src/
│   │   ├── site/       # 主站 Vue 应用
│   │   ├── admin/      # 管理后台 Vue 应用
│   │   ├── runtime/    # 共享 payload 运行时
│   │   ├── styles/     # 主站样式
│   │   └── types/      # 共享前端类型
│   ├── static/         # 静态资源
│   └── templates/      # no-js/SEO GoHTML 模板
├── docs/               # 文档
├── main.go             # 程序入口
└── config.toml         # 配置文件
</code></pre>
<hr />
<h2>七、管理功能</h2>
<h3>7.1 命令行管理</h3>
<pre><code class="language-bash"># 设置管理员
./GooseForum set-user-admin &lt;用户ID&gt;

# 设置用户邮箱
./GooseForum set-user-email &lt;用户ID&gt; &lt;邮箱&gt;

# 重置用户密码
./GooseForum set-user-password &lt;用户ID&gt; &lt;密码&gt;
</code></pre>
<h3>7.2 管理后台功能</h3>
<ul>
<li><strong>用户管理</strong> — 搜索、筛选、封禁、删除用户</li>
<li><strong>站点设置</strong> — 基本信息、品牌设置、Footer、邮件、安全、发帖设置</li>
<li><strong>分类管理</strong> — 创建、编辑、删除分类</li>
<li><strong>赞助商管理</strong> — 赞助商等级和用户赞助记录</li>
<li><strong>仪表盘</strong> — 流量统计、每日数据</li>
</ul>
<h3>7.3 数据备份</h3>
<ul>
<li>自动定时备份 SQLite 数据库</li>
<li>可配置备份频率和保留数量</li>
<li>备份文件存储在 <code>./storage/databasebackup/</code> 目录</li>
</ul>
<hr />
<h2>八、部署建议</h2>
<h3>8.1 生产环境部署</h3>
<ol>
<li>使用反向代理（Nginx/Apache）</li>
<li>配置 HTTPS 证书</li>
<li>设置定时备份</li>
<li>监控日志文件</li>
</ol>
<h3>8.2 Docker 部署</h3>
<pre><code class="language-dockerfile">FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY GooseForum .
CMD ["./GooseForum", "serve"]
</code></pre>
<hr />
<h2>九、相关文档</h2>
<ul>
<li><a href="https://github.com/leancodebox/GooseForum/blob/main/docs/configuration.md" rel="nofollow ugc">配置文档</a> — 详细的配置选项说明</li>
<li><a href="https://github.com/leancodebox/GooseForum/blob/main/RESOURCE_DESIGN.md" rel="nofollow ugc">Resource 前端设计</a></li>
<li><a href="https://github.com/leancodebox/GooseForum/blob/main/RESOURCE_UI_SPEC.md" rel="nofollow ugc">Resource UI 规范</a></li>
<li><a href="https://github.com/leancodebox/GooseForum/blob/main/docs/article-pinning.md" rel="nofollow ugc">文章置顶方案</a></li>
<li><a href="https://github.com/leancodebox/GooseForum/blob/main/docs/admin-resource-phase1.md" rel="nofollow ugc">Resource 管理后台现状</a></li>
</ul>
]]></description><link>https://www.cnp.cc/topic/4/gooseforum-go-vue-3-现代化开源论坛系统-部署与功能详解</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 11:16:22 GMT</lastBuildDate><atom:link href="https://www.cnp.cc/topic/4.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 May 2026 18:40:48 GMT</pubDate><ttl>60</ttl></channel></rss>