Skip to content

Latest commit

 

History

History
162 lines (127 loc) · 5.09 KB

File metadata and controls

162 lines (127 loc) · 5.09 KB

IDApTIK — LLM Context (Developer)

Identity

IDApTIK — Asymmetric co-op stealth puzzle-platformer + educational network simulation. Browser-based. License: AGPL-3.0-or-later. Author: Jonathan D.A. Jewell. LIVE repo (not staging).

Tech Stack

Component Technology
Primary language ReScript 12.2.0 (~542 .res files)
Runtime Deno 2.0+ (NOT npm/node/bun)
Rendering PixiJS 8.8.1 (2D WebGL)
Build tool Vite 6.2.0
Module system esmodule (in-source, .res.mjs)
Multiplayer Elixir/Phoenix (port 4030)
Escape hatch Rust + ratatui (TUI)
Modding studio Tauri 2 + Zig FFI + Idris2 ABI
Audio @pixi/sound
Animation motion (tweening)
Assets AssetPack (raw-assets/ -> public/assets/)
Testing tools Julia (balance, security, load, soak)

Entry Point Flow

  1. Main.res creates Engine instance
  2. Engine initializes PixiJS Application, loads assets
  3. LoadScreen -> WorldScreen
  4. Player navigates platformer, interacts with devices

Source Layout

src/
  Main.res              Entry point
  app/
    combat/             Combat mechanics
    companions/         Moletaire etc.
    devices/            Network device simulations
    enemies/            Enemy AI, guards
    multiplayer/        Client-side multiplayer
    narrative/          Story, dialogue
    pickups/            Collectibles
    player/             Physics, input, graphics
    popups/             Modal overlays
    proven/             Formal verification
    screens/            Game screens (navigation targets)
    tools/              In-game tools
    ui/                 Button, Label, RoundedBox
    utils/              KeyboardNav, UserSettings
  engine/               Core engine
  bindings/             JS FFI (Pixi, Sound, UI, Motion)

VM Architecture (vm/)

23 instructions (Tier 0-4). Stack, memory, subroutines, I/O ports. ALL operations reversible. Source: vm/lib/ocaml/*.res (NOT build artifacts). Compiled output: vm/src/core/*.res.mjs. WASM backend: vm/wasm/ (Zig, 41M ops/sec, 407KB).

Shared Modules (shared/)

224 modules, 640+ tests. Cross-component types and utilities. Tests: shared/tests/ (422 ReScript + Deno tests).

Key Patterns

  • Screen navigation: Lifecycle (prepare, show, hide, pause, resume, update, resize). Stack-based with asset preloading.
  • Device system: DeviceTypes.device interface, DeviceFactory.res, security levels (Open/Weak/Medium/Strong).
  • Network: Star topology, DNS, traceroute, SSH, zone-based (LAN/VLAN/External).
  • State: Functional immutable records. LocalStorage for persistence.
  • Multiplayer: PhoenixSocket V2, terminal co-op, VMMessageBus.

ReScript Conventions (CRITICAL)

  • Config: rescript.json (v13-clean, -open RescriptCore)
  • @rescript/core 1.6.1
  • BANNED: All Js.* APIs (fully migrated), all Belt.* APIs
  • Use: Dict.*, Array.*, String.*, Math.*, Console.*, Float.*, Int.*
  • JSON parse: JSON.parseExn + JSON.Classify.classify (returns variant, NOT option)
  • JSON encode: JSON.Encode.string, JSON.stringifyAny
  • FFI bindings in src/bindings/

Subsystems

Sync Server (sync-server/)

Elixir/Phoenix. Port 4030. 6/6 connectivity tests pass. Config: sync-server/config/. Start: deno task sync-server.

UMS (idaptik-ums/)

Tauri 2 shell (Rust). Zig FFI (ffi/zig/, 20 tests). Idris2 ABI definitions.

Escape Hatch (escape-hatch/)

Rust + ratatui TUI. 5 tabs. Podman integration.

DLC (dlc/)

Downloadable content / puzzle packs.

Developer Portal (idaptik-developers/)

17 ADRs, white paper, academic paper.

Commands

# Core
just dev / build / lint / clean
deno task dev / build / res:build / res:dev / res:clean

# Tests
just test / test-shared / test-vm / test-deno / validate / count

# UMS
just ums-build / ums-test / ums-gossamer

# Security
just test-security / security-audit / assail

# Julia toolkit
just balance / test-functional / test-regression / test-performance
just test-load-julia / test-soak / test-security-julia / test-all-tools

# Containers
just containers-build / containers-up / containers-down
just containers-staging / containers-prod / containers-health

# Compat
just test-compat / test-compat-chromium / test-compat-firefox

# Onboarding
just doctor / heal / tour / help-me

Machine-Readable State

.machine_readable/6a2/STATE.a2ml (A2ML format). Tracks component completion, migration status, critical actions.

File Map

Path What
deno.json Dependencies, tasks, imports
rescript.json ReScript compiler config
src/Main.res Game entry point
src/app/ All game logic
src/engine/ Core engine
src/bindings/ PixiJS/sound FFI
vm/lib/ocaml/ VM source (ReScript)
vm/wasm/ Zig WASM backend
shared/ Cross-component modules (224)
sync-server/ Elixir multiplayer
idaptik-ums/ Unified Modding Studio
escape-hatch/ Rust TUI
dlc/ DLC packs
tools/ Julia testing toolkit
raw-assets/ Source assets
CLAUDE.md Full AI instructions
0-AI-MANIFEST.a2ml Universal AI entry point