# sdqfrmnsyh/mokted architecture

> Architecture diagram of the GitHub repository sdqfrmnsyh/mokted, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sdqfrmnsyh/mokted
- Repository: https://github.com/sdqfrmnsyh/mokted

## Overview

Mokted runs the Android x86_64 Roblox client on Linux by supplying Android ABI/JNI compatibility and connecting the guest runtime to SDL and host graphics, audio, and input. The main user workflow is to start the app, prepare its runtime and bridges, load the Roblox client, and run an experience; a separate updater verifies and manages client payloads. The graph also preserves documented graphics, device-input, audio, and tuning capabilities. Several subsystem links are omitted because their implementation was not sampled; paths and cited links rely on the tree, README, and SOURCE INDEX evidence.

Main entry points: [`src/legacy/legacy_runtime.cc`](https://github.com/sdqfrmnsyh/mokted/blob/main/src/legacy/legacy_runtime.cc) (Client runtime), [`src/main.cc`](https://github.com/sdqfrmnsyh/mokted/blob/main/src/main.cc) (App startup), [`src/window/window.cc`](https://github.com/sdqfrmnsyh/mokted/blob/main/src/window/window.cc) (SDL window), [`src/platform/sdl_platform_runtime.cc`](https://github.com/sdqfrmnsyh/mokted/blob/main/src/platform/sdl_platform_runtime.cc) (SDL platform)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch and sessions"]
  node_entry["App startup<br/>[main.cc]"]
  node_legacy["Client runtime<br/>[legacy_runtime.cc]"]
  node_session["Experience sessions"]
  node_experience["Experience launch bridge"]
end

subgraph group_compat["Android compatibility"]
  node_jni["JNI runtime<br/>[jnivm.cc]"]
  node_linker["Android linker<br/>[linker.cc]"]
  node_libc["Libc shim<br/>[libc_shim.cc]"]
  node_bionic["Bionic ABI"]
end

subgraph group_host["Host interaction"]
  node_window["SDL window<br/>[window.cc]"]
  node_platform["SDL platform"]
  node_input["Input routing"]
  node_gamepad["Gamepad manager"]
  node_graphics["Vulkan and GL"]
  node_audio["Audio bridges"]
end

subgraph group_services["Services and updates"]
  node_settings["Client settings"]
  node_auth["Authentication<br/>[auth_service.cc]"]
  node_http["HTTP client<br/>[http_client.cc]"]
  node_updater["Update command<br/>[main.cc]"]
  node_payload[("Payload store<br/>[payload_store.cc]")]
  node_provider["APK provider"]
end

node_user(("Player"))
node_hostos(("Linux host"))
node_roblox["Roblox client"]
node_discord["Discord Desktop"]

node_user -->|"starts"| node_entry
node_entry -->|"runs client"| node_legacy
node_legacy -->|"uses JNI"| node_jni
node_legacy -->|"loads guest"| node_linker
node_legacy -->|"uses shim"| node_libc
node_legacy -->|"exports ABI"| node_bionic
node_entry -->|"composes launch"| node_session
node_session -->|"launches experience"| node_experience
node_legacy -->|"loads client"| node_roblox
node_entry -->|"sets up host"| node_window
node_window -.->|"uses SDL"| node_platform
node_input -->|"consumes events"| node_platform
node_gamepad -->|"handles events"| node_platform
node_window -->|"presents frames"| node_graphics
node_legacy -->|"installs bridges"| node_audio
node_legacy -.->|"loads settings"| node_settings
node_auth -->|"sends requests"| node_http
node_settings -->|"fetches settings"| node_http
node_updater -->|"verifies payload"| node_payload
node_updater -->|"checks latest"| node_provider
node_entry -->|"uses host"| node_hostos
node_graphics -->|"uses drivers"| node_hostos
node_audio -.->|"uses audio"| node_hostos
node_entry -.->|"publishes presence"| node_discord

click node_entry "https://github.com/sdqfrmnsyh/mokted/blob/main/src/main.cc"
click node_legacy "https://github.com/sdqfrmnsyh/mokted/blob/main/src/legacy/legacy_runtime.cc"
click node_session "https://github.com/sdqfrmnsyh/mokted/blob/main/src/runtime/roblox_fresh_game_launch_controller.cc"
click node_jni "https://github.com/sdqfrmnsyh/mokted/blob/main/src/jnivm/jnivm.cc"
click node_linker "https://github.com/sdqfrmnsyh/mokted/blob/main/src/linker/linker.cc"
click node_libc "https://github.com/sdqfrmnsyh/mokted/blob/main/src/libc_shim/libc_shim.cc"
click node_bionic "https://github.com/sdqfrmnsyh/mokted/blob/main/src/compat/bionic_abi_exports.cc"
click node_window "https://github.com/sdqfrmnsyh/mokted/blob/main/src/window/window.cc"
click node_platform "https://github.com/sdqfrmnsyh/mokted/blob/main/src/platform/sdl_platform_runtime.cc"
click node_input "https://github.com/sdqfrmnsyh/mokted/blob/main/src/runtime/roblox_input_router.cc"
click node_gamepad "https://github.com/sdqfrmnsyh/mokted/blob/main/src/platform/sdl_gamepad_manager.cc"
click node_graphics "https://github.com/sdqfrmnsyh/mokted/blob/main/src/graphics/bionic_vulkan_loader_adapter.cc"
click node_audio "https://github.com/sdqfrmnsyh/mokted/blob/main/src/audio/fmod_jni_audio_bridge.cc"
click node_settings "https://github.com/sdqfrmnsyh/mokted/blob/main/src/services/client_settings_service.cc"
click node_auth "https://github.com/sdqfrmnsyh/mokted/blob/main/src/services/auth_service.cc"
click node_http "https://github.com/sdqfrmnsyh/mokted/blob/main/src/services/http_client.cc"
click node_updater "https://github.com/sdqfrmnsyh/mokted/blob/main/src/update/main.cc"
click node_payload "https://github.com/sdqfrmnsyh/mokted/blob/main/src/update/payload_store.cc"
click node_provider "https://github.com/sdqfrmnsyh/mokted/blob/main/src/update/apkpure_provider.cc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_legacy,node_session,node_experience,node_roblox toneBlue
class node_jni,node_linker,node_libc,node_bionic toneAmber
class node_window,node_platform,node_input,node_gamepad,node_graphics,node_audio toneMint
class node_settings,node_auth,node_http,node_updater,node_payload,node_provider toneRose
class node_user,node_hostos,node_discord toneIndigo
```

## Components

### Launch and sessions

- [App startup](https://github.com/sdqfrmnsyh/mokted/blob/main/src/main.cc): `src/main.cc`
- [Client runtime](https://github.com/sdqfrmnsyh/mokted/blob/main/src/legacy/legacy_runtime.cc): `src/legacy/legacy_runtime.cc`
- [Experience sessions](https://github.com/sdqfrmnsyh/mokted/blob/main/src/runtime/roblox_fresh_game_launch_controller.cc): `src/runtime/roblox_fresh_game_launch_controller.cc`
- **Experience launch bridge**

### Android compatibility

- [JNI runtime](https://github.com/sdqfrmnsyh/mokted/blob/main/src/jnivm/jnivm.cc): `src/jnivm/jnivm.cc`
- [Android linker](https://github.com/sdqfrmnsyh/mokted/blob/main/src/linker/linker.cc): `src/linker/linker.cc`
- [Libc shim](https://github.com/sdqfrmnsyh/mokted/blob/main/src/libc_shim/libc_shim.cc): `src/libc_shim/libc_shim.cc`
- [Bionic ABI](https://github.com/sdqfrmnsyh/mokted/blob/main/src/compat/bionic_abi_exports.cc): `src/compat/bionic_abi_exports.cc`

### Host interaction

- [SDL window](https://github.com/sdqfrmnsyh/mokted/blob/main/src/window/window.cc): `src/window/window.cc`
- [SDL platform](https://github.com/sdqfrmnsyh/mokted/blob/main/src/platform/sdl_platform_runtime.cc): `src/platform/sdl_platform_runtime.cc`
- [Input routing](https://github.com/sdqfrmnsyh/mokted/blob/main/src/runtime/roblox_input_router.cc): `src/runtime/roblox_input_router.cc`
- [Gamepad manager](https://github.com/sdqfrmnsyh/mokted/blob/main/src/platform/sdl_gamepad_manager.cc): `src/platform/sdl_gamepad_manager.cc`
- [Vulkan and GL](https://github.com/sdqfrmnsyh/mokted/blob/main/src/graphics/bionic_vulkan_loader_adapter.cc): `src/graphics/bionic_vulkan_loader_adapter.cc`
- [Audio bridges](https://github.com/sdqfrmnsyh/mokted/blob/main/src/audio/fmod_jni_audio_bridge.cc): `src/audio/fmod_jni_audio_bridge.cc`

### Services and updates

- [Client settings](https://github.com/sdqfrmnsyh/mokted/blob/main/src/services/client_settings_service.cc): `src/services/client_settings_service.cc`
- [Authentication](https://github.com/sdqfrmnsyh/mokted/blob/main/src/services/auth_service.cc): `src/services/auth_service.cc`
- [HTTP client](https://github.com/sdqfrmnsyh/mokted/blob/main/src/services/http_client.cc): `src/services/http_client.cc`
- [Update command](https://github.com/sdqfrmnsyh/mokted/blob/main/src/update/main.cc): `src/update/main.cc`
- [Payload store](https://github.com/sdqfrmnsyh/mokted/blob/main/src/update/payload_store.cc): `src/update/payload_store.cc`
- [APK provider](https://github.com/sdqfrmnsyh/mokted/blob/main/src/update/apkpure_provider.cc): `src/update/apkpure_provider.cc`

### Other components

- **Player**
- **Linux host**
- **Roblox client**
- **Discord Desktop**

## Connections

- Player → App startup: starts
- App startup → Client runtime: runs client (evidence: `src/main.cc`)
- Client runtime → JNI runtime: uses JNI (evidence: `src/legacy/legacy_runtime.cc`)
- Client runtime → Android linker: loads guest (evidence: `src/legacy/legacy_runtime.cc`)
- Client runtime → Libc shim: uses shim (evidence: `src/legacy/legacy_runtime.cc`)
- Client runtime → Bionic ABI: exports ABI (evidence: `src/legacy/legacy_runtime.cc`)
- App startup → Experience sessions: composes launch (evidence: `src/main.cc`)
- Experience sessions → Experience launch bridge: launches experience
- Client runtime → Roblox client: loads client (evidence: `src/legacy/legacy_runtime.cc`)
- App startup → SDL window: sets up host (evidence: `src/main.cc`)
- SDL window → SDL platform: uses SDL
- Input routing → SDL platform: consumes events
- Gamepad manager → SDL platform: handles events
- SDL window → Vulkan and GL: presents frames (evidence: `src/window/window.cc`)
- Client runtime → Audio bridges: installs bridges
- Client runtime → Client settings: loads settings
- Authentication → HTTP client: sends requests
- Client settings → HTTP client: fetches settings
- Update command → Payload store: verifies payload (evidence: `src/update/main.cc`)
- Update command → APK provider: checks latest (evidence: `src/update/main.cc`)
- App startup → Linux host: uses host
- Vulkan and GL → Linux host: uses drivers
- Audio bridges → Linux host: uses audio
- App startup → Discord Desktop: publishes presence
