A fully-featured, production-ready Discord clone built with .NET 8 and React
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.
- 🚀 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
- ✅ 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 channels with WebRTC
- ✅ Video calling
- ✅ Screen sharing
- ✅ Mute/deafen controls
- ✅ Speaking indicators
- ✅ User limit per channel
- ✅ Bitrate configuration
- ✅ 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 profiles with avatars and bios
- ✅ Custom status (online/idle/dnd/invisible)
- ✅ Rich presence
- ✅ Direct messages
- ✅ Friend system (coming soon)
- ✅ Notification settings (coming soon)
- ✅ 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
- ✅ Complete REST API (40+ endpoints)
- ✅ Interactive Swagger documentation
- ✅ Database seeding with test data
- ✅ Development scripts
- ✅ Comprehensive guides
- ✅ Example client implementations
- Docker and Docker Compose
- .NET 8 SDK (for development)
- Node.js 18+ (for frontend development)
# 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.shThat's it! Open http://localhost:3000 and login with:
- Email:
admin@yurtcord.com - Password:
Admin123!
| 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 |
- .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
- React 18 - UI library
- TypeScript - Type safety
- Redux Toolkit - State management
- Vite - Build tool
- TailwindCSS - Styling
- SignalR Client - Real-time connection
- PostgreSQL 15 - Primary database
- Redis - Caching and pub/sub
- MinIO - S3-compatible object storage
- Prometheus - Metrics collection
- Grafana - Monitoring dashboards
- Nginx - Reverse proxy
┌─────────────────────────────────────────────┐
│ 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 │
└─────────────────────────────────────────────┘
- Quick Start Guide - Get up and running in 30 seconds
- Master Setup - Production deployment guide
- Development Guide - Complete development workflow
- API Documentation - REST API reference (40+ endpoints)
- Architecture - System design and patterns
- Voice Channels - WebRTC implementation guide
// 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 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!');// 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();# 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# 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| 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-compose up -ddocker-compose -f docker-compose.master.yml up -dHealth check endpoints for probes:
livenessProbe:
httpGet:
path: /api/health/live
port: 5000
readinessProbe:
httpGet:
path: /api/health/ready
port: 5000# All tests
dotnet test
# With coverage
dotnet test /p:CollectCoverage=true
# Specific project
dotnet test Backend/YurtCord.Tests/Use the Swagger UI at http://localhost:5000/swagger:
- Register via
/api/auth/register - Copy the JWT token
- Click "Authorize" and enter:
Bearer <token> - Test any endpoint
- Basic:
GET /api/health - Detailed:
GET /api/health/detailed - Liveness:
GET /api/health/live - Readiness:
GET /api/health/ready
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3001 (admin/admin)
# View API logs
docker-compose logs -f api
# View all logs
docker-compose logs -fWe welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Write/update tests
- Update documentation
- Commit (
git commit -m 'feat: Add amazing feature') - Push (
git push origin feature/amazing-feature) - Open a Pull Request
- Backend: C# 12, Clean Architecture, async/await
- Frontend: TypeScript, React Hooks, Redux Toolkit
- Commits: Conventional Commits format
- Tests: Unit tests for business logic
- ✅ Real-time messaging
- ✅ Voice/video channels
- ✅ Server management
- ✅ User profiles
- ✅ REST API
- ✅ WebSocket gateway
- ⬜ File attachments and uploads
- ⬜ Rich embeds
- ⬜ Server invites
- ⬜ Friend system
- ⬜ Direct message groups
- ⬜ Custom emojis
- ⬜ Markdown formatting
- ⬜ Message threads
- ⬜ Forum channels
- ⬜ Audit logs
- ⬜ Advanced permissions
- ⬜ Mobile app
This project is licensed under the MIT License - see the LICENSE file for details.
- Discord for the inspiration
- The .NET and React communities
- All contributors and users
- GitHub Issues: Report bugs or request features
- Discussions: Ask questions and share ideas
- Documentation: Read the complete guides
If you find YurtCord useful, please consider giving it a star! ⭐
Built with ❤️ by The404Studios