repowiseshinkuan/akagi

Architecture of shinkuan/akagi

shinkuan/akagi is 352 source files holding 4,996 symbols across 8 modules, written mainly in Rust, TypeScript, Luau. The largest module is src, with 151 files, and 7 files are entry points into the dependency graph.

How akagi fits together

Game traffic enters through the MITM proxy or through frames the Chromium window intercepts over the Chrome DevTools Protocol. src/event_bus.rs defines the channel types that subsystems use, and src/lib.rs wires those buses at boot, so each subsystem holds only its own bus handles. The built-in bot's entry point is native_bot/src/lib.rs, which provides a decision each turn that the frontend/src/main.tsx app shows in the HUD through push events such as bot-response. With AutoPlay enabled, src/autoplay/majsoul/mod.rs carries out the bot's decisions in the game client. Bots installed from GitHub or a ZIP are extracted under mjai_bot, where bot.py is validated before use.

Largest modules

  • src: 151 files and 47,959 lines of code
  • frontend: 142 files and 18,748 lines of code
  • native_bot: 20 files and 2,605 lines of code
  • tests: 11 files and 1,559 lines of code
  • assets: 7 files and 1,027 lines of code
  • root: 6 files and 1,765 lines of code
  • mjai_bot: 5 files and 1,048 lines of code
  • .github: 4 files and 646 lines of code

Languages

By file count: Rust 157 files, TypeScript 127 files, Luau 6 files, Python 4 files, Shell 2 files, JavaScript 1 file.

Documentation

Repowise documents akagi in 507 pages generated from the source.

More on akagi: summary and FAQ, codebase overview, code health.

Related guide: Best dependency graph tools for monorepos