How vantuankiet1239/hrksystem works
HRK is a multi-service backend with gateway, authentication, and game APIs. The visible user workflow enters an authenticated game endpoint, dispatches player or hero requests, and returns API responses; authentication separately supports registration, login, logout, refresh, and application-route discovery. The game tree also identifies battle, catalog, dungeon, formation, inventory, and metadata capabilities. The excerpts show selected controller dispatches, battle-engine collaborators, and formation-power reads; unsampled subsystem links are therefore shown as unverified rather than asserted calls.
Main entry points: PlayerController.cs Game API · AuthController.cs Auth API · FormationPowerQueryService.cs Formation features · BattleSimulationEngine.cs Battle simulation
Components 26
API entry points
- API gateway
ApiGateway/ApiGateway/Program.cs - Game API
Services/HRKGAME/HRK.GAME/Controllers/PlayerController.cs
Authentication
- Auth API
Services/AUTH/HRK.AUTH/Controllers/AuthController.cs - Auth commands
Services/AUTH/AUTH.Application/Features/Commands - Application routes
Services/AUTH/AUTH.Application/Interfaces/IApplicationRouteConfigService.cs - Identity service
Services/AUTH/AUTH.Infrastructure/Identity/IdentityService.cs
Game capabilities
- Player features
Services/HRKGAME/GAME.Application/Interfaces/IGamePlayerService.cs - Hero features
Services/HRKGAME/HRK.GAME/Controllers/PlayerHeroesController.cs - Inventory features
Services/HRKGAME/GAME.Application/Features/Commands/Inventory - Catalog features
Services/HRKGAME/GAME.Application/Features/Queries/Catalog - Formation features
Services/HRKGAME/GAME.Infrastructure/Services/FormationPowerQueryService.cs - Formation stats
Services/HRKGAME/GAME.Application/Interfaces/IFormationStatService.cs - Equipment loader
Services/HRKGAME/GAME.Infrastructure/Services/EquipmentBatchLoader.cs - Battle simulation
Services/HRKGAME/GAME.Domain/Battle/BattleSimulationEngine.cs - Skill handlers
Services/HRKGAME/GAME.Domain/Battle/Skills/SkillHandlerRegistry.cs - Effect handlers
Services/HRKGAME/GAME.Domain/Battle/Effects/BattleEffectHandlerRegistry.cs - Battle reactions
Services/HRKGAME/GAME.Domain/Battle/Reactions/BattleCombatantReactionRegistry.cs - Dungeon features
Services/HRKGAME/GAME.Infrastructure/Services/DungeonService.cs - Metadata features
Services/HRKGAME/GAME.Infrastructure/Services/MetadataService.cs
Shared runtime
- Token service
CoreEngine/Core.Common/JwtHandler/JwtCoreService.cs - Request mediator
Services/HRKGAME/HRK.GAME/Controllers/PlayerController.cs - Unit of work
CoreEngine/Core.Common/Repositories/UnitOfWork.cs - Read repositories
CoreEngine/Core.Common/Repositories/ReadOnlyRepository.cs - Game database
Services/HRKGAME/GAME.Infrastructure/Data/GameDbContext.cs - API responses
CoreEngine/Core.Common/Entity/BaseResponse.cs
Other components
- API client
Connections 27
- API client → API gateway: sends requests
- API gateway → Auth API: routes requests
- API gateway → Game API: routes requests
- API client → Auth API: calls auth
- Auth API → Auth commands: dispatches commands
Services/AUTH/HRK.AUTH/Controllers/AuthController.cs - Auth API → Application routes: loads routes
Services/AUTH/HRK.AUTH/Controllers/AuthController.cs - Auth commands → Identity service: uses identity
- Auth commands → Token service: issues tokens
- API client → Game API: calls game API
- Game API → Request mediator: dispatches queries
Services/HRKGAME/HRK.GAME/Controllers/PlayerController.cs - Game API → Player features: calls player service
Services/HRKGAME/HRK.GAME/Controllers/PlayerController.cs - Game API → Hero features: calls hero routes
- Game API → Inventory features: serves inventory
- Game API → Catalog features: serves catalog
- Game API → Formation features: serves formation
- Game API → Battle simulation: serves battles
- Game API → Dungeon features: serves dungeons
- Game API → Metadata features: serves metadata
- Battle simulation → Skill handlers: resolves skills
Services/HRKGAME/GAME.Domain/Battle/BattleSimulationEngine.cs - Battle simulation → Effect handlers: creates registry
Services/HRKGAME/GAME.Domain/Battle/BattleSimulationEngine.cs - Battle simulation → Battle reactions: creates registry
Services/HRKGAME/GAME.Domain/Battle/BattleSimulationEngine.cs - Formation features → Unit of work: queries entities
Services/HRKGAME/GAME.Infrastructure/Services/FormationPowerQueryService.cs - Formation features → Equipment loader: loads equipment
Services/HRKGAME/GAME.Infrastructure/Services/FormationPowerQueryService.cs - Formation features → Formation stats: calculates power
Services/HRKGAME/GAME.Infrastructure/Services/FormationPowerQueryService.cs - Unit of work → Read repositories: provides repositories
- Read repositories → Game database: reads entities
- Auth API → API responses: returns responses
Services/AUTH/HRK.AUTH/Controllers/AuthController.cs