Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ YurtCord - Open Source Discord Clone

YurtCord Logo

A fully-featured, production-ready Discord clone built with .NET 8 and React

License: MIT .NET React TypeScript PostgreSQL

Features โ€ข Quick Start โ€ข Documentation โ€ข Contributing


๐Ÿ“– About

YurtCord is a comprehensive, open-source Discord alternative that provides real-time text chat, voice/video communication, and server management. Built with enterprise-grade architecture and modern technologies, it's perfect for self-hosting, learning, or building upon.

โœจ Highlights

  • ๐Ÿš€ Production-Ready: Complete with health checks, monitoring, and error handling
  • ๐Ÿ—๏ธ Clean Architecture: Separation of concerns with 4-layer architecture
  • ๐Ÿ”’ Secure: JWT authentication, BCrypt hashing, rate limiting
  • โšก Real-time: SignalR WebSocket for instant messaging and events
  • ๐ŸŽค Voice/Video: WebRTC implementation for peer-to-peer communication
  • ๐Ÿ“ฑ Modern UI: Discord-like interface built with React and TailwindCSS
  • ๐Ÿณ Docker Ready: One-command deployment with Docker Compose
  • ๐Ÿ“š Well Documented: Comprehensive guides for developers and users

๐ŸŽฏ Features

๐Ÿ’ฌ Messaging

  • โœ… Real-time text messaging via WebSocket
  • โœ… Message editing and deletion
  • โœ… Emoji reactions (add/remove)
  • โœ… Message pinning
  • โœ… @ Mentions support
  • โœ… File attachments (coming soon)
  • โœ… Rich embeds (coming soon)
  • โœ… Markdown formatting (coming soon)

๐ŸŽค Voice & Video

  • โœ… Voice channels with WebRTC
  • โœ… Video calling
  • โœ… Screen sharing
  • โœ… Mute/deafen controls
  • โœ… Speaking indicators
  • โœ… User limit per channel
  • โœ… Bitrate configuration

๐Ÿฐ Server (Guild) Management

  • โœ… Create and manage servers
  • โœ… Text, voice, and category channels
  • โœ… Role-based permissions (41 flags)
  • โœ… Member management
  • โœ… Server invites (coming soon)
  • โœ… Audit logs (coming soon)
  • โœ… Custom emojis (coming soon)

๐Ÿ‘ค User Features

  • โœ… User profiles with avatars and bios
  • โœ… Custom status (online/idle/dnd/invisible)
  • โœ… Rich presence
  • โœ… Direct messages
  • โœ… Friend system (coming soon)
  • โœ… Notification settings (coming soon)

๐Ÿ” Security & Performance

  • โœ… JWT authentication (7-day tokens)
  • โœ… BCrypt password hashing (cost 12)
  • โœ… Rate limiting (100 req/min)
  • โœ… Global error handling
  • โœ… Request/response logging
  • โœ… Health check endpoints
  • โœ… CORS configuration

๐Ÿ› ๏ธ Developer Tools

  • โœ… Complete REST API (40+ endpoints)
  • โœ… Interactive Swagger documentation
  • โœ… Database seeding with test data
  • โœ… Development scripts
  • โœ… Comprehensive guides
  • โœ… Example client implementations

๐Ÿš€ Quick Start

Prerequisites

  • Docker and Docker Compose
  • .NET 8 SDK (for development)
  • Node.js 18+ (for frontend development)

30-Second Setup

# Clone the repository
git clone https://github.com/The404Studios/YurtCord.git
cd YurtCord

# Seed database with test data
./scripts/seed-database.sh

# Start everything
./scripts/start-all.sh

That's it! Open http://localhost:3000 and login with:

  • Email: admin@yurtcord.com
  • Password: Admin123!

Access Points

Service URL Description
๐ŸŒ Frontend http://localhost:3000 Main application
๐Ÿ”Œ Backend API http://localhost:5000 REST API
๐Ÿ“– API Docs http://localhost:5000/swagger Interactive documentation
๐Ÿ’“ Health Check http://localhost:5000/api/health Service status
๐Ÿ“Š Grafana http://localhost:3001 Monitoring dashboards
๐Ÿ—„๏ธ MinIO http://localhost:9001 Object storage admin

๐Ÿ—๏ธ Architecture

Technology Stack

Backend

  • .NET 8 - Modern, high-performance framework
  • ASP.NET Core - REST API + SignalR
  • Entity Framework Core - ORM for PostgreSQL
  • Serilog - Structured logging
  • BCrypt.Net - Password hashing
  • JWT Bearer - Authentication

Frontend

  • React 18 - UI library
  • TypeScript - Type safety
  • Redux Toolkit - State management
  • Vite - Build tool
  • TailwindCSS - Styling
  • SignalR Client - Real-time connection

Infrastructure

  • PostgreSQL 15 - Primary database
  • Redis - Caching and pub/sub
  • MinIO - S3-compatible object storage
  • Prometheus - Metrics collection
  • Grafana - Monitoring dashboards
  • Nginx - Reverse proxy

