How sp-tarkov/server-csharp works
SPTarkov is a locally run server for the modified Escape From Tarkov client. The principal workflow is a client request entering the server, being dispatched to a game-domain controller, and receiving a game-shaped response; domain handlers also read or update player profiles and game data. The tree documents broad gameplay areas including profiles, inventory, bots, quests, hideout, traders, flea market, and raid behavior. Relationships below are limited to README statements and visible SOURCE INDEX references; several domain links are documented at subsystem level because their implementations were not sampled.
Main entry points: Program.cs Server startup · TemplateTable.cs Game templates · Controllers Game controllers · RagfairPriceService.cs Market pricing
Components 23
Server runtime
- Server startup
SPTarkov.Server/Program.cs - Database importer
SPTarkov.Server/Helpers/DatabaseImporter.cs - Dependency injection
Libraries/SPTarkov.DI/DependencyInjectionHandler.cs - HTTP server
Libraries/SPTarkov.Server.Core/Helpers/Server/HttpServerHelper.cs - Logging
Libraries/SPTarkov.Common/Models/Logging/ISptLogger.cs
Game request handling
- Request routing
Libraries/SPTarkov.Server.Core/DI/Router.cs - Game controllers
Libraries/SPTarkov.Server.Core/Controllers - Request callbacks
Libraries/SPTarkov.Server.Core/Callbacks - Item event routes
Libraries/SPTarkov.Server.Core/Routers/ItemEvents/RagfairItemEventRouter.cs - Flea market
Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs - Market pricing
Libraries/SPTarkov.Server.Core/Services/Ragfair/RagfairPriceService.cs - Bot generation
Libraries/SPTarkov.Server.Core/Generators/Bot/BotGenerator.cs - Quest handling
Libraries/SPTarkov.Server.Core/Helpers/Quest/QuestHelper.cs - Raid handling
Libraries/SPTarkov.Server.Core/Helpers/InRaid/InRaidHelper.cs
Game state and data
- Player profiles
Libraries/SPTarkov.Server.Core/Helpers/Profile/ProfileHelper.cs - Profile persistence
Libraries/SPTarkov.Server.Core/Servers/SaveServer.cs - Item logic
Libraries/SPTarkov.Server.Core/Helpers/Items/ItemHelper.cs - Item data model
Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Item.cs - Game templates
Libraries/SPTarkov.Server.Core/Models/Spt/Tables/TemplateTable.cs - Global game data
Libraries/SPTarkov.Server.Core/Models/Spt/Tables/GlobalTable.cs
Mod and administration
- Mod loading
SPTarkov.Server/Modding/ModLoader.cs - Web administration
Libraries/SPTarkov.Server.Web/Services/ConfigEditorService.cs
Other components
- Modified client
Connections 22
- Modified client → HTTP server: sends requests
README.md - Server startup → Database importer: imports data
SPTarkov.Server/Program.cs - Server startup → Mod loading: loads mods
SPTarkov.Server/Program.cs - Server startup → HTTP server: starts server
SPTarkov.Server/Program.cs - Server startup → Dependency injection: configures services
- HTTP server → Request routing: dispatches requests
- Request routing → Game controllers: routes requests
- Game controllers → Request callbacks: delegates handling
- Item event routes → Request callbacks: routes flea events
Libraries/SPTarkov.Server.Core/Routers/ItemEvents/RagfairItemEventRouter.cs - Game controllers → Player profiles: uses profile logic
Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs - Player profiles → Profile persistence: persists profiles
Libraries/SPTarkov.Server.Core/Helpers/Profile/ProfileHelper.cs - Item logic → Game templates: reads templates
Libraries/SPTarkov.Server.Core/Helpers/Items/ItemHelper.cs - Item logic → Item data model: processes items
Libraries/SPTarkov.Server.Core/Helpers/Items/ItemHelper.cs - Flea market → Market pricing: gets prices
Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs - Market pricing → Game templates: reads templates
Libraries/SPTarkov.Server.Core/Services/Ragfair/RagfairPriceService.cs - Market pricing → Item logic: checks item types
Libraries/SPTarkov.Server.Core/Services/Ragfair/RagfairPriceService.cs - Flea market → Player profiles: updates offers
Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs - Bot generation → Game templates: uses game data
- Quest handling → Game templates: uses quest data
- Raid handling → Global game data: uses global settings
- Web administration → Global game data: edits configuration
- Server startup → Logging: configures logging
SPTarkov.Server/Program.cs