Skip to content

Latest commit

 

History

History
132 lines (98 loc) · 10.1 KB

File metadata and controls

132 lines (98 loc) · 10.1 KB

TravianBotSharp Onboarding Guide

Project Overview

TravianBotSharp is a Windows-only Travian automation bot built on .NET 8 with WPF, ReactiveUI, Entity Framework Core, Selenium, and Serilog. The repo is split into a desktop shell, a core automation/runtime layer, and tests that enforce host and architecture rules. The main story is: start the shell, prepare browser and persistence services, sync live game state, schedule tasks, execute automation, and keep everything observable and recoverable.

Architecture Layers

Project Overview

Key files:

This layer tells you what the project is and how the solution is assembled.

Desktop Shell

Key files:

This is the WPF entry path and the top-level UI orchestration layer.

Runtime Core

Key files:

This layer contains the host setup, scheduling, browser control, parsing, and gameplay automation commands.

Domain Model

Key files:

This layer defines the persisted game state, task hierarchy, and cross-cutting execution behaviors.

Quality Checks

Key files:

These tests protect startup, architecture, and parser behavior.

Key Concepts

Guided Tour

  1. Start with README.md and TravBotSharp.sln to understand the project’s purpose and structure.
  2. Follow the startup path in WPFUI/App.xaml.cs, MainCore/AppMixins.cs, and WPFUI/Views/MainWindow.xaml.cs.
  3. Inspect runtime orchestration in MainCore/UI/ViewModels/MainViewModel.cs, MainCore/Services/ChromeManager.cs, MainCore/Services/TaskManager.cs, and MainCore/Infrasturecture/Persistence/AppDbContext.cs.
  4. Trace live game synchronization in MainCore/Commands/Update/UpdateAccountInfoCommand.cs and MainCore/Parsers/BuildingTabParser.cs.
  5. Study the domain model in MainCore/Tasks/Base/BaseTask.cs, MainCore/Tasks/Base/AccountTask.cs, MainCore/Tasks/Base/VillageTask.cs, and the files under MainCore/Entities/.
  6. Finish with the tests in MainCore.Test/ArchitectureTest.cs and MainCore.Test/HostingTest.cs.

File Map

Project and Shell

Runtime and Automation

Domain and Persistence

Tests and Safety Nets

Complexity Hotspots

The graph does not include numeric complexity values, so these are inferred hotspots based on responsibility and coupling: