GooseForum

command module
v0.2.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 3 Imported by: 0

README ΒΆ

GooseForum

πŸš€ Modern Go + Vue 3 Forum System

GitHub release pkg.go.dev Go Report Card Code coverage Go version TailwindCSS License GitHub stars

🌐 Language / 语言

πŸ‡¨πŸ‡³ δΈ­ζ–‡ | πŸ‡ΊπŸ‡Έ English

πŸ“– Project Overview

GooseForum is a modern technical community platform built with Go + Vue 3 + TailwindCSS. It keeps deployment simple while using a payload-driven SPA experience with no-js HTML rendering for SEO and graceful fallback.

🌐 Live Demo: GooseForum

✨ Core Features

🎯 User System

  • User Registration/Login - Email activation support
  • Permission Management - Role-based access control
  • User Center - Profile management, avatar upload
  • Points System - Check-in, posting, reply rewards
  • Admin Panel - Complete backend management

πŸ“ Content Management

  • Article Publishing - Markdown editor with preview
  • Comment System - Multi-level replies
  • Article Categories - Flexible category management
  • Real-time Notifications - WebSocket-powered notifications
  • Chat System - Real-time messaging

πŸ›  Technical Features

  • Single File Deployment - Single executable after compilation
  • SQLite/MySQL Support - Default SQLite, MySQL optional
  • Auto Backup - Scheduled database backup
  • Responsive Design - Perfect mobile support
  • Brand Customization - Custom logo/text/image support
  • Payload-driven SPA - Smooth in-app navigation with server-provided page payloads
  • SEO Friendly - Lightweight no-js GoHTML rendering for crawlers and fallback

πŸš€ Quick Start

  1. Download pre-compiled version from GitHub Releases
  2. Extract and start:
# Extract
tar -zxvf GooseForum_Linux_x86_64.tar.gz

# Grant permission
chmod +x ./GooseForum

# Start service
./GooseForum serve

Build with GoReleaser

# Install GoReleaser
go install github.com/goreleaser/goreleaser@latest

# Build all platforms
goreleaser build --snapshot --clean

# Build current platform
goreleaser build --snapshot --clean --single-target
  1. Visit http://localhost:5234

πŸ’‘ Tip: First registered account becomes administrator

Method 2: Build from Source

Requirements
  • Go 1.26+
  • Node.js 18+
  • pnpm
Build Steps
# Clone project
git clone https://github.com/leancodebox/GooseForum.git
cd GooseForum

# Build frontend
cd resource && pnpm install && pnpm build && cd ..

# Build backend
go mod tidy
go build -ldflags="-w -s" .

# Start service
./GooseForum serve

Development Mode

# Backend with hot reload
air

# Public site and admin console frontend
cd resource && pnpm dev

The current admin console is served by the resource Vue app under /admin. It does not require a separate admin frontend service.

πŸ”§ Configuration

GooseForum auto-creates config.toml on first startup:

[app]
env = "production"              # local or production
# debug is optional; local defaults to true, other environments default to false

[server]
port = 5234                    # Service port
url = "http://localhost"       # Site URL

[db.default]
connection = "sqlite"          # Database type (sqlite/mysql)
path = "./storage/database/sqlite.db"

πŸ“– Detailed Configuration: Configuration Documentation

πŸ— Technical Architecture

Backend Tech Stack

  • Go 1.26+ - Main language
  • Gin - Web framework
  • GORM - ORM
  • SQLite/MySQL - Database
  • JWT - Authentication
  • Cobra - CLI

Frontend Tech Stack

  • Vue 3 - Public site and admin UI framework
  • TypeScript - Type-safe frontend code
  • Payload SPA Runtime - Client-side navigation via X-Goose-Page JSON payloads
  • TailwindCSS 4 - CSS framework
  • GoHTML - Lightweight no-js/SEO templates
  • Vite - Build tool

Admin Panel Tech Stack

  • Vue 3 + TypeScript - Admin UI inside resource/src/admin
  • TailwindCSS 4 - Admin-scoped styling and design tokens
  • Reka UI / VueUse - Accessible primitives and interaction utilities where needed
  • Unovis - Admin charts and statistics visualization
  • SortableJS / vuedraggable - Drag sorting for operational lists

πŸ“ Project Structure