Clean Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚          Presentation Layer                 โ”‚
โ”‚  (Controllers, Hubs, Middleware)            โ”‚
โ”‚           YurtCord.API                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        Application Layer                    โ”‚
โ”‚  (Services, Business Logic)                 โ”‚
โ”‚         YurtCord.Application                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            Domain Layer                     โ”‚
โ”‚  (Entities, Interfaces, DTOs)               โ”‚
โ”‚           YurtCord.Core                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚       Infrastructure Layer                  โ”‚
โ”‚  (Database, External Services)              โ”‚
โ”‚       YurtCord.Infrastructure               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“š Documentation

For Users

For Developers


๐ŸŽฎ API Examples

Authentication

// Register a new user
const response = await fetch('http://localhost:5000/api/auth/register', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    username: 'john',
    email: 'john@example.com',
    password: 'Password123!'
  })
});

const { token, user } = await response.json();

Send a Message

// Send message via REST
await fetch(`http://localhost:5000/api/channels/${channelId}/messages`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${token}`
  },
  body: JSON.stringify({
    content: 'Hello, world!'
  })
});

// Or via WebSocket
await connection.invoke('SendMessage', channelId, 'Hello, world!');

Real-time Events

// Connect to SignalR gateway
const connection = new signalR.HubConnectionBuilder()
  .withUrl('http://localhost:5000/gateway', {
    accessTokenFactory: () => token
  })
  .build();

// Listen for new messages
connection.on('MessageCreate', (message) => {
  console.log('New message:', message);
});

await connection.start();

๐Ÿ› ๏ธ Development

Running in Development Mode

# Terminal 1: Start infrastructure
docker-compose up postgres redis minio

# Terminal 2: Start backend with hot reload
cd Backend/YurtCord.API
dotnet watch run

# Terminal 3: Start frontend
cd Frontend
npm run dev

Database Management

# Seed database with test data
./scripts/seed-database.sh

# Reset database completely
./scripts/reset-database.sh

# Create a migration
cd Backend/YurtCord.Infrastructure
dotnet ef migrations add MigrationName --startup-project ../YurtCord.API

Test Accounts (After Seeding)

Email Password Role
admin@yurtcord.com Admin123! Administrator
alice@example.com Password123! User (Guild Owner)
bob@example.com Password123! User (Nitro)
charlie@example.com Password123! User
diana@example.com Password123! User

๐Ÿณ Docker Deployment

Development

docker-compose up -d

Production

docker-compose -f docker-compose.master.yml up -d

Kubernetes

Health check endpoints for probes:

livenessProbe:
  httpGet:
    path: /api/health/live
    port: 5000

readinessProbe:
  httpGet:
    path: /api/health/ready
    port: 5000

๐Ÿงช Testing

Run Tests

# All tests
dotnet test

# With coverage
dotnet test /p:CollectCoverage=true

# Specific project
dotnet test Backend/YurtCord.Tests/

Manual Testing

Use the Swagger UI at http://localhost:5000/swagger:

  1. Register via /api/auth/register
  2. Copy the JWT token
  3. Click "Authorize" and enter: Bearer <token>
  4. Test any endpoint

๐Ÿ“Š Monitoring

Health Checks

  • Basic: GET /api/health
  • Detailed: GET /api/health/detailed
  • Liveness: GET /api/health/live
  • Readiness: GET /api/health/ready

Metrics

Logs

# View API logs
docker-compose logs -f api

# View all logs
docker-compose logs -f

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Write/update tests
  5. Update documentation
  6. Commit (git commit -m 'feat: Add amazing feature')
  7. Push (git push origin feature/amazing-feature)
  8. Open a Pull Request

Code Standards

  • Backend: C# 12, Clean Architecture, async/await
  • Frontend: TypeScript, React Hooks, Redux Toolkit
  • Commits: Conventional Commits format
  • Tests: Unit tests for business logic

๐Ÿ—บ๏ธ Roadmap

v1.0 (Current)

  • โœ… Real-time messaging
  • โœ… Voice/video channels
  • โœ… Server management
  • โœ… User profiles
  • โœ… REST API
  • โœ… WebSocket gateway

v1.1 (Next)

  • โฌœ File attachments and uploads
  • โฌœ Rich embeds
  • โฌœ Server invites
  • โฌœ Friend system
  • โฌœ Direct message groups
  • โฌœ Custom emojis

v1.2 (Future)

  • โฌœ Markdown formatting
  • โฌœ Message threads
  • โฌœ Forum channels
  • โฌœ Audit logs
  • โฌœ Advanced permissions
  • โฌœ Mobile app

๐Ÿ“œ License

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


๐Ÿ™ Acknowledgments

  • Discord for the inspiration
  • The .NET and React communities
  • All contributors and users

๐Ÿ“ž Support


๐ŸŒŸ Star History

If you find YurtCord useful, please consider giving it a star! โญ


Built with โค๏ธ by The404Studios

โฌ† Back to Top

About

a decentralized relayed community irc network.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages