← Back to Damru Overview
03 / DAMRU SUITE ARCHITECTURE

Modules

Damru is organized into modular components across Rust, TypeScript, Node.js, and Python—each focused on one job: diagnosing environments, running experiments, toggling flags, or surfacing live state in your editor.

MODULE 01 — RUST CLI

Damru CLI & TypeScript Verifier

The core CLI binary lives in damru/src/main.rs ↗ and damru/src/lib.rs ↗, built with Clap for subcommand parsing and Tokio/parallel execution for fast diagnostics. Interactive terminal status rendering lives in damru/src/tui.rs ↗, while typed failure modes are centralized in damru/src/error.rs ↗.

Alongside the Rust binary, damru/ts-verify/src/index.ts ↗ and damru/ts-verify/src/cli.ts ↗ provide a TypeScript verification harness tested via damru/ts-verify/test.js ↗.

MODULE 02 — PLUGIN 1

Experimentation Workbench & Web Server

Plugin 1 is a zero-dependency Node.js HTTP server (plugin-1/server.js ↗) paired with plugin-1/flagsmith-experiment-plugin.js ↗. It serves the Damru showcase UI, the live A/B signup workbench, SSE telemetry, and the /embed widget.

It is packaged for container deployment with plugin-1/Dockerfile ↗ and deployed on Fly.io via plugin-1/fly.toml ↗, with automated tests in plugin-1/test.js ↗ and plugin-1/security_test.js ↗.

MODULE 03 — PLUGIN 3

Terminal Dashboard & Flagsmith API Server

Written in Python (plugin-3/flagsmith_cli_plugin.py ↗), Plugin 3 provides both a terminal CLI to inspect/toggle/export Flagsmith flags across development and production environments and a built-in Flagsmith-compatible HTTP mock server (--serve --port 8000) for offline development.

It includes Docker Compose orchestration in plugin-3/docker-compose.yml ↗ and test suites in plugin-3/test_plugin3_cli.py ↗ and plugin-3/test_real_api_fallback.py ↗.

MODULE 04 — EDITOR EXTENSION

VS Code Inline Flag Inspector

The VS Code extension in plugin-3/vscode-flagsmith-inline/extension.js ↗ (manifest plugin-3/vscode-flagsmith-inline/package.json ↗) scans open source files for Flagsmith SDK calls and renders live flag values and enabled/disabled states inline above the call site, backed by tests in plugin-3/vscode-flagsmith-inline/test.js ↗.