How xgepic/chessdatabase works
Chess Database is a local, single-player chess-game collection: the desktop shell hosts an ASP.NET Core backend and Angular UI, with the collection stored in SQLite. The main workflow is entering games on a board or importing PGN, storing and browsing games, then replaying, annotating and analysing them with Stockfish. Distinct branches support research, player statistics and training. The README documents several capabilities whose implementation excerpts were not sampled; those are represented at their supported directory paths. Source-level links are included only where the excerpts or index support them.
Main entry points: CollectionDbContext.cs SQLite Collection · GameAnalyzer.cs Game Assessment · api.ts HTTP API Client · ResearchEndpoints.cs Position Research
Components 23
Collection and Games
- SQLite Collection
src/ChessDatabase.Api/Collection/CollectionDbContext.cs - Game Management
src/ChessDatabase.Api/Games/GameEndpoints.cs - Move Tree
src/ChessDatabase.Api/Games/MoveTree.cs - PGN Import Export
src/ChessDatabase.Api/Import/PgnImporter.cs - Collection Backups
src/ChessDatabase.Api/Backup/CollectionBackup.cs
Analysis and Rules
- Chess Rules
src/ChessDatabase.Rules/Position.cs - Game Assessment
src/ChessDatabase.Api/Analysis/GameAnalyzer.cs - Analysis Queue
src/ChessDatabase.Api/Analysis/GameAnalysisQueue.cs - Engine Host
src/ChessDatabase.Api/Engines/EngineHost.cs - UCI Engine
src/ChessDatabase.Api/Engines/UciEngine.cs - Stockfish
Research and Training
- Opening Classification
src/ChessDatabase.Api/Openings/OpeningClassifier.cs - Position Research
src/ChessDatabase.Api/Research/ResearchEndpoints.cs - Lichess Services
src/ChessDatabase.Api/Research/LichessFetch.cs - Tablebase Lookup
src/ChessDatabase.Api/Research/TablebaseClient.cs - Repertoire and Training
src/ChessDatabase.Api/Training
Players and Statistics
- Players and Statistics
src/ChessDatabase.Api/Players/PlayerEndpoints.cs
Desktop and UI
- Desktop Host
src/ChessDatabase.Desktop/Program.cs - Backend App
src/ChessDatabase.Api/ChessDatabaseApp.cs - Angular UI
ui/src/app/app.routes.ts - HTTP API Client
ui/src/app/api/api.ts - Game Review UI
ui/src/app/review/game-review.ts
Other components
- Owner
Connections 27
- Owner → Desktop Host: opens app
- Desktop Host → Backend App: hosts
src/ChessDatabase.Desktop/Program.cs - Backend App → Angular UI: serves UI
src/ChessDatabase.Api/ChessDatabaseApp.cs - Owner → Angular UI: uses
- Angular UI → HTTP API Client: requests data
ui/src/app/app.routes.ts - HTTP API Client → Game Management: calls endpoints
- HTTP API Client → PGN Import Export: imports PGN
- Game Review UI → HTTP API Client: loads and edits
ui/src/app/review/game-review.ts - Game Management → SQLite Collection: reads and writes
- PGN Import Export → SQLite Collection: stores games
src/ChessDatabase.Api/Import/PgnImporter.cs - PGN Import Export → Chess Rules: parses moves
src/ChessDatabase.Api/Import/PgnImporter.cs - Game Management → Move Tree: uses move tree
- Game Review UI → Move Tree: replays variations
- Game Assessment → Engine Host: starts engine
src/ChessDatabase.Api/Analysis/GameAnalyzer.cs - Game Assessment → SQLite Collection: saves assessment
src/ChessDatabase.Api/Analysis/GameAnalyzer.cs - Game Assessment → Chess Rules: builds positions
src/ChessDatabase.Api/Analysis/GameAnalyzer.cs - Analysis Queue → Game Assessment: runs analyses
src/ChessDatabase.Api/Analysis/GameAnalysisQueue.cs - Engine Host → UCI Engine: starts and configures
src/ChessDatabase.Api/Engines/EngineHost.cs - UCI Engine → Stockfish: speaks UCI
src/ChessDatabase.Api/Engines/UciEngine.cs - Game Review UI → Game Assessment: requests and displays
- Position Research → Lichess Services: fetches masters
- Position Research → Tablebase Lookup: looks up positions
- Position Research → SQLite Collection: queries collection
- Repertoire and Training → SQLite Collection: uses games
src/ChessDatabase.Api/Collection/CollectionDbContext.cs - Players and Statistics → SQLite Collection: queries players
- Collection Backups → SQLite Collection: backs up collection
- Opening Classification → SQLite Collection: classifies game lines