No description
- C# 52%
- Lua 31.3%
- JavaScript 8.7%
- Python 4.5%
- TypeScript 2.1%
- Other 1.4%
| .idea/.idea.AnantaServer/.idea | ||
| crates | ||
| docs | ||
| proxy | ||
| server | ||
| tools | ||
| .gitignore | ||
| ananta.toml | ||
| AnantaServer.sln | ||
| build.bat | ||
| Cargo.lock | ||
| Cargo.toml | ||
| filter_vehicle_logs.ps1 | ||
| monitor_log.bat | ||
| README.md | ||
| REFACTOR_MAP.md | ||
| start.bat | ||
| start_minimal.bat | ||
| test_error.txt | ||
| test_output.txt | ||
ANANTA - New Modular Structure
Build Status
| Component | Language | Build | Description |
|---|---|---|---|
crates/ananta-common |
Rust | PASS | Types, errors, Vector3, GridCell |
crates/ananta-packet |
Rust | PASS | RC4, codec, handshake, heartbeat, method IDs (7 tests) |
crates/ananta-launcher |
Rust | PASS | CLI, TUI dashboard (ratatui), process mgmt, health check |
server/Ananta.Core |
C# | PASS | All server code consolidated (172 files) |
server/Ananta.App |
C# | PASS | Entry point + bootstrap (5 files) |
proxy/ |
TypeScript | Ready | package.json + tsconfig (awaiting migration) |
tools/ |
Python | Ready | pyproject.toml (awaiting migration) |
File Counts
- 16 Rust source files (3 crates)
- 177 C# source files (2 projects: Core + App)
- ~350 total new files
- 0 files deleted from old project
Architecture
ananta/ (workspace root)
|
|-- crates/ [RUST]
| |-- ananta-common/ Shared types (Vector3, GridCell, errors)
| |-- ananta-packet/ Packet codec (RC4, handshake, codec)
| `-- ananta-launcher/ TUI launcher (ratatui, process mgmt)
|
|-- server/ [C# .NET 8.0]
| |-- Ananta.Core/ All server logic (172 .cs files)
| | |-- Protocol/ (Messages, handshake, heartbeat)
| | |-- Serialization/ (SerializedClass base)
| | |-- Crypto/ (RC4, array pools)
| | |-- Config/Entries/ (34 JSON configs + loaders)
| | |-- Logging/ (Logger)
| | |-- Network/ (TCP server, Connection, sessions)
| | |-- Handlers/ (Login, Game, Systems, GmTool)
| | |-- Gameplay/ (Spirit, Vehicle, NPC, Metro, World)
| | |-- GmUi/ (GM web panel, 5 HTML panels)
| | `-- RpcTypes/ (Args + Return types)
| |
| `-- Ananta.App/ Entry point (Program.cs + bootstrap)
| `-- data/ (binary blobs)
|
|-- proxy/ [TypeScript - scaffold]
| |-- package.json
| `-- tsconfig.json
|
|-- tools/ [Python - scaffold]
| `-- pyproject.toml
|
|-- docs/ (documentation)
|-- ananta.toml (unified launcher config)
|-- Cargo.toml (Rust workspace)
|-- REFACTOR_MAP.md (original refactoring plan)
`-- README_MODULAR.md (this file)
What Was Done
- Cargo workspace with 3 crates (launcher, packet codec, common types)
- C# solution with 2 projects (Core + App) - consolidated from original 7-project plan due to tight coupling
- 172 .cs files copied from old monolith, organized by domain in subdirectories
- Rust launcher with TUI dashboard, process management, health checks, config via TOML
- Rust packet codec with RC4 cipher, packet encode/decode, handshake, heartbeat (7 tests passing)
- Proxy scaffold (TypeScript) with package.json and tsconfig
- Tools scaffold (Python) with pyproject.toml
- Unified config via
ananta.tomlat root
Design Decision: 2 Projects vs 7
The original plan called for 7 C# projects (Core, Network, Handlers, Gameplay, GmUi, RpcTypes, App).
However, the monolith has deep coupling: Connection.cs is referenced by ~90% of all files across
every domain. This creates circular dependencies when split into separate projects.
Solution: Consolidate into 2 projects while maintaining directory-level organization:
Ananta.Core= all server logic (organized in subdirectories by domain)Ananta.App= thin entry point
This preserves the logical separation and makes future splitting easier once interfaces are extracted.
Old Project
The original monolith at AnantaTestGameServer ka1.4 + hotfix/ is untouched and remains the
production server. Use it for running the server in production.
Quick Start
Rust
cargo build
cargo test # 7 tests passing
cargo run --bin ananta -- --help # launcher CLI
C# (new modular)
cd server/Ananta.App
dotnet build # 0 errors, 0 warnings
C# (old project - production)
cd "AnantaTestGameServer ka1.4 + hotfix"
start_server_fixed.bat