pvarentsov/sudoku
37.8
Weak · 21 September 2026
994
lines of production code
TypeScript
primary language
4
measurements over time
What this system is
This system is a real-time multiplayer Sudoku game platform built on NestJS. It manages game state and player sessions using an in-memory store, exposing a WebSocket-based API for live updates and game actions. The architecture separates core game logic, service layers, and client-side UI, supporting features like game creation, player joining, and move validation.
Features
Add custom WebSocket exception filter for Sudoku errors
A new SudokuExceptionFilter has been introduced to handle errors in WebSocket connections. This filter intercepts exceptions and maps them to specific error events: CellValueError is mapped to an 'IncorrectValue' event, while HttpException and other errors are mapped to a 'Common' error event, ensuring clients receive structured error messages.
src/app/server/gateways/exception-handler · high confidence
Added SudokuServer bootstrap entry point
A new SudokuServer class was added to src/app/server/SudokuServer.ts, providing a static bootstrap method that initializes the NestJS application using SudokuModule and listens on the configured API host and port.
src/app/server · high confidence
Added build script and application entry points
A new build script (scripts/build.sh) was added to automate the build process, which compiles TypeScript, copies necessary files, and installs production dependencies. Additionally, new entry points were introduced: src/Main.ts serves as the application bootstrap, and src/app/index.ts re-exports the SudokuServer, facilitating the application's startup and module structure.
scripts, src, src/app · high confidence
Introduce SudokuModule for server-side game logic
The server now includes a new SudokuModule that registers all game and player services (CreateNewGameService, EnterValueGameService, JoinPlayerGameService, LeaveGameService, ListGamesService, PlayGameService, CreatePlayerService, ListPlayersService, RemovePlayerService) along with in-memory store adapters and event gateways. This establishes the backend wiring for creating, joining, and playing Sudoku games, as well as managing player sessions.
src/app/server/modules · high confidence
Introduce WebSocket-based game event gateway for real-time multiplayer updates
Players now receive live updates about game state changes, such as other players joining, leaving, or making moves, via a new \SudokuEventGateway\ that bridges the server's business logic to connected clients. The gateway handles disconnects, game creation, player joining, and game actions (play, enter value), broadcasting updated game and player lists to all relevant participants in real time. A \SocketPlayerManager\ tracks active player connections to ensure updates reach every active participant.
src/app/server/gateways · high confidence
Introduce centralized event name constants for game and player interactions
A new \GatewayEvents\ class has been added to centralize string constants for game and player-related events. This includes event names for game creation, listing, playing, joining, leaving, and value entry, as well as player creation and listing, and error handling. Users interacting with the server will now have a single source of truth for these event identifiers, ensuring consistency across the application.
src/app/server/gateways/events · high confidence
Introduce core game model and factory
Added new model classes for the Sudoku game logic, including Game, Cell, Player, and Coordinate, along with a GameFactory to generate and configure game grids. The Game class manages game state (Waiting/Playing), player joins, and move validation, while the factory handles grid generation and cell clearing.
src/core/model · high confidence
Introduce in-memory store adapters for games and players
Added in-memory implementations of the game and player store interfaces (IGameStore and IPlayerStore) to support local, non-persistent data storage. This change introduces the adapter layer that allows the application to interact with game and player data in memory, enabling features like adding, updating, and removing games and players, as well as querying them with filters. This provides a foundational, temporary storage mechanism that can be swapped for a persistent backend later.
src/adapter, src/core/store · high confidence
Introduce service-layer abstractions for game and player management
The core service layer now exposes a unified \IService\<TInput, TOutput\>\ interface and a set of concrete service classes that handle game and player operations. For games, the system supports creating new games, entering values, joining/leaving games, listing active games, and playing moves. For players, it supports creating, listing, and removing players. Each operation is wrapped in a dedicated service class (e.g., \CreateNewGameService\, \EnterValueGameService\, \CreatePlayerService\) that validates inputs via DTOs and interacts with the underlying \IGameStore\ and \IPlayerStore\ interfaces.
src/core/service · high confidence
Introduces core infrastructure for game logic and error handling
Adds foundational utilities and configuration for the game engine, including a Config class for environment variables, DI tokens for game and player services, and custom error classes (CoreError, CellValueError) that capture coordinate details. Also introduces type definitions (Nullable, Optional) and utility classes (ArrayUtil, AssertUtil) to support the core game logic.
src/core/common · high confidence
Sudoku client UI and initial state management
The client application now includes a complete HTML structure for the Sudoku game interface, featuring a connection screen for entering a nickname, a game list view, and an active game grid. The page integrates Materialize CSS and Socket.IO for real-time communication, and initializes JavaScript state objects to manage player profiles, game lists, and UI conditions.
src/app/client · high confidence
Behavioural changes
Added local environment configuration for API and game settings
A new local environment file has been added to configure the API host and port, as well as game-specific settings such as the number of empty cells per row. This allows developers to easily override default settings for local development without modifying global configuration files.
env · high confidence
Dependencies
Updated NestJS and related dependencies
The project's dependencies have been updated, including an upgrade to NestJS version 8.1.1 (along with @nestjs/common, @nestjs/core, @nestjs/platform-express, @nestjs/platform-socket.io, and @nestjs/websockets) and class-validator 0.13.1. Development dependencies such as TypeScript 4.4.4 and ESLint 7.32.0 are also included in the lockfile.
(dependencies) · medium confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 37 → 38 (+0.7)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 85 → 93 (+8.7)
- Architecture 69 → 69 (+0.0)
- Maturity 43 → 43 (+0.0)
- Readiness 13 → 16 (+2.3)
- Security 75 → 80 (+5.0)
- Accessibility 61 → 61 (+0.0)
Resolved (55)
- Change coupling: Main.ts ↔ Game.ts (src/Main.ts)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- …and 35 more
New (58)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile is in a format this engine cannot resolve)
- Documentation: no architecture or design documentation (README.md)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- …and 38 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
pvarentsov/sudoku was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b4e8c0f0042e64a2895b084e41e3906554f3a17c — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b84573e22831.