jevb 6f564c7d2f fix: add JSON tags to Role/VoiceState, fix WebSocket error surfacing
Root cause: server's db.Role and db.VoiceState structs had no JSON tags,
causing Go to serialize field names as PascalCase while the C# client
expected snake_case. Every role deserialized with Id=0, crashing
ToDictionary with "duplicate key: 0".

- Add json tags to Role and VoiceState in Server/db/models.go
- Change Disconnected event to carry reason string for diagnostics
- Wire ErrorReceived in MainViewModel to show server-side WS errors
- Fix MainWindow to surface WebSocket errors on MainPage (not ConnectPage)
- Use _reconnectCts.Token for receive loop instead of caller's token
- Make ToDictionary calls safe with TryAdd to prevent future crashes
2026-03-15 12:18:19 +01:00

OwnCord

Self-hosted Windows chat platform with voice, video, and an admin panel.

Features

  • Real-time text chat with threads and reactions
  • Voice and video channels (WebRTC)
  • Role-based permissions with custom roles
  • File sharing with inline previews
  • Full-text message search
  • Web-based admin panel
  • Invite-only registration
  • TLS encryption (self-signed or custom cert)

Quick Start

  1. Download the latest release from GitHub Releases
  2. Run chatserver.exe — generates config.yaml on first run
  3. Open https://localhost:8443/admin to access the admin panel
  4. Generate an invite code, share it with friends
  5. Friends download OwnCord.Client.exe and connect using your server address

Building from Source

Server

cd Server
go build -o chatserver.exe -ldflags "-s -w -X main.version=1.0.0" .

Client

dotnet publish Client/OwnCord.Client/OwnCord.Client.csproj -c Release -r win-x64 --self-contained -p:PublishSingleFile=true

Architecture

OwnCord consists of a Go server and a WPF/.NET 8 desktop client. The server handles all business logic, storage, and real-time communication. Clients connect over WebSocket for chat events, REST for history and uploads, and WebRTC for voice/video.

┌─────────────────────┐         ┌─────────────────────┐
│   OwnCord Client    │         │   OwnCord Server    │
│   (WPF / .NET 8)    │         │       (Go)          │
│                     │         │                     │
│  ┌───────────────┐  │  WSS    │  ┌───────────────┐  │
│  │  Chat UI      │──┼────────►│  │  WebSocket Hub│  │
│  └───────────────┘  │         │  └───────────────┘  │
│  ┌───────────────┐  │  HTTPS  │  ┌───────────────┐  │
│  │  REST Client  │──┼────────►│  │  REST API     │  │
│  └───────────────┘  │         │  └───────────────┘  │
│  ┌───────────────┐  │  WebRTC │  ┌───────────────┐  │
│  │  Voice/Video  │──┼────────►│  │  TURN/STUN    │  │
│  └───────────────┘  │         │  └───────────────┘  │
└─────────────────────┘         │  ┌───────────────┐  │
                                │  │  SQLite DB    │  │
                                │  └───────────────┘  │
                                └─────────────────────┘

Documentation

License

MIT

S
Description
OwnCord is a self-hosted, open-source chat platform with text channels, voice/video chat, direct messages, and a desktop client — built for communities that want full control over their data.
Readme AGPL-3.0
111 MiB
Languages
TypeScript 48.7%
Go 44%
JavaScript 2.2%
Rust 2.1%
CSS 1.4%
Other 1.5%