A modern, full-featured Sudoku game built with Blazor Server and C#, following Clean Architecture and Domain-Driven Design (DDD) principles. The solution is modular, testable, and cloud-ready, featuring a clean interactive UI, multiple difficulty levels, and robust backend logic.
This solution is organized into several projects:
Sudoku.sln
├── Sudoku.Domain/ # Core domain logic and business rules
├── Sudoku.Application/ # Application use cases and orchestration
├── Sudoku.Infrastructure/ # Infrastructure (storage, external APIs)
├── Sudoku.Web.Server/ # Blazor Server web UI
├── Sudoku.Api/ # REST API (optional)
├── Sudoku.Storage.Azure/ # Azure storage implementation
├── Sudoku.AppHost/ # Application orchestration/hosting
└── Tests/ # Unit and integration tests
- .NET 9.0 throughout
- Blazor Server for real-time, interactive UI
- Domain-Driven Design (DDD): Rich domain models, value objects, domain events
- Clean Architecture: Clear separation of concerns between domain, application, infrastructure, and UI
- CQRS Pattern: Commands and queries are handled separately for scalability and maintainability
- Azure Storage: Cloud persistence for game state
- Dependency Injection: For all services and repositories
- Comprehensive Testing: Unit and integration tests for all layers
- User Interaction: Browser → Blazor Server → SignalR Hub
- Game Logic: Web Services → Domain Layer
- State Management: Game state stored in memory, local storage, or Azure
- Persistence: Azure Blob Storage with optional caching
- Multiple difficulty levels (Easy, Medium, Hard)
- Real-time, interactive UI
- Game state persistence (local and cloud)
- Undo/redo, pencil mode, and validation
- Modular, extensible architecture
Prerequisites:
- .NET 9.0 SDK
- (Optional) Azure account for cloud storage features
To build the solution:
dotnet build
To run the Blazor Server app locally:
dotnet run --project Sudoku.Web.Server
The app will be available at https://localhost:5001
(or as indicated in the console output).
To run all tests:
dotnet test
For a detailed architecture diagram and explanation, see current-architecture-diagram.md
in the root of the repository.