Self-hosted Discord alternative - Go backend
  • Go 93.7%
  • HTML 4.7%
  • Shell 1.4%
  • Makefile 0.2%
Find a file
thomas 4523ab225a fix: assign Admin role to first user in WebUI registration
WebUI's registration handler was missing the logic to assign Admin role
to the first registered user. Only the API endpoint in main.go had this.
2026-02-21 14:34:34 +02:00
cmd Fix distributable packages: add install docs and TUI README 2026-02-21 12:14:03 +02:00
deploy Fix distributable packages: add install docs and TUI README 2026-02-21 12:14:03 +02:00
docs T47/T48: add end-user and API documentation 2026-02-21 11:57:21 +02:00
frontend feat: add admin UI for channels, roles, and user management 2026-02-21 14:06:40 +02:00
internal fix: assign Admin role to first user in WebUI registration 2026-02-21 14:34:34 +02:00
pkg/trpcclient Fix route conflict: use GET /trpc for WebSocket upgrade endpoint 2026-02-21 11:27:39 +02:00
scripts fix: escape quotes in upload-releases.sh 2026-02-21 13:01:05 +02:00
.git-credentials.env Add agent coordination files for multi-AI development 2026-02-15 11:59:43 +02:00
.gitignore T43/T46/T49/T50: server packaging, admin guide, README, Makefile targets 2026-02-21 11:46:04 +02:00
AGENTS.md Update all agent files for Fas 5 client implementation 2026-02-15 15:27:45 +02:00
CLAUDE.md Add Fas 6 testing & security hardening plan with agent assignments 2026-02-16 14:10:02 +02:00
CODEX.md Add Fas 6 testing & security hardening plan with agent assignments 2026-02-16 14:10:02 +02:00
GEMINI.md Add Fas 6 testing & security hardening plan with agent assignments 2026-02-16 14:10:02 +02:00
GLM.md Update GLM.md with Fas 7 T45 desktop build packaging instructions 2026-02-21 11:50:06 +02:00
go.mod T34: implement Wails desktop app with embedded server 2026-02-16 13:49:07 +02:00
go.sum T34: implement Wails desktop app with embedded server 2026-02-16 13:49:07 +02:00
integration_test.go Fix route conflict: use GET /trpc for WebSocket upgrade endpoint 2026-02-21 11:27:39 +02:00
main.go fix: add default permissions to Member role and users.getRoles query 2026-02-21 13:31:11 +02:00
Makefile T44: add Forgejo release upload script and update Makefile 2026-02-21 12:06:23 +02:00
PLAN.md Add Fas 6 testing & security hardening plan with agent assignments 2026-02-16 14:10:02 +02:00
PROGRESS.md T44: add TUI cross-compilation script 2026-02-21 12:00:01 +02:00
README.md T43/T46/T49/T50: server packaging, admin guide, README, Makefile targets 2026-02-21 11:46:04 +02:00
sqlc.yaml Initial project scaffold with core infrastructure 2026-02-15 11:52:14 +02:00

MumsiCord

A self-hosted chat platform with text channels, voice chat, roles, permissions, file sharing, and custom emojis. Built with Go and SQLite.

Features

  • Text channels organized in categories with rich permissions
  • Voice chat via WebRTC (Pion)
  • Role-based permissions with global, channel-role, and channel-user overrides
  • File uploads with MIME type validation
  • Custom emojis
  • Invite system
  • Three clients: web UI, terminal (TUI), and desktop (Wails)
  • Real-time updates via tRPC over WebSocket and SSE
  • Security hardened -- CORS allowlist, CSP, rate limiting, input validation

Architecture

Clients                         Server
+-----------+                  +---------------------------+
| Web UI    |--HTTP/SSE------->|  HTTP routes              |
| TUI       |--WebSocket------>|  tRPC WebSocket handler   |
| Desktop   |--WebSocket------>|  Pub/Sub broker           |
+-----------+                  |  SQLite + sqlc            |
                               |  Pion WebRTC (voice)      |
                               +---------------------------+

Quickstart

Server

# Build
CGO_ENABLED=1 go build -o mumsicord .

# Configure (required: JWT secret)
export MUMSICORD_JWT_SECRET=$(openssl rand -base64 32)

# Run
./mumsicord
# Server starts on :3000

Open http://localhost:3000 for the web UI.

TUI Client

cd cmd/tui
CGO_ENABLED=0 go build -o mumsicord-tui .
./mumsicord-tui --server ws://localhost:3000/trpc

Desktop Client

cd cmd/desktop
wails build
# Binary in build/bin/

Building from Source

Requirements: Go 1.22+, GCC (for SQLite CGO)

# Server (requires CGO for SQLite)
CGO_ENABLED=1 go build -o mumsicord .

# TUI (no CGO needed)
CGO_ENABLED=0 go build -o mumsicord-tui ./cmd/tui

# Desktop (requires Wails CLI)
cd cmd/desktop && wails build

# Run tests
CGO_ENABLED=1 go test ./...

Packaging Scripts

bash scripts/build-server.sh 1.0     # build/mumsicord-server-1.0-linux-amd64.tar.gz
bash scripts/build-tui.sh 1.0        # cross-compiled archives in build/tui/
bash scripts/build-desktop.sh 1.0    # desktop archive in build/desktop/
make package-all VERSION=1.0         # all of the above

Documentation

  • Admin Guide -- installation, configuration, security, backup
  • User Guide -- using the web UI, TUI, and desktop clients
  • API Reference -- HTTP endpoints, tRPC procedures, WebSocket protocol

Project Structure

.
+-- main.go                    Server entry point
+-- internal/
|   +-- config/                Environment-based configuration
|   +-- auth/                  JWT + bcrypt authentication
|   +-- database/              SQLite schema, migrations, sqlc queries
|   +-- router/                tRPC procedure handlers
|   +-- permissions/           Role-based permission resolver
|   +-- pubsub/                In-memory pub/sub broker
|   +-- trpc/                  tRPC-over-WebSocket protocol
|   +-- ratelimit/             Per-IP token bucket rate limiter
|   +-- files/                 File upload/download handler
|   +-- voice/                 WebRTC voice room management
|   +-- web/                   Web UI handlers and templates
|   +-- plugins/               Plugin system
+-- pkg/trpcclient/            Shared tRPC client library
+-- frontend/                  Embedded web UI assets
+-- cmd/tui/                   Terminal client
+-- cmd/desktop/               Wails desktop client
+-- deploy/                    systemd service + env template
+-- scripts/                   Build/packaging scripts
+-- docs/                      Documentation

License

All rights reserved.