# zep4yrs/ctf-qiankun architecture

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

- Interactive diagram: https://gitdiagram.com/zep4yrs/ctf-qiankun
- Repository: https://github.com/zep4yrs/ctf-qiankun

## Overview

CTF 乾坤袋 is a browser-side CTF and security-analysis toolbox; the README says inputs are processed locally by default and describes no server API. The main flow is category/search browsing, choosing a tool, supplying text or files, executing an operation, and viewing results. The source index confirms the workbench page composition and sidebar search; README capabilities preserve smart codec, operation chains, tool manuals, and broad tool families. Some runtime wiring is unsampled, so those links are omitted or marked unverified.

Main entry points: [`client/src/pages/WorkbenchPage/Sidebar.tsx`](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/Sidebar.tsx) (Browse & search), [`client/src/app.tsx`](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/app.tsx) (App routes), [`client/src/pages/WorkbenchPage/WorkbenchPage.tsx`](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/WorkbenchPage.tsx) (Workbench page), [`client/src/pages/WorkbenchPage/WorkArea.tsx`](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/WorkArea.tsx) (Tool workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation"]
  node_routes["App routes<br/>[app.tsx]"]
  node_api_docs["Tool manual<br/>[ApiDocsPage.tsx]"]
end

subgraph group_workbench["Workbench"]
  node_workbench_page["Workbench page<br/>[WorkbenchPage.tsx]"]
  node_sidebar["Browse &amp; search<br/>[Sidebar.tsx]"]
  node_search["Search controls<br/>[ToolSearch.tsx]"]
  node_store["Workbench state<br/>[workbench-store.ts]"]
  node_workarea["Tool workspace<br/>[WorkArea.tsx]"]
  node_input["Input &amp; files<br/>[InputPanel.tsx]"]
  node_output["Results display<br/>[OutputPanel.tsx]"]
  node_smart_codec["Smart codec<br/>[useSmartCodec.ts]"]
  node_operation_chain["Operation chains"]
  node_chain_panel["Chain editor"]
end

subgraph group_tooling["Tool Runtime"]
  node_manifest["Tool catalog<br/>[meta-manifest.ts]"]
  node_simple["Sync execution<br/>[SimpleTool.tsx]"]
  node_async["Async execution<br/>[AsyncTool.tsx]"]
  node_tool_types["Tool contracts<br/>[types.ts]"]
  node_hex_utils["Binary helpers<br/>[hexUtils.ts]"]
  node_input_utils["File input helpers<br/>[inputUtils.ts]"]
  node_codec_lib["Codec operations<br/>[codecs.ts]"]
end

subgraph group_capabilities["Analysis Capabilities"]
  node_enc_tools["Encoding tools"]
  node_crypto_tools["Crypto tools"]
  node_binary_tools["File analysis"]
  node_forensics_tools["Forensics &amp; OSINT"]
  node_stego_tools["Stego analysis"]
  node_reverse_tools["PWN &amp; reverse"]
end

node_user(("Tool user"))

node_user -->|"opens app"| node_routes
node_routes -->|"routes to"| node_workbench_page
node_routes -->|"routes to"| node_api_docs
node_workbench_page -->|"renders"| node_sidebar
node_workbench_page -->|"renders"| node_workarea
node_sidebar -.->|"filters catalog"| node_manifest
node_sidebar -.->|"uses search"| node_search
node_user -->|"browses tools"| node_sidebar
node_user -->|"provides input"| node_input
node_workarea -.->|"accepts input"| node_input
node_workarea -.->|"shows results"| node_output
node_manifest -->|"defines entries"| node_tool_types
node_simple -->|"uses props"| node_tool_types
node_async -->|"uses props"| node_tool_types
node_input_utils -->|"parses hex"| node_hex_utils
node_reverse_tools -->|"uses helpers"| node_hex_utils
node_smart_codec -.->|"uses codecs"| node_codec_lib
node_user -->|"encodes or decodes"| node_smart_codec
node_user -->|"chains operations"| node_operation_chain
node_operation_chain -.->|"edits chain"| node_chain_panel
node_user -->|"transforms text"| node_enc_tools
node_user -->|"uses crypto tools"| node_crypto_tools
node_user -->|"analyzes files"| node_binary_tools
node_user -->|"investigates evidence"| node_forensics_tools
node_user -->|"analyzes media"| node_stego_tools
node_user -->|"uses reverse tools"| node_reverse_tools

click node_routes "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/app.tsx"
click node_workbench_page "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/WorkbenchPage.tsx"
click node_api_docs "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/ApiDocsPage/ApiDocsPage.tsx"
click node_sidebar "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/Sidebar.tsx"
click node_search "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/components/workbench/ToolSearch.tsx"
click node_store "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/store/workbench-store.ts"
click node_workarea "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/WorkArea.tsx"
click node_input "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/components/workbench/InputPanel.tsx"
click node_output "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/components/workbench/OutputPanel.tsx"
click node_manifest "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/meta-manifest.ts"
click node_simple "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/_shared/SimpleTool.tsx"
click node_async "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/_shared/AsyncTool.tsx"
click node_tool_types "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/types.ts"
click node_hex_utils "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/_shared/hexUtils.ts"
click node_input_utils "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/_shared/inputUtils.ts"
click node_enc_tools "https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/encoding"
click node_crypto_tools "https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/classical-crypto"
click node_binary_tools "https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/file-binary"
click node_forensics_tools "https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/forensics"
click node_stego_tools "https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/stego"
click node_reverse_tools "https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/pwn-reverse"
click node_smart_codec "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/hooks/useSmartCodec.ts"
click node_codec_lib "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/lib/codecs.ts"
click node_operation_chain "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/hooks/useOperationChain.ts"
click node_chain_panel "https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/components/workbench/OperationChain/OperationChainPanel.tsx"

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_routes,node_api_docs,node_user toneBlue
class node_workbench_page,node_sidebar,node_search,node_store,node_workarea,node_input,node_output,node_smart_codec,node_operation_chain,node_chain_panel toneAmber
class node_manifest,node_simple,node_async,node_tool_types,node_hex_utils,node_input_utils,node_codec_lib toneMint
class node_enc_tools,node_crypto_tools,node_binary_tools,node_forensics_tools,node_stego_tools,node_reverse_tools toneRose
```

## Components

### Navigation

- [App routes](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/app.tsx): `client/src/app.tsx`
- [Tool manual](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/ApiDocsPage/ApiDocsPage.tsx): `client/src/pages/ApiDocsPage/ApiDocsPage.tsx`

### Workbench

- [Workbench page](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/WorkbenchPage.tsx): `client/src/pages/WorkbenchPage/WorkbenchPage.tsx`
- [Browse & search](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/Sidebar.tsx): `client/src/pages/WorkbenchPage/Sidebar.tsx`
- [Search controls](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/components/workbench/ToolSearch.tsx): `client/src/components/workbench/ToolSearch.tsx`
- [Workbench state](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/store/workbench-store.ts): `client/src/store/workbench-store.ts`
- [Tool workspace](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/pages/WorkbenchPage/WorkArea.tsx): `client/src/pages/WorkbenchPage/WorkArea.tsx`
- [Input & files](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/components/workbench/InputPanel.tsx): `client/src/components/workbench/InputPanel.tsx`
- [Results display](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/components/workbench/OutputPanel.tsx): `client/src/components/workbench/OutputPanel.tsx`
- [Smart codec](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/hooks/useSmartCodec.ts): `client/src/hooks/useSmartCodec.ts`
- [Operation chains](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/hooks/useOperationChain.ts): `client/src/hooks/useOperationChain.ts`
- [Chain editor](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/components/workbench/OperationChain/OperationChainPanel.tsx): `client/src/components/workbench/OperationChain/OperationChainPanel.tsx`

### Tool Runtime

- [Tool catalog](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/meta-manifest.ts): `client/src/tools/meta-manifest.ts`
- [Sync execution](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/_shared/SimpleTool.tsx): `client/src/tools/_shared/SimpleTool.tsx`
- [Async execution](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/_shared/AsyncTool.tsx): `client/src/tools/_shared/AsyncTool.tsx`
- [Tool contracts](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/types.ts): `client/src/tools/types.ts`
- [Binary helpers](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/_shared/hexUtils.ts): `client/src/tools/_shared/hexUtils.ts`
- [File input helpers](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/tools/_shared/inputUtils.ts): `client/src/tools/_shared/inputUtils.ts`
- [Codec operations](https://github.com/zep4yrs/ctf-qiankun/blob/main/client/src/lib/codecs.ts): `client/src/lib/codecs.ts`

### Analysis Capabilities

- [Encoding tools](https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/encoding): `client/src/tools/encoding`
- [Crypto tools](https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/classical-crypto): `client/src/tools/classical-crypto`
- [File analysis](https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/file-binary): `client/src/tools/file-binary`
- [Forensics & OSINT](https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/forensics): `client/src/tools/forensics`
- [Stego analysis](https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/stego): `client/src/tools/stego`
- [PWN & reverse](https://github.com/zep4yrs/ctf-qiankun/tree/main/client/src/tools/pwn-reverse): `client/src/tools/pwn-reverse`

### Other components

- **Tool user**

## Connections

- Tool user → App routes: opens app (evidence: `client/src/app.tsx`)
- App routes → Workbench page: routes to (evidence: `client/src/app.tsx`)
- App routes → Tool manual: routes to (evidence: `client/src/app.tsx`)
- Workbench page → Browse & search: renders (evidence: `client/src/pages/WorkbenchPage/WorkbenchPage.tsx`)
- Workbench page → Tool workspace: renders (evidence: `client/src/pages/WorkbenchPage/WorkbenchPage.tsx`)
- Browse & search → Tool catalog: filters catalog
- Browse & search → Search controls: uses search
- Tool user → Browse & search: browses tools
- Tool user → Input & files: provides input
- Tool workspace → Input & files: accepts input
- Tool workspace → Results display: shows results
- Tool catalog → Tool contracts: defines entries (evidence: `client/src/tools/meta-manifest.ts`)
- Sync execution → Tool contracts: uses props (evidence: `client/src/tools/_shared/SimpleTool.tsx`)
- Async execution → Tool contracts: uses props (evidence: `client/src/tools/_shared/AsyncTool.tsx`)
- File input helpers → Binary helpers: parses hex (evidence: `client/src/tools/_shared/inputUtils.ts`)
- PWN & reverse → Binary helpers: uses helpers (evidence: `client/src/tools/pwn-reverse/asm-disasm/ToolComponent.tsx`)
- Smart codec → Codec operations: uses codecs
- Tool user → Smart codec: encodes or decodes
- Tool user → Operation chains: chains operations
- Operation chains → Chain editor: edits chain
- Tool user → Encoding tools: transforms text
- Tool user → Crypto tools: uses crypto tools
- Tool user → File analysis: analyzes files
- Tool user → Forensics & OSINT: investigates evidence
- Tool user → Stego analysis: analyzes media
- Tool user → PWN & reverse: uses reverse tools
