Skip to main content

Project Structure

NDM follows a clean and modular structure to keep commands, utilities, and tests well‑organized.

The Folders

.github/
src/
├─ commands/
│ ├─ check.ts
│ ├─ info.ts
│ ├─ analyze.ts
│ └─ ...
├─ utils/
│ ├─ banner.ts
│ ├─ config.ts
│ └─ checks/
│ ├─ calcHealthScore.ts
│ ├─ calculateRiskScore.ts
│ └─ ...
└─ index.ts
test/
├─ example.test.ts
└─ utils/
├─ checks.test.ts
├─ checks2.test.ts
└─ ...

Folder Overview

  • .github/ CI pipelines, security audits, workflows, issue templates
  • src/commands/ All CLI commands (check, analyze, info, …)
  • src/utils/ Shared utilities used across commands
  • src/utils/checks/ All checks and scoring logic fot the check command
  • test/ Vitest test suite
  • test/utils/ Unit tests for utility and scoring functions

This structure ensures that commands remain lightweight while complex logic stays isolated and testable.