# sky0427-coduck/astra architecture

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

- Interactive diagram: https://gitdiagram.com/sky0427-coduck/astra
- Repository: https://github.com/sky0427-coduck/astra

## Overview

Astra is a command-line SIMD vector and matrix analysis tool. Its principal workflow starts with a user selecting the `simd` command, CSV input, and operation; the CLI dispatches to Tesseract, which reads and parses the input, converts data into AoSoA batches, invokes a vector or matrix kernel, and prints a timing report. The repository also exposes terminal styling and engine information, and contains a 3D renderer and platform-specific assembly. Assembly dispatch and renderer wiring are not established by the sampled excerpts, so those links are omitted or marked unverified.

Main entry points: [`src/tesseract/tesseract.cpp`](https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp) (CSV analyzer), [`main.cpp`](https://github.com/sky0427-coduck/astra/blob/main/main.cpp) (Command dispatcher), [`include/tesseract.hpp`](https://github.com/sky0427-coduck/astra/blob/main/include/tesseract.hpp) (SIMD API and layouts), [`include/prettycli.hpp`](https://github.com/sky0427-coduck/astra/blob/main/include/prettycli.hpp) (Terminal UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and terminal"]
  node_entry["Command dispatcher<br/>[main.cpp]"]
  node_terminal["Terminal UI<br/>[prettycli.hpp]"]
  node_engine_info["Engine info<br/>[main.cpp]"]
end

subgraph group_analysis["SIMD analysis"]
  node_analyzer["CSV analyzer<br/>[tesseract.cpp]"]
  node_csv_input["CSV input"]
  node_batch_layout["AoSoA conversion<br/>[tesseract.cpp]"]
  node_vector_ops["Vector operations<br/>[tesseract.cpp]"]
  node_matrix_ops["Matrix operations<br/>[tesseract.cpp]"]
  node_report["Timing report<br/>[tesseract.cpp]"]
end

subgraph group_kernels["Compute and rendering"]
  node_simd_api["SIMD API and layouts<br/>[tesseract.hpp]"]
  node_x86_kernels["x86-64 kernels"]
  node_arm_kernels["ARM64 kernels"]
  node_renderer["3D renderer<br/>[3Drenderer.cpp]"]
  node_renderer_x86["x86-64 renderer"]
  node_renderer_arm["ARM64 renderer"]
end

node_user(("CLI user"))

node_user -->|"runs command"| node_entry
node_entry -->|"initializes and draws"| node_terminal
node_entry -->|"routes info"| node_engine_info
node_entry -->|"dispatches SIMD"| node_analyzer
node_analyzer -->|"reads CSV"| node_csv_input
node_analyzer -->|"converts batches"| node_batch_layout
node_analyzer -->|"dispatches vector"| node_vector_ops
node_analyzer -->|"dispatches matrix"| node_matrix_ops
node_analyzer -->|"prints timings"| node_report
node_vector_ops -->|"uses declared API"| node_simd_api
node_matrix_ops -->|"uses declared API"| node_simd_api
node_simd_api -.-> node_x86_kernels
node_simd_api -.-> node_arm_kernels

click node_entry "https://github.com/sky0427-coduck/astra/blob/main/main.cpp"
click node_terminal "https://github.com/sky0427-coduck/astra/blob/main/include/prettycli.hpp"
click node_engine_info "https://github.com/sky0427-coduck/astra/blob/main/main.cpp"
click node_analyzer "https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp"
click node_batch_layout "https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp"
click node_vector_ops "https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp"
click node_matrix_ops "https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp"
click node_report "https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp"
click node_simd_api "https://github.com/sky0427-coduck/astra/blob/main/include/tesseract.hpp"
click node_x86_kernels "https://github.com/sky0427-coduck/astra/tree/main/src/tesseract"
click node_arm_kernels "https://github.com/sky0427-coduck/astra/tree/main/src/tesseract/arm64"
click node_renderer "https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/3Drenderer.cpp"
click node_renderer_x86 "https://github.com/sky0427-coduck/astra/tree/main/src/tesseract"
click node_renderer_arm "https://github.com/sky0427-coduck/astra/tree/main/src/tesseract/arm64"

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_entry,node_terminal,node_engine_info,node_user toneBlue
class node_analyzer,node_csv_input,node_batch_layout,node_vector_ops,node_matrix_ops,node_report toneAmber
class node_simd_api,node_x86_kernels,node_arm_kernels,node_renderer,node_renderer_x86,node_renderer_arm toneMint
```

## Components

### CLI and terminal

- [Command dispatcher](https://github.com/sky0427-coduck/astra/blob/main/main.cpp): `main.cpp`
- [Terminal UI](https://github.com/sky0427-coduck/astra/blob/main/include/prettycli.hpp): `include/prettycli.hpp`
- [Engine info](https://github.com/sky0427-coduck/astra/blob/main/main.cpp): `main.cpp`

### SIMD analysis

- [CSV analyzer](https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp): `src/tesseract/tesseract.cpp`
- **CSV input**
- [AoSoA conversion](https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp): `src/tesseract/tesseract.cpp`
- [Vector operations](https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp): `src/tesseract/tesseract.cpp`
- [Matrix operations](https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp): `src/tesseract/tesseract.cpp`
- [Timing report](https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/tesseract.cpp): `src/tesseract/tesseract.cpp`

### Compute and rendering

- [SIMD API and layouts](https://github.com/sky0427-coduck/astra/blob/main/include/tesseract.hpp): `include/tesseract.hpp`
- [x86-64 kernels](https://github.com/sky0427-coduck/astra/tree/main/src/tesseract): `src/tesseract`
- [ARM64 kernels](https://github.com/sky0427-coduck/astra/tree/main/src/tesseract/arm64): `src/tesseract/arm64`
- [3D renderer](https://github.com/sky0427-coduck/astra/blob/main/src/tesseract/3Drenderer.cpp): `src/tesseract/3Drenderer.cpp`
- [x86-64 renderer](https://github.com/sky0427-coduck/astra/tree/main/src/tesseract): `src/tesseract`
- [ARM64 renderer](https://github.com/sky0427-coduck/astra/tree/main/src/tesseract/arm64): `src/tesseract/arm64`

### Other components

- **CLI user**

## Connections

- CLI user → Command dispatcher: runs command (evidence: `main.cpp`)
- Command dispatcher → Terminal UI: initializes and draws (evidence: `main.cpp`)
- Command dispatcher → Engine info: routes info (evidence: `main.cpp`)
- Command dispatcher → CSV analyzer: dispatches SIMD (evidence: `main.cpp`)
- CSV analyzer → CSV input: reads CSV (evidence: `src/tesseract/tesseract.cpp`)
- CSV analyzer → AoSoA conversion: converts batches (evidence: `src/tesseract/tesseract.cpp`)
- CSV analyzer → Vector operations: dispatches vector (evidence: `src/tesseract/tesseract.cpp`)
- CSV analyzer → Matrix operations: dispatches matrix (evidence: `src/tesseract/tesseract.cpp`)
- CSV analyzer → Timing report: prints timings (evidence: `src/tesseract/tesseract.cpp`)
- Vector operations → SIMD API and layouts: uses declared API (evidence: `include/tesseract.hpp`)
- Matrix operations → SIMD API and layouts: uses declared API (evidence: `include/tesseract.hpp`)
- SIMD API and layouts → x86-64 kernels (evidence: `src/tesseract/tesseract.cpp`)
- SIMD API and layouts → ARM64 kernels