GooseForum/
β”œβ”€β”€ app/                    # Backend code
β”‚   β”œβ”€β”€ bundles/           # Utilities (JWT, cache, events)
β”‚   β”œβ”€β”€ console/           # CLI commands
β”‚   β”œβ”€β”€ http/              # Controllers, middleware, routes
β”‚   β”œβ”€β”€ models/            # GORM models
β”‚   └── service/           # Business services
β”œβ”€β”€ resource/              # Frontend resources
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ site/          # Public Vue app
β”‚   β”‚   β”œβ”€β”€ admin/         # Admin Vue app
β”‚   β”‚   β”œβ”€β”€ runtime/       # Shared payload runtime
β”‚   β”‚   β”œβ”€β”€ styles/        # Public-site styles
β”‚   β”‚   └── types/         # Shared frontend types
β”‚   β”œβ”€β”€ static/            # Static assets
β”‚   └── templates/         # No-js/SEO GoHTML templates
β”œβ”€β”€ docs/                  # Documentation
β”œβ”€β”€ main.go               # Entry point
└── config.toml           # Configuration

πŸ›‘ Admin Features

# Grant administrator role
./GooseForum set-user-admin <userId>

# Set user email
./GooseForum set-user-email <userId> <email>

# Set user password
./GooseForum set-user-password <userId> <password>

Admin Panel Features

  • User Management - Search, filter, ban, delete users
  • Site Settings - General, brand, footer, mail, security, posting
  • Category Management - Create, edit, delete categories
  • Sponsorship Management - Sponsor tiers and user sponsors
  • Dashboard - Traffic stats, daily analytics

Data Backup

  • Automatic scheduled SQLite backup
  • Configurable frequency and retention
  • Backup in ./storage/databasebackup/

πŸ“¦ Deployment

Production

  1. Use reverse proxy (Nginx/Apache)
  2. Configure HTTPS
  3. Set up scheduled backups
  4. Monitor logs

Docker

FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY GooseForum .
CMD ["./GooseForum", "serve"]

🀝 Contributing

  1. Fork this project
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push branch (git push origin feature/AmazingFeature)
  5. Create Pull Request

πŸ“„ License

MIT License - see LICENSE

πŸ™ Acknowledgments

Thanks to all contributors!


If this project helps you, please give us a ⭐️

Made with ❀️ by LeanCodeBox

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
app
bundles/algorithm
Package algorithm contains cryptographic helpers used by GooseForum.
Package algorithm contains cryptographic helpers used by GooseForum.
bundles/buildinfo
Package buildinfo exposes release metadata compiled into the binary.
Package buildinfo exposes release metadata compiled into the binary.
bundles/closer
Package closer stores process-wide shutdown callbacks.
Package closer stores process-wide shutdown callbacks.
bundles/fileopt
Package fileopt provides small filesystem read, write, and creation helpers.
Package fileopt provides small filesystem read, write, and creation helpers.
bundles/jsonopt
Package jsonopt provides compact JSON encode/decode helpers.
Package jsonopt provides compact JSON encode/decode helpers.
bundles/jwtopt
Package jwtopt creates and validates GooseForum access tokens.
Package jwtopt creates and validates GooseForum access tokens.
bundles/lineopt
Package lineopt provides helpers for processing text files line by line.
Package lineopt provides helpers for processing text files line by line.
bundles/queryopt
Package queryopt builds small GORM-compatible query fragments.
Package queryopt builds small GORM-compatible query fragments.
bundles/setting
Package setting exposes process-level configuration helpers.
Package setting exposes process-level configuration helpers.
bundles/stropt
Package stropt provides string case and pluralization helpers.
Package stropt provides string case and pluralization helpers.
bundles/unicode
Package unicode decodes escaped Unicode sequences in strings.
Package unicode decodes escaped Unicode sequences in strings.
bundles/validate
Package validate wraps go-playground/validator with Chinese translations.
Package validate wraps go-playground/validator with Chinese translations.
http/controllers/transform
Package transform maps model entities to API/view payload structs.
Package transform maps model entities to API/view payload structs.
http/httputil
Package httputil contains small HTTP response helpers.
Package httputil contains small HTTP response helpers.
service/tokenservice
Package tokenservice creates and parses short-lived account tokens.
Package tokenservice creates and parses short-lived account tokens.
service/urlconfig
Package urlconfig centralizes public URL and route path helpers.
Package urlconfig centralizes public URL and route path helpers.
Package resource exposes embedded templates and static assets.
Package resource exposes embedded templates and static assets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL