Module: Infrastructure

Module: FirelandsInfrastructure (src/infrastructure)

Infrastructure wires the emulator to the outside world: MariaDB, Boost.Asio TCP, optional REST, realm-link, Lua scripting, and collision stubs.

All socket I/O uses C++20 coroutines (co_await, boost::asio::use_awaitable). Shared helpers: AsioAwaitables.h.

Persistence (infrastructure/persistence/)

ComponentRole
DatabaseMigratorRuns sql/bundled/sql/init/sql/migrations/; tracks schema_migrations
MySqlAccountRepositoryIAccountRepository (auth DB)
MySqlRealmRepositoryIRealmRepository
MySqlCharacterRepositoryICharacterRepository
MySqlPlayerCreateInfoRepositoryWorld DB templates
MySqlGmTicketRepositoryGM tickets
MySqlGossipRepository, MySqlNpcTextRepository, MySqlQuestGossipRepositoryGossip ports
MySqlCreatureSpawnRepositoryCreature spawns
MemoryWebSessionRepositoryIn-memory REST sessions
InMemoryThreatManager, MySqlThreatManager, MySqlSpellProcessorCombat ports

Network (infrastructure/network/)

ComponentRole
AsyncNetworkServerCoroutine accept loop; Update() polls io_context
AuthSessionAuth client read/write loops
WorldSessionWorld client; handlers under worldsession/*.cpp
RestAuthServerREST login on Network.RestPort
RealmLinkSession / RealmLinkOutboundAuth ↔ world live metrics

Scripting & world adapters

ComponentRole
LuaGameScriptHostLua 5.4 under Scripting.ScriptsDirectory
SpellEntryDbcStore, SpellCastTablesDbcClient DBC spell data
MapCollisionQueriesStubPlaceholder until full vmap integration

CMake notes

FirelandsInfrastructure links FirelandsApplication, MariaDB C++, Boost thread, Lua, zlib. LuaGameScriptHost.cpp skips PCH for toolchain compatibility.