# cybercyphers/decifer architecture

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

- Interactive diagram: https://gitdiagram.com/cybercyphers/decifer
- Repository: https://github.com/cybercyphers/decifer

## Overview

DECIFER is an ES-module developer toolkit centered on loading a ready-to-use matrix of binary, media, and YouTube utilities. The main workflow is: a developer calls loadEntries(), the package restores expected directories and provisions required binaries, then returns the matrix class for use. Its domain stages include YouTube downloading (with documented output modes), media-type detection, and FFmpeg-based video globalization; internal layers handle binary setup and version checks. README-documented utility methods are included, though their implementations were not all sampled. Dashed links mark documented or plausible integrations not established by the excerpts.

Main entry points: [`functions/systemFuncs.js`](https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js) (Utility Matrix), [`src/index.js`](https://github.com/cybercyphers/decifer/blob/main/src/index.js) (Entry Loader), [`functions/versioner.js`](https://github.com/cybercyphers/decifer/blob/main/functions/versioner.js) (Binary Version Manager), [`functions/ffmpeg_versioner/ffmpeg_fetch_arch_stable.js`](https://github.com/cybercyphers/decifer/blob/main/functions/ffmpeg_versioner/ffmpeg_fetch_arch_stable.js) (FFmpeg Architecture Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Utilities"]
  node_entrypoint["Entry Loader<br/>[index.js]"]
  node_matrix["Utility Matrix<br/>[systemFuncs.js]"]
  node_binary_text["Binary Text Tools<br/>[systemFuncs.js]"]
  node_uuid["UUID Generator<br/>[systemFuncs.js]"]
end

subgraph group_media["Media Tools"]
  node_media_type["Media Type Detection"]
  node_globalize["Video Globalization<br/>[systemFuncs.js]"]
  node_ffmpeg["FFmpeg Runtime"]
end

subgraph group_youtube["YouTube Downloads"]
  node_yt_download["YouTube Download<br/>[systemFuncs.js]"]
  node_download_modes["Download Modes<br/>[systemFuncs.js]"]
  node_yt_dlp["yt-dlp Runtime"]
end

subgraph group_setup["Binary Setup"]
  node_directory_restore["Directory Restore<br/>[_dirRestore.js]"]
  node_version_manager["Binary Version Manager<br/>[versioner.js]"]
  node_yt_update_check["yt-dlp Version Check"]
  node_yt_binary_fetch["yt-dlp Binary Fetch"]
  node_ffmpeg_setup["FFmpeg Architecture Setup"]
  node_architecture["Architecture Detection<br/>[arch_request.js]"]
  node_binary_store[("Local Binaries")]
end

node_developer(("Developer"))
node_youtube(("YouTube"))
node_ffmpeg_source(("FFmpeg Binary Source"))
node_ytdlp_source(("yt-dlp Release Source"))
node_version_source(("yt-dlp Version Source"))

node_developer -->|"loads entries"| node_entrypoint
node_entrypoint -->|"restores directories"| node_directory_restore
node_entrypoint -->|"provisions binaries"| node_version_manager
node_entrypoint -->|"returns class"| node_matrix
node_developer -->|"uses utilities"| node_matrix
node_matrix -.->|"provides conversions"| node_binary_text
node_matrix -.->|"provides UUID"| node_uuid
node_matrix -->|"detects media type"| node_media_type
node_matrix -.->|"globalizes video"| node_globalize
node_globalize -->|"runs encoding"| node_ffmpeg
node_matrix -.->|"downloads video"| node_yt_download
node_yt_download -->|"runs downloader"| node_yt_dlp
node_yt_download -->|"fetches media"| node_youtube
node_yt_download -->|"selects output mode"| node_download_modes
node_yt_download -->|"merges or converts"| node_ffmpeg
node_version_manager -->|"fetches missing binary"| node_yt_binary_fetch
node_version_manager -->|"sets up missing binaries"| node_ffmpeg_setup
node_version_manager -->|"checks versions"| node_yt_update_check
node_yt_update_check -->|"reads installed version"| node_yt_dlp
node_yt_update_check -->|"fetches current version"| node_version_source
node_yt_binary_fetch -->|"downloads binary"| node_ytdlp_source
node_yt_binary_fetch -->|"writes binary"| node_binary_store
node_ffmpeg_setup -->|"detects architecture"| node_architecture
node_ffmpeg_setup -->|"downloads archives"| node_ffmpeg_source
node_ffmpeg_setup -->|"extracts binaries"| node_binary_store

click node_entrypoint "https://github.com/cybercyphers/decifer/blob/main/src/index.js"
click node_matrix "https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js"
click node_binary_text "https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js"
click node_uuid "https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js"
click node_directory_restore "https://github.com/cybercyphers/decifer/blob/main/functions/self_defences/_dirRestore.js"
click node_version_manager "https://github.com/cybercyphers/decifer/blob/main/functions/versioner.js"
click node_yt_update_check "https://github.com/cybercyphers/decifer/blob/main/functions/ytdlp_versioner/yt_update_system.js"
click node_yt_binary_fetch "https://github.com/cybercyphers/decifer/blob/main/functions/ytdlp_versioner/ytdlp_system_fetch.js"
click node_ffmpeg_setup "https://github.com/cybercyphers/decifer/blob/main/functions/ffmpeg_versioner/ffmpeg_fetch_arch_stable.js"
click node_architecture "https://github.com/cybercyphers/decifer/blob/main/functions/ffmpeg_versioner/arch_request.js"
click node_media_type "https://github.com/cybercyphers/decifer/blob/main/functions/media_typesetting.js"
click node_globalize "https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js"
click node_yt_download "https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js"
click node_download_modes "https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js"

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_entrypoint,node_matrix,node_binary_text,node_uuid toneBlue
class node_media_type,node_globalize,node_ffmpeg toneAmber
class node_yt_download,node_download_modes,node_yt_dlp toneMint
class node_directory_restore,node_version_manager,node_yt_update_check,node_yt_binary_fetch,node_ffmpeg_setup,node_architecture,node_binary_store toneRose
class node_developer,node_youtube,node_ffmpeg_source,node_ytdlp_source,node_version_source toneIndigo
```

## Components

### Entry and Utilities

- [Entry Loader](https://github.com/cybercyphers/decifer/blob/main/src/index.js): `src/index.js`
- [Utility Matrix](https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js): `functions/systemFuncs.js`
- [Binary Text Tools](https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js): `functions/systemFuncs.js`
- [UUID Generator](https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js): `functions/systemFuncs.js`

### Media Tools

- [Media Type Detection](https://github.com/cybercyphers/decifer/blob/main/functions/media_typesetting.js): `functions/media_typesetting.js`
- [Video Globalization](https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js): `functions/systemFuncs.js`
- **FFmpeg Runtime**

### YouTube Downloads

- [YouTube Download](https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js): `functions/systemFuncs.js`
- [Download Modes](https://github.com/cybercyphers/decifer/blob/main/functions/systemFuncs.js): `functions/systemFuncs.js`
- **yt-dlp Runtime**

### Binary Setup

- [Directory Restore](https://github.com/cybercyphers/decifer/blob/main/functions/self_defences/_dirRestore.js): `functions/self_defences/_dirRestore.js`
- [Binary Version Manager](https://github.com/cybercyphers/decifer/blob/main/functions/versioner.js): `functions/versioner.js`
- [yt-dlp Version Check](https://github.com/cybercyphers/decifer/blob/main/functions/ytdlp_versioner/yt_update_system.js): `functions/ytdlp_versioner/yt_update_system.js`
- [yt-dlp Binary Fetch](https://github.com/cybercyphers/decifer/blob/main/functions/ytdlp_versioner/ytdlp_system_fetch.js): `functions/ytdlp_versioner/ytdlp_system_fetch.js`
- [FFmpeg Architecture Setup](https://github.com/cybercyphers/decifer/blob/main/functions/ffmpeg_versioner/ffmpeg_fetch_arch_stable.js): `functions/ffmpeg_versioner/ffmpeg_fetch_arch_stable.js`
- [Architecture Detection](https://github.com/cybercyphers/decifer/blob/main/functions/ffmpeg_versioner/arch_request.js): `functions/ffmpeg_versioner/arch_request.js`
- **Local Binaries**

### Other components

- **Developer**
- **YouTube**
- **FFmpeg Binary Source**
- **yt-dlp Release Source**
- **yt-dlp Version Source**

## Connections

- Developer → Entry Loader: loads entries (evidence: `README.md`)
- Entry Loader → Directory Restore: restores directories (evidence: `src/index.js`)
- Entry Loader → Binary Version Manager: provisions binaries (evidence: `src/index.js`)
- Entry Loader → Utility Matrix: returns class (evidence: `src/index.js`)
- Developer → Utility Matrix: uses utilities (evidence: `README.md`)
- Utility Matrix → Binary Text Tools: provides conversions (evidence: `README.md`)
- Utility Matrix → UUID Generator: provides UUID (evidence: `README.md`)
- Utility Matrix → Media Type Detection: detects media type (evidence: `functions/systemFuncs.js`)
- Utility Matrix → Video Globalization: globalizes video (evidence: `README.md`)
- Video Globalization → FFmpeg Runtime: runs encoding (evidence: `functions/systemFuncs.js`)
- Utility Matrix → YouTube Download: downloads video (evidence: `README.md`)
- YouTube Download → yt-dlp Runtime: runs downloader (evidence: `functions/systemFuncs.js`)
- YouTube Download → YouTube: fetches media (evidence: `functions/systemFuncs.js`)
- YouTube Download → Download Modes: selects output mode (evidence: `README.md`)
- YouTube Download → FFmpeg Runtime: merges or converts (evidence: `functions/systemFuncs.js`)
- Binary Version Manager → yt-dlp Binary Fetch: fetches missing binary (evidence: `functions/versioner.js`)
- Binary Version Manager → FFmpeg Architecture Setup: sets up missing binaries (evidence: `functions/versioner.js`)
- Binary Version Manager → yt-dlp Version Check: checks versions (evidence: `functions/versioner.js`)
- yt-dlp Version Check → yt-dlp Runtime: reads installed version (evidence: `functions/ytdlp_versioner/yt_update_system.js`)
- yt-dlp Version Check → yt-dlp Version Source: fetches current version (evidence: `functions/ytdlp_versioner/yt_update_system.js`)
- yt-dlp Binary Fetch → yt-dlp Release Source: downloads binary (evidence: `functions/ytdlp_versioner/ytdlp_system_fetch.js`)
- yt-dlp Binary Fetch → Local Binaries: writes binary (evidence: `functions/ytdlp_versioner/ytdlp_system_fetch.js`)
- FFmpeg Architecture Setup → Architecture Detection: detects architecture (evidence: `functions/ffmpeg_versioner/ffmpeg_fetch_arch_stable.js`)
- FFmpeg Architecture Setup → FFmpeg Binary Source: downloads archives (evidence: `functions/ffmpeg_versioner/ffmpeg_fetch_arch_stable.js`)
- FFmpeg Architecture Setup → Local Binaries: extracts binaries (evidence: `functions/ffmpeg_versioner/ffmpeg_fetch_arch_stable.js`)
