How sunrisecommunity/sunrise works
Project type and purpose
• This is a full-stack, monorepo .NET application implementing a private osu! server.
• It provides two backends:
• Sunrise.Server – a real-time Bancho-protocol game server (TCP/UDP packet handlers, chat, multiplayer, lightweight HTTP endpoints)
• Sunrise.API – an HTTP/JSON + WebSocket REST API for the web client (Sunset) and external integrations.
File structure
• Top-level service folders:
• Sunrise.Server – packet handlers, chat commands, controllers, middlewares, services, repositories, EF Core migrations, Hangfire jobs.
• Sunrise.API – ASP .NET controllers (Auth, User, Beatmap, Score, WebSocket), serializable request/response DTOs, services, utilities.
• Sunrise.Shared – shared domain models, EF Core DbContext & migrations, repository & service abstractions, helpers, utilities.
• Data & Data.Tests – static asset files (avatars, replays, banners) and test fixtures.
• Sunrise.Server.Tests, Sunrise.Tests – unit and integration tests for both backends and shared components.
• Dockerfile + docker-compose*.yml – container definitions for each service, MySQL, Redis, Prometheus, Grafana, CI (.github/workflows).
Key insights from the README
• Core osu! features: login/registration, score submission, leaderboards, chat, multiplayer, spectating, achievements.
• Additional infra: Redis caching & rate limiting, Docker support, database migrations & backups, Prometheus metrics + Grafana.
• External dependency: Observatory beatmap manager.
Essential details
• Don’t collapse Redis or MySQL into a generic “Database”; show their distinct roles (cache vs persistent store).
• Docker Compose network to show how containers communicate.
• Hangfire scheduler and recurring job flows separately.
• If zooming in, break Sunrise.Server into PacketListener, Command modules, and Middleware.