# yaredcyber/file-locker architecture

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

- Interactive diagram: https://gitdiagram.com/yaredcyber/file-locker
- Repository: https://github.com/yaredcyber/file-locker

## Overview

FileCypher is a Flask file-encryption web app and a directly callable Python crypto API. Its documented browser workflow selects a file and passkey, detects likely encrypted payloads, posts to the workstation, encrypts or decrypts in memory, then downloads the result; the browser also offers SHA-256 text fingerprinting. The package factory configures the Flask app and registers landing and workstation routes. The README describes these package flows, while app.py contains a separate inline Flask implementation; unsampled template and route details are not inferred beyond documented behavior.

Main entry points: [`filecypher/static/js/tool.js`](https://github.com/yaredcyber/file-locker/blob/main/filecypher/static/js/tool.js) (Workstation controller), [`filecypher/routes/workstation.py`](https://github.com/yaredcyber/file-locker/blob/main/filecypher/routes/workstation.py) (Workstation route), [`filecypher/__init__.py`](https://github.com/yaredcyber/file-locker/blob/main/filecypher/__init__.py) (App factory), [`filecypher/templates/index.html`](https://github.com/yaredcyber/file-locker/blob/main/filecypher/templates/index.html) (Workstation UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_workstation_ui["Workstation UI<br/>[index.html]"]
  node_client_controller["Workstation controller<br/>[tool.js]"]
  node_payload_detection["Payload detection<br/>[tool.js]"]
  node_hash_sandbox["SHA-256 sandbox<br/>[tool.js]"]
end

subgraph group_web["Flask web layer"]
  node_factory["App factory<br/>[__init__.py]"]
  node_config["App configuration<br/>[config.py]"]
  node_landing_route["Landing route<br/>[main.py]"]
  node_workstation_route["Workstation route<br/>[workstation.py]"]
  node_landing_page["Landing page<br/>[home.html]"]
  node_memory_stream["RAM download stream<br/>[workstation.py]"]
end

subgraph group_crypto["Cryptographic core"]
  node_cipher_engine["Cipher engine<br/>[engine.py]"]
end

subgraph group_runtime["Standalone runtime"]
  node_standalone_app["Inline Flask app<br/>[app.py]"]
end

node_browser(("User browser"))

node_browser -->|"uses"| node_workstation_ui
node_workstation_ui -->|"loads controller"| node_client_controller
node_client_controller -->|"detects payload"| node_payload_detection
node_client_controller -->|"hashes text"| node_hash_sandbox
node_client_controller -->|"posts file"| node_workstation_route
node_workstation_route -->|"encrypts or decrypts"| node_cipher_engine
node_workstation_route -->|"streams result"| node_memory_stream
node_memory_stream -->|"returns download"| node_browser
node_factory -->|"loads config"| node_config
node_factory -->|"registers blueprint"| node_landing_route
node_factory -->|"registers blueprint"| node_workstation_route
node_landing_route -->|"renders page"| node_landing_page
node_browser -->|"views overview"| node_landing_page
node_browser -->|"uses standalone app"| node_standalone_app

click node_workstation_ui "https://github.com/yaredcyber/file-locker/blob/main/filecypher/templates/index.html"
click node_client_controller "https://github.com/yaredcyber/file-locker/blob/main/filecypher/static/js/tool.js"
click node_payload_detection "https://github.com/yaredcyber/file-locker/blob/main/filecypher/static/js/tool.js"
click node_hash_sandbox "https://github.com/yaredcyber/file-locker/blob/main/filecypher/static/js/tool.js"
click node_factory "https://github.com/yaredcyber/file-locker/blob/main/filecypher/__init__.py"
click node_config "https://github.com/yaredcyber/file-locker/blob/main/filecypher/config.py"
click node_landing_route "https://github.com/yaredcyber/file-locker/blob/main/filecypher/routes/main.py"
click node_workstation_route "https://github.com/yaredcyber/file-locker/blob/main/filecypher/routes/workstation.py"
click node_landing_page "https://github.com/yaredcyber/file-locker/blob/main/filecypher/templates/home.html"
click node_cipher_engine "https://github.com/yaredcyber/file-locker/blob/main/filecypher/crypto/engine.py"
click node_memory_stream "https://github.com/yaredcyber/file-locker/blob/main/filecypher/routes/workstation.py"
click node_standalone_app "https://github.com/yaredcyber/file-locker/blob/main/app.py"

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_workstation_ui,node_client_controller,node_payload_detection,node_hash_sandbox,node_browser toneBlue
class node_factory,node_config,node_landing_route,node_workstation_route,node_landing_page,node_memory_stream toneAmber
class node_cipher_engine toneMint
class node_standalone_app toneRose
```

## Components

### Browser experience

- [Workstation UI](https://github.com/yaredcyber/file-locker/blob/main/filecypher/templates/index.html): `filecypher/templates/index.html`
- [Workstation controller](https://github.com/yaredcyber/file-locker/blob/main/filecypher/static/js/tool.js): `filecypher/static/js/tool.js`
- [Payload detection](https://github.com/yaredcyber/file-locker/blob/main/filecypher/static/js/tool.js): `filecypher/static/js/tool.js`
- [SHA-256 sandbox](https://github.com/yaredcyber/file-locker/blob/main/filecypher/static/js/tool.js): `filecypher/static/js/tool.js`

### Flask web layer

- [App factory](https://github.com/yaredcyber/file-locker/blob/main/filecypher/__init__.py): `filecypher/__init__.py`
- [App configuration](https://github.com/yaredcyber/file-locker/blob/main/filecypher/config.py): `filecypher/config.py`
- [Landing route](https://github.com/yaredcyber/file-locker/blob/main/filecypher/routes/main.py): `filecypher/routes/main.py`
- [Workstation route](https://github.com/yaredcyber/file-locker/blob/main/filecypher/routes/workstation.py): `filecypher/routes/workstation.py`
- [Landing page](https://github.com/yaredcyber/file-locker/blob/main/filecypher/templates/home.html): `filecypher/templates/home.html`
- [RAM download stream](https://github.com/yaredcyber/file-locker/blob/main/filecypher/routes/workstation.py): `filecypher/routes/workstation.py`

### Cryptographic core

- [Cipher engine](https://github.com/yaredcyber/file-locker/blob/main/filecypher/crypto/engine.py): `filecypher/crypto/engine.py`

### Standalone runtime

- [Inline Flask app](https://github.com/yaredcyber/file-locker/blob/main/app.py): `app.py`

### Other components

- **User browser**

## Connections

- User browser → Workstation UI: uses (evidence: `README.md`)
- Workstation UI → Workstation controller: loads controller (evidence: `README.md`)
- Workstation controller → Payload detection: detects payload (evidence: `filecypher/static/js/tool.js`)
- Workstation controller → SHA-256 sandbox: hashes text (evidence: `README.md`)
- Workstation controller → Workstation route: posts file (evidence: `README.md`)
- Workstation route → Cipher engine: encrypts or decrypts (evidence: `filecypher/routes/workstation.py`)
- Workstation route → RAM download stream: streams result (evidence: `filecypher/routes/workstation.py`)
- RAM download stream → User browser: returns download (evidence: `filecypher/routes/workstation.py`)
- App factory → App configuration: loads config (evidence: `filecypher/__init__.py`)
- App factory → Landing route: registers blueprint (evidence: `filecypher/__init__.py`)
- App factory → Workstation route: registers blueprint (evidence: `filecypher/__init__.py`)
- Landing route → Landing page: renders page (evidence: `README.md`)
- User browser → Landing page: views overview (evidence: `README.md`)
- User browser → Inline Flask app: uses standalone app (evidence: `README.md`)
