# scalvert/bintastic architecture

> Architecture diagram of the GitHub repository scalvert/bintastic, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/scalvert/bintastic
- Repository: https://github.com/scalvert/bintastic

## Overview

bintastic is a Node.js CLI testing harness. A test author configures the harness, creates a temporary project for fixture files, runs the configured CLI as a subprocess, inspects its captured result, and tears the project down. The package also provides JSON and dedented-text template helpers, plus project conveniences such as Git initialization and changing into the project directory. The graph reflects the sampled implementation and README workflow; unsampled details of subprocess options and fixture storage are not expanded.

Main entry points: [`src/create-bintastic.ts`](https://github.com/scalvert/bintastic/blob/main/src/create-bintastic.ts) (Harness Lifecycle), [`src/index.ts`](https://github.com/scalvert/bintastic/blob/main/src/index.ts) (Package Exports), [`src/project.ts`](https://github.com/scalvert/bintastic/blob/main/src/project.ts) (Temporary Project), [`src/json.ts`](https://github.com/scalvert/bintastic/blob/main/src/json.ts) (JSON Templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_exports["Package Exports<br/>[index.ts]"]
end

subgraph group_harness["Test Harness"]
  node_harness_api["Harness Lifecycle"]
  node_project["Temporary Project<br/>[project.ts]"]
  node_cli_process["CLI Subprocess"]
end

subgraph group_authoring["Fixture Authoring"]
  node_json_template["JSON Templates<br/>[json.ts]"]
  node_text_template["Text Templates<br/>[text.ts]"]
end

node_test_author(("Test Author"))

node_test_author -->|"uses API"| node_exports
node_exports -->|"exports"| node_harness_api
node_exports -->|"exports"| node_json_template
node_exports -->|"exports"| node_text_template
node_harness_api -->|"creates and writes"| node_project
node_harness_api -->|"disposes"| node_project
node_harness_api -->|"spawns CLI"| node_cli_process
node_project -->|"provides fixture workspace"| node_test_author
node_cli_process -->|"returns captured result"| node_harness_api

click node_exports "https://github.com/scalvert/bintastic/blob/main/src/index.ts"
click node_harness_api "https://github.com/scalvert/bintastic/blob/main/src/create-bintastic.ts"
click node_project "https://github.com/scalvert/bintastic/blob/main/src/project.ts"
click node_json_template "https://github.com/scalvert/bintastic/blob/main/src/json.ts"
click node_text_template "https://github.com/scalvert/bintastic/blob/main/src/text.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_exports toneBlue
class node_harness_api,node_project,node_cli_process toneAmber
class node_json_template,node_text_template toneMint
class node_test_author toneIndigo
```

## Components

### Public API

- [Package Exports](https://github.com/scalvert/bintastic/blob/main/src/index.ts): `src/index.ts`

### Test Harness

- [Harness Lifecycle](https://github.com/scalvert/bintastic/blob/main/src/create-bintastic.ts): `src/create-bintastic.ts`
- [Temporary Project](https://github.com/scalvert/bintastic/blob/main/src/project.ts): `src/project.ts`
- **CLI Subprocess**

### Fixture Authoring

- [JSON Templates](https://github.com/scalvert/bintastic/blob/main/src/json.ts): `src/json.ts`
- [Text Templates](https://github.com/scalvert/bintastic/blob/main/src/text.ts): `src/text.ts`

### Other components

- **Test Author**

## Connections

- Test Author → Package Exports: uses API (evidence: `README.md`)
- Package Exports → Harness Lifecycle: exports (evidence: `src/index.ts`)
- Package Exports → JSON Templates: exports (evidence: `src/index.ts`)
- Package Exports → Text Templates: exports (evidence: `src/index.ts`)
- Harness Lifecycle → Temporary Project: creates and writes (evidence: `src/create-bintastic.ts`)
- Harness Lifecycle → Temporary Project: disposes (evidence: `src/create-bintastic.ts`)
- Harness Lifecycle → CLI Subprocess: spawns CLI (evidence: `src/create-bintastic.ts`)
- Temporary Project → Test Author: provides fixture workspace (evidence: `README.md`)
- CLI Subprocess → Harness Lifecycle: returns captured result (evidence: `src/create-bintastic.ts`)
