TARAflow
Developers / 01

Architecture

TARAflow is an Electron desktop application with a React/TypeScript frontend. The codebase is organized into feature modules with strict import boundaries.

01

Stack

  • Electron (main process) — native OS integration, keytar for credential storage, file I/O, git, tracker requests
  • React 18 + TypeScript — UI, MUI and MUI DataGrid, Tailwind, draw.io iFrame integration
  • Vitest — unit, component and integration tests (the integration suite needs a real git binary)
  • i18next — runtime i18n with EN/DE namespaces
  • draw.io (diagrams.net) — embedded as iFrame for DFD editing
02

Feature Boundaries

Every feature is a full vertical slice — no feature may depend on another feature, not just the DFD/Threats pair. Anything needed across features lives in shared instead.

  • features/overview — project data, item / system definition, methodology view, source bindings
  • features/hazards — hazard items, Bowtie, import
  • features/dfd — DFD modeling, draw.io bridge, graph builder, leveled DFDs, asset graph
  • features/assets — asset model, CIANAAA, impact criteria
  • features/threats — STRIDE generation (per element, per interaction), threat and mitigation catalog
  • features/attacktree — DSL, calculator, attack-path threat generator
  • features/risks — risk register, likelihood methods, matrix, goals & claims
  • features/compliance — requirement matrices (IEC 62443-4-2 editions, EN 50742 A)
  • features/documentation — the generator engine covered in CLI Report Generator
  • features/audit — git commit flow, signer manifest, Audit Verification Engine
  • features/integration — issue-tracker adapters
  • shared — all types and utilities used across features (DFDElementReference, StrideCategory, regulation presets, etc.)
  • app — the composition layer: the workspace, cross-feature bridges (e.g. attack tree → risk likelihood) and schema migrations
  • Rule: no features/* module may import from another features/* module — only from shared
03

Main process vs. Renderer process

Electron's two-process model maps directly onto two top-level folders:

Main process

electron/

Native OS integration, file I/O, keytar credential storage, IPC handlers — everything that needs Node/OS access.

Renderer process

src/

The React/TypeScript UI, feature modules, shared types — everything that runs in the Chromium window.