Node.js + Angular

Lachesis

The Measurer of the Thread

Lachesis is a dashboard for tracking compliance over time. It ingests JSON reports from Clotho, stores them in MariaDB, and shows pretty graphs. It calculates entropy, stability, and MTBF (Mean Time Between Failures) to tell you when systems are "fraying" - drifting from baseline.

In Greek mythology, Lachesis measured the thread of life, determining how long it would last. This Lachesis measures system health - how long until the next compliance breach.

Architecture

API Server

Express.js backend on port 6380. TypeORM with MariaDB for persistence.

Dashboard

Angular 17 SPA on port 4200. Real-time charts and node timelines.

Installation

Database Setup

sudo mariadb -e "
  CREATE DATABASE monitor;
  CREATE USER 'lachesis'@'localhost' IDENTIFIED BY 'changeme';
  GRANT ALL ON monitor.* TO 'lachesis'@'localhost';
"

Tables auto-create on first run via TypeORM migrations.

API Server

cd api
npm install
npm run dev  # Port 6380

Dashboard

cd dashboard
npm install
npm start  # Port 4200

Key Metrics

Entropy
Weighted score of failed controls. Higher = worse. 0.0 is perfect compliance, 1.0 is total failure.
Stability
Time since last failure divided by total uptime. Higher = more stable.
MTBF
Mean Time Between Fray events. Average time between compliance breaches.

Data Flow

  1. Clotho runs audit → Generates JSON report
  2. Report ingestedPOST /api/ingest
  3. Lachesis stores → Findings saved to MariaDB
  4. Entropy calculated → Based on failed control weights
  5. Threshold check → If entropy > threshold, webhook to Atropos

Integration with Atropos

When entropy exceeds a configured threshold, Lachesis can send a webhook to Atropos:

{
  "node": "athena",
  "entropy": 0.87,
  "timestamp": "2026-01-18T00:15:00Z"
}

Atropos will then select the appropriate remediation strategy based on the entropy level.