Skip to content

felipemacedo1/discord_open

Β 
Β 

Repository files navigation

Discord Open - Enterprise Communication Platform

A modern, enterprise-ready communication platform built with Flutter, Serverpod, and LiveKit for real-time communication and live streaming capabilities.

Originally inspired by the Discord redesign concept, now evolved into an independent corporate communication solution.

πŸ”— Links

πŸ“– Explainer Resources

Layout Explainer (8K)

Layout Explainer

Routing Explainer (8K)

Routing Explainer

State Management Explainer (8K)

State Management Explainer

πŸš€ Features

Core Features

  • Real-time Chat: Instant messaging with support for text channels
  • Voice & Video Calls: Live streaming with WebRTC technology
  • Server Management: Create and manage communication servers
  • User Authentication: Secure authentication system with support for SSO/SAML (planned)
  • Cross-platform: Works on mobile (iOS/Android), desktop (macOS), and web
  • Modern UI: Dark theme with clean, professional design
  • Live Streaming: High-quality video calls with screen sharing
  • Channel Management: Text and voice channels within servers
  • Responsive Design: Optimized for all screen sizes
  • Enterprise-Ready: Built with security, compliance, and scalability in mind

πŸ“Έ Project Images

Chat Section on Android

Chat section on Android

Server and Channel Section on Android

Server and Channel Section on Android

Chat Section on iOS

Chat Section on iOS

Server and Channel Section on iOS

Server and Channel Section on iOS

Voice Call on macOS

Voice call on macOS

Video Call on macOS

Video call on macOS

Screen Share on macOS

Screen Share on macOS

Voice Call on Web

Voice call on Web

Video Call on Web

Video call on Web

Screen Share on Web

Screen Share on Web

πŸ—οΈ Architecture

This project follows a clean architecture pattern with three main components:

1. discord_flutter - Frontend Application

  • Framework: Flutter with Dart
  • State Management: BLoC (Business Logic Component) pattern
  • Navigation: Auto Route for type-safe navigation
  • UI: Custom Discord-inspired components
  • Dependencies:
    • flutter_bloc for state management
    • auto_route for navigation
    • livekit_client for video calls
    • flutter_webrtc for WebRTC functionality
    • freezed for immutable data classes

2. discord_server - Backend Server

  • Framework: Serverpod (Dart-based backend)
  • Authentication: Serverpod Auth with email
  • Real-time: WebSocket connections for live updates
  • Live Streaming: LiveKit integration for video calls & screen share
  • API: RESTful endpoints with type-safe client generation

3. discord_client - Generated Client

  • Purpose: Type-safe client for server communication
  • Generation: Auto-generated from Serverpod backend
  • Features: Automatic serialization/deserialization

πŸ“‹ Prerequisites

Before running this project, ensure you have the following installed:

  • Dart SDK: >=3.3.0 <4.0.0
  • Flutter SDK: >=3.19.0
  • LiveKit Server: For video calling functionality

πŸ› οΈ Installation & Setup

1. Clone the Repository

git clone <repository-url>
cd discord_open

2. Setup Backend Server

First, start the backend server as it's required for the Flutter app to function:

cd discord_server

# Install dependencies
dart pub get

# Start database
docker-compose up --build --detach

# Create migration
serverpod create-migration

# Apply migrations on server
dart bin/main.dart --apply-migrations --role=maintenance

# After every change you make to the server-side code, you need to run 
serverpod generate

# Run the server
dart run bin/main.dart

The server will start on http://localhost:8080 by default.

3. Setup Flutter Application

cd discord_flutter

# Install Flutter dependencies
flutter pub get

# Generate freezed files (required for cubit states)
dart run build_runner build -d

# Run the application
flutter run

4. Environment Configuration

Frontend Configuration (discord_flutter/lib/configs.dart)

class Configs {
  static const String serverUrl = 'http://localhost:8080';
  static const String liveKitUrl = 'wss://your_livekit_server.com';
}

πŸš€ Quick Start Guide

For Developers

  1. Start the Backend:

    cd discord_server
    //run docker
    docker-compose up --build --detach
    //apply migrations on server
    dart bin/main.dart --apply-migrations --role=maintenance
    //generate 
    serverpod generate
    //run server
    dart run bin/main.dart
  2. Start the Frontend:

    cd discord_flutter
    flutter pub get
    dart run build_runner build -d
    flutter run
  3. Access the Application:

    • Mobile: Use Flutter's hot reload for development
    • Web: Open the provided link from the Debug Console
    • macOS: The app will open in a native window

For Users

  1. Create an Account: Use email authentication to sign up
  2. Join/Create Servers: Start by creating your first server
  3. Create Channels: Add text and voice channels to your server
  4. Start Chatting: Send messages in text channels
  5. Join Voice Calls: Click on voice channels to start video calls

πŸ“± Supported Platforms

  • βœ… iOS (iPhone/iPad)
  • βœ… Android (Phone/Tablet)
  • βœ… macOS (Desktop)
  • βœ… Web (Browser)

πŸ”§ Development

Project Structure

discord_open/
β”œβ”€β”€ discord_flutter/          # Flutter frontend application
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ application/      # Business logic (BLoC)
β”‚   β”‚   β”œβ”€β”€ infrastructure/   # Data layer (repositories)
β”‚   β”‚   β”œβ”€β”€ presentation/     # UI layer (screens, widgets)
β”‚   β”‚   └── configs.dart      # Configuration
β”‚   └── assets/              # Images, icons, mock data
β”œβ”€β”€ discord_server/           # Serverpod backend
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ endpoints/    # API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ models/       # Data models
β”‚   β”‚   β”‚   └── generated/    # Auto-generated code
β”‚   β”‚   └── server.dart       # Server configuration
β”‚   └── migrations/          # Database migrations
└── discord_client/          # Generated client code

Key Technologies

  • Frontend: Flutter, BLoC, Auto Route, LiveKit Client
  • Backend: Serverpod, PostgreSQL, LiveKit Server
  • Real-time: WebSockets, WebRTC
  • State Management: BLoC pattern
  • Code Generation: Freezed, Build Runner

Development Commands

# Database Management
docker-compose down -v          # Clear database
docker-compose up --build --detach  # Start database

# Server Management
dart bin/main.dart --apply-migrations --role=maintenance  # Apply migrations on server
serverpod create-migration      # Create migration
serverpod generate             # Generate server code
dart run bin/main.dart         # Run server

# Flutter Development
dart run build_runner build -d  # Generate freezed files
dart run build_runner watch     # Watch for changes and regenerate
dart run build_runner clean     # Clean generated files

# Testing & Code Quality
flutter test                    # Run tests
dart format .                   # Format code
dart analyze                    # Analyze code

πŸ§ͺ Testing

# Run Flutter tests
cd discord_flutter
flutter test

# Run server tests
cd discord_server
dart test

🀝 Contributing

Contributions are welcome! This is an independent project focused on enterprise communication solutions.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Contact the maintainers

οΏ½ Enterprise Support

For enterprise support, custom features, or consulting services, please contact the project maintainers.


πŸ™ Acknowledgments

  • Serverpod team for the amazing backend framework
  • LiveKit for real-time video calling capabilities
  • Flutter team for the cross-platform framework
  • Original Inspiration: Juxtopposed for the UI/UX design concept

Built with ❀️ for secure, scalable enterprise communication

About

Open-source Discord clone built with Serverpod and Flutter for cross-platform messaging

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PLpgSQL 42.4%
  • Dart 33.2%
  • C++ 8.5%
  • C 6.9%
  • CMake 4.8%
  • HCL 2.5%
  • Other 1.7%