Skip to content

yahyasaqban-lab/dragon-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‰ Dragon Chat

A complete Discord alternative built on Matrix protocol with LiveKit for voice/video.

πŸš€ Quick Install (Ubuntu 22.04+)

curl -fsSL https://raw.githubusercontent.com/yahyasaqban-lab/dragon-chat/master/install.sh | sudo bash

Or with your domain:

curl -fsSL https://raw.githubusercontent.com/yahyasaqban-lab/dragon-chat/master/install.sh | sudo bash -s -- --domain example.com

Requirements

  • Ubuntu 22.04 or newer
  • Root/sudo access
  • Domain with DNS access
  • Ports: 80, 443, 3478, 5349, 7880-7881, 50000-60000

DNS Setup (before install)

Point these to your server IP:

matrix.yourdomain.com  β†’  YOUR_SERVER_IP
livekit.yourdomain.com β†’  YOUR_SERVER_IP  
turn.yourdomain.com    β†’  YOUR_SERVER_IP

What Gets Installed

  • Matrix Synapse - Chat server with E2EE
  • LiveKit - Voice/video calls
  • Coturn - TURN server for NAT traversal
  • PostgreSQL - Database
  • Redis - Caching
  • Nginx - Reverse proxy with SSL

Credentials saved to /opt/dragon-chat/credentials.txt


Components

Component Description Path
Server Matrix + LiveKit + Coturn setup /server
Desktop Electron app (Mac/Windows/Linux) /desktop
Mobile Flutter app (iOS/Android) /mobile

Quick Start

1. Deploy Server

cd server
# Edit configs/env.conf with your domain
./scripts/01-install-all.sh
./scripts/02-start-services.sh
./scripts/03-create-admin.sh

2. Build Desktop App

cd desktop
npm install
npm start        # Development
npm run build    # Production builds

3. Build Mobile App

cd mobile
flutter pub get
flutter run              # Development
flutter build apk        # Android
flutter build ios        # iOS

Features

  • βœ… End-to-end encrypted messaging (Matrix)
  • βœ… Voice/video calls (LiveKit WebRTC)
  • βœ… Screen sharing
  • βœ… Group chats and channels
  • βœ… File sharing
  • βœ… Push notifications
  • βœ… Cross-platform (Web, Desktop, Mobile)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Clients                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Desktop  β”‚  β”‚  Mobile  β”‚  β”‚  Web (Element)   β”‚  β”‚
β”‚  β”‚ Electron β”‚  β”‚  Flutter β”‚  β”‚                  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚             β”‚                 β”‚
        β–Ό             β–Ό                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Server Stack                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Synapse   β”‚  β”‚   LiveKit   β”‚  β”‚   Coturn   β”‚  β”‚
β”‚  β”‚   Matrix    β”‚  β”‚  Voice/Videoβ”‚  β”‚    TURN    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚  β”‚  PostgreSQL β”‚  β”‚    Redis    β”‚                  β”‚
β”‚  β”‚   Database  β”‚  β”‚    Cache    β”‚                  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Default Servers

  • Matrix: https://matrix.y7xyz.com
  • LiveKit: wss://livekit.y7xyz.com
  • TURN: turn.y7xyz.com

πŸ“± Client Apps

After server install, users can connect with:

Official Clients

Dragon Chat Clients (this repo)

Build from /desktop or /mobile folders, or download releases.

πŸ”§ Manual Installation

# Clone repo
git clone https://github.com/yahyasaqban-lab/dragon-chat.git
cd dragon-chat

# Run installer
chmod +x install.sh
sudo ./install.sh --domain yourdomain.com

Options

sudo ./install.sh --domain example.com --admin-user myadmin --admin-pass mypassword
Flag Description Default
--domain Your domain (required)
--admin-user Matrix admin username admin
--admin-pass Matrix admin password (random)

πŸ› οΈ Management

# Check status
sudo systemctl status synapse livekit coturn

# View logs
sudo journalctl -u synapse -f
sudo journalctl -u livekit -f

# Restart services
sudo systemctl restart synapse livekit coturn

# Create new Matrix user
sudo docker exec synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008

πŸ”’ Security Notes

  • Change default admin password immediately
  • Keep /opt/dragon-chat/credentials.txt secure
  • Enable firewall: sudo ufw enable
  • Regularly update: sudo apt update && sudo apt upgrade

πŸ“ License

MIT

πŸ™ Credits


Created by Yahya πŸ‰

About

πŸ‰ Discord alternative built on Matrix + LiveKit. Desktop (Electron) + Mobile (Flutter) + Server setup.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors