https://github.com/leancodebox/gooseforum
超简单社区构建软件 / Easy forum software for building friendly communities.
https://github.com/leancodebox/gooseforum
bbs forum gin golang gooseforum tailwindcss vue
Last synced: about 1 month ago
JSON representation
超简单社区构建软件 / Easy forum software for building friendly communities.
- Host: GitHub
- URL: https://github.com/leancodebox/gooseforum
- Owner: leancodebox
- License: mit
- Created: 2025-03-31T02:43:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-06-07T11:22:33.000Z (about 1 month ago)
- Last Synced: 2026-06-07T12:21:43.408Z (about 1 month ago)
- Topics: bbs, forum, gin, golang, gooseforum, tailwindcss, vue
- Language: Go
- Homepage: https://gooseforum.online/
- Size: 10.3 MB
- Stars: 95
- Watchers: 2
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
## 🌐 Language / 语言
[🇨🇳 中文](README_ZH.md) | [🇺🇸 English](README.md)
## 📖 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](https://gooseforum.online/)
## ✨ 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
### Method 1: Download Pre-compiled Version (Recommended)
1. Download pre-compiled version from [GitHub Releases](https://github.com/leancodebox/GooseForum/releases)
2. Extract and start:
```bash
# Extract
tar -zxvf GooseForum_Linux_x86_64.tar.gz
# Grant permission
chmod +x ./GooseForum
# Start service
./GooseForum serve
```
### Build with GoReleaser
```bash
# 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
```
3. 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
```bash
# 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
```bash
# 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:
```toml
[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](docs/user/configuration.md)
## 🏗 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
```bash
# Grant administrator role
./GooseForum set-user-admin
# Set user email
./GooseForum set-user-email
# Set user password
./GooseForum set-user-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
```dockerfile
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](LICENSE)
## 📚 Related Documentation
- [Documentation Index](docs/README.md)
- [Configuration Documentation](docs/user/configuration.md)
- [Resource Frontend Design](docs/architecture/resource-frontend.md)
- [Resource UI Specification](docs/frontend/ui-spec.md)
- [Chinese README](README_ZH.md)
## 🙏 Acknowledgments
Thanks to all contributors!
---