# frontrunx/aviator-predictor architecture

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

- Interactive diagram: https://gitdiagram.com/frontrunx/aviator-predictor
- Repository: https://github.com/frontrunx/aviator-predictor

## Overview

Despite the README’s predictor and betting claims, the tree and sampled implementation describe a SHA-family JavaScript library. Its runtime workflow is to accept a selected hash variant and formatted input, process streaming data through a family-specific hash implementation, and expose digest or HMAC output. The source also includes SHA-3-derived SHAKE, cSHAKE, and KMAC variants. No predictor, AI-summary, platform-integration, or game-data workflow is represented in the source tree; wiring beyond the sampled excerpts is omitted.

Main entry points: [`src/sha.ts`](https://github.com/frontrunx/aviator-predictor/blob/main/src/sha.ts) (SHA facade), [`src/common.ts`](https://github.com/frontrunx/aviator-predictor/blob/main/src/common.ts) (Hash state), [`src/sha1.ts`](https://github.com/frontrunx/aviator-predictor/blob/main/src/sha1.ts) (SHA-1), [`src/sha256.ts`](https://github.com/frontrunx/aviator-predictor/blob/main/src/sha256.ts) (SHA-224/256)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_facade["SHA facade<br/>[sha.ts]"]
end

subgraph group_hash["Hash Engines"]
  node_sha1["SHA-1<br/>[sha1.ts]"]
  node_sha256["SHA-224/256<br/>[sha256.ts]"]
  node_sha512["SHA-384/512<br/>[sha512.ts]"]
  node_sha3["SHA-3 family<br/>[sha3.ts]"]
end

subgraph group_shared["Shared Runtime"]
  node_base["Hash state<br/>[common.ts]"]
  node_convert["Format converters<br/>[converters.ts]"]
  node_primitives32["32-bit primitives<br/>[primitives_32.ts]"]
  node_primitives64["64-bit primitives<br/>[primitives_64.ts]"]
end

node_caller(("Library caller"))

node_caller -->|"selects variant"| node_facade
node_facade -->|"constructs"| node_sha1
node_facade -->|"constructs"| node_sha256
node_facade -->|"constructs"| node_sha512
node_facade -->|"constructs"| node_sha3
node_sha1 -->|"extends"| node_base
node_sha256 -->|"extends"| node_base
node_sha512 -->|"extends"| node_base
node_sha3 -->|"extends"| node_base
node_base -->|"converts input/output"| node_convert
node_sha1 -->|"converts input"| node_convert
node_sha256 -->|"converts input"| node_convert
node_sha512 -->|"converts input"| node_convert
node_sha1 -->|"uses operations"| node_primitives32
node_sha256 -->|"uses operations"| node_primitives32
node_sha512 -->|"uses operations"| node_primitives64
node_sha3 -->|"uses operations"| node_primitives64

click node_facade "https://github.com/frontrunx/aviator-predictor/blob/main/src/sha.ts"
click node_sha1 "https://github.com/frontrunx/aviator-predictor/blob/main/src/sha1.ts"
click node_sha256 "https://github.com/frontrunx/aviator-predictor/blob/main/src/sha256.ts"
click node_sha512 "https://github.com/frontrunx/aviator-predictor/blob/main/src/sha512.ts"
click node_sha3 "https://github.com/frontrunx/aviator-predictor/blob/main/src/sha3.ts"
click node_base "https://github.com/frontrunx/aviator-predictor/blob/main/src/common.ts"
click node_convert "https://github.com/frontrunx/aviator-predictor/blob/main/src/converters.ts"
click node_primitives32 "https://github.com/frontrunx/aviator-predictor/blob/main/src/primitives_32.ts"
click node_primitives64 "https://github.com/frontrunx/aviator-predictor/blob/main/src/primitives_64.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_facade toneBlue
class node_sha1,node_sha256,node_sha512,node_sha3 toneAmber
class node_base,node_convert,node_primitives32,node_primitives64 toneMint
class node_caller toneIndigo
```

## Components

### Public API

- [SHA facade](https://github.com/frontrunx/aviator-predictor/blob/main/src/sha.ts): `src/sha.ts`

### Hash Engines

- [SHA-1](https://github.com/frontrunx/aviator-predictor/blob/main/src/sha1.ts): `src/sha1.ts`
- [SHA-224/256](https://github.com/frontrunx/aviator-predictor/blob/main/src/sha256.ts): `src/sha256.ts`
- [SHA-384/512](https://github.com/frontrunx/aviator-predictor/blob/main/src/sha512.ts): `src/sha512.ts`
- [SHA-3 family](https://github.com/frontrunx/aviator-predictor/blob/main/src/sha3.ts): `src/sha3.ts`

### Shared Runtime

- [Hash state](https://github.com/frontrunx/aviator-predictor/blob/main/src/common.ts): `src/common.ts`
- [Format converters](https://github.com/frontrunx/aviator-predictor/blob/main/src/converters.ts): `src/converters.ts`
- [32-bit primitives](https://github.com/frontrunx/aviator-predictor/blob/main/src/primitives_32.ts): `src/primitives_32.ts`
- [64-bit primitives](https://github.com/frontrunx/aviator-predictor/blob/main/src/primitives_64.ts): `src/primitives_64.ts`

### Other components

- **Library caller**

## Connections

- Library caller → SHA facade: selects variant
- SHA facade → SHA-1: constructs
- SHA facade → SHA-224/256: constructs
- SHA facade → SHA-384/512: constructs
- SHA facade → SHA-3 family: constructs
- SHA-1 → Hash state: extends
- SHA-224/256 → Hash state: extends
- SHA-384/512 → Hash state: extends
- SHA-3 family → Hash state: extends
- Hash state → Format converters: converts input/output
- SHA-1 → Format converters: converts input
- SHA-224/256 → Format converters: converts input
- SHA-384/512 → Format converters: converts input
- SHA-1 → 32-bit primitives: uses operations
- SHA-224/256 → 32-bit primitives: uses operations
- SHA-384/512 → 64-bit primitives: uses operations
- SHA-3 family → 64-bit primitives: uses operations
