A modern, full-featured Sudoku game with multiple frontend options (Blazor Server and React) and a robust C# backend, following Clean Architecture and Domain-Driven Design (DDD) principles. The solution is modular, testable, and cloud-ready, featuring clean interactive UIs, multiple difficulty levels, and robust backend logic.
This solution is organized into several projects:
Sudoku.sln
├── Sudoku.Api/ # REST API
├── Sudoku.AppHost/ # Application orchestration/hosting
├── Sudoku.Application/ # Application use cases and orchestration
├── Sudoku.Blazor/ # Blazor Server web UI
├── Sudoku.React/ # React web UI (alternate frontend)
├── Sudoku.Domain/ # Core domain logic and business rules
├── Sudoku.Infrastructure/ # Infrastructure (storage, external APIs)
└── Tests/ # Unit and integration tests
- .NET 10.0 throughout
- Blazor Server and React for interactive UI options
- 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) / React (REST API)
- 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)
- Multiple frontend options (Blazor Server, React)
- Real-time, interactive UI
- Game state persistence (local and cloud)
- Undo/redo, pencil mode, and validation
- Modular, extensible architecture
Prerequisites:
- .NET 10.0 SDK
- (Optional) Azure account for cloud storage features
To build the solution:
dotnet buildTo run the Blazor Server app locally:
dotnet run --project Sudoku.BlazorThe app will be available at https://localhost:5001 (or as indicated in the console output).
To run the React app locally:
cd Sudoku.React
npm install
npm run devThe React app will be available at http://localhost:5173 (or as indicated in the console output).
Note: Make sure to also run the API project (Sudoku.Api) when using the React frontend.
To run all tests:
dotnet testFor a detailed architecture diagram and explanation, see docs/architecture-diagram.md.