A fully-featured, production-ready Discord clone built with .NET 8 and React
Features โข Quick Start โข Documentation โข Contributing
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