$ show snoww/loa-logs
LOA Logs is a desktop damage meter and combat log parser for the MMORPG Lost Ark, built as a Tauri application with a Rust backend and Svelte 5 frontend. In production, it captures combat data from the game client through file watching or low-level network interception (WinDivert on Windows, packet capture helpers on Linux), parses entity/skill/buff events, and renders live DPS meters, encounter statistics, and post-raid progression analysis via ECharts dashboards. It persists encounter history to SQLite through a repository pattern with connection pooling, and enriches combat data with static game data (skill tables, NPC windows, encounter definitions) bundled as generated TypeScript/JSON files. The architecture is a hybrid desktop app: the Rust backend (src-tauri) handles log ingestion, packet parsing, entity tracking, and database persistence, while the Svelte frontend uses reactive state classes (EntityState, SkillState, BuffState) and a typed column configuration system (LogColumn) to drive tables and charts. Key entry points include the Tauri command layer, the EntityTracker module, and Svelte routes for settings and statistics. External dependencies include the Lost Ark game client, WinDivert, SQLite, and several generated game data files that must be updated with each game patch. The codebase is actively maintained (recent commits, v1.51.1 tag, 30+ tests) but carries notable technical debt: a ~6000-line repository file tightly coupled to multiple modules, legacy components (LegacyLogRDPSBreakdown.svelte) alongside new implementations, live/log component duplication, and heavy use of debug_print! macros. Game data files drift from the live game without an update mechanism, and the Node.js >=24 requirement may cause compatibility issues. Despite this, several clean patternsβcomposable stat modifiers, entity lifecycle management, reactive model-view state, and type-safe column configsβare genuinely reusable. This is primarily an application repo, though it embeds substantial data-processing and game-data components that give it a hybrid character.
The LLM identified 5 files worth highlighting for reuse:
EntityTracker manages the lifecycle of player and NPC entities (init_env, new_pc, new_npc, apply_inspect_result, collect_missing_party_inspects). It's a self-contained registry pattern that could be extracted for any entity-tracking system in game telemetry or simulation software.
add_ability_feature and apply_external_addon apply stat bonuses from multiple game systems (gear, engravings, ark passives) through a unified interface. This composable stat-modification pattern is reusable for any RPG stat calculator or game-data aggregation tool.
RaidBuilder is a test helper that generates realistic encounter data for integration tests. It demonstrates a factory pattern for creating complex test fixtures, which is directly reusable in any data-heavy application's test suite.
EntityState, SkillState, and BuffState are reactive state classes that compute derived values from raw game data using Svelte 5 runes ($state, $derived). This model-view pattern is reusable for any real-time dashboard that needs to transform raw telemetry into derived UI state.
LogColumn<EncounterState, EntityState> is a typed column configuration array that drives table rendering. This type-safe column pattern is reusable in any data-table component, decoupling column definitions from rendering logic.