# cyprien63/encrypto architecture

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

- Interactive diagram: https://gitdiagram.com/cyprien63/encrypto
- Repository: https://github.com/cyprien63/encrypto
- Video tour (about a minute): https://gitdiagram.com/cyprien63/encrypto/video

## Overview

ENCRYPTO encrypts and decrypts files or folders into its versioned .crypto format, with metadata inspection and both desktop and command-line entry points. The main desktop workflow selects input, reviews metadata, runs encryption or decryption, then saves the result; the CLI offers parallel encrypt, decrypt, and inspect commands. Folder inputs are ZIP-archived, while payloads are compressed and protected with PBKDF2-derived AES-GCM keys. README capabilities supplement the sampled source; the Kivy and browser UI wiring is only partially visible.

Main entry points: [`app.py`](https://github.com/cyprien63/encrypto/blob/main/app.py) (Desktop API), [`src/cli.py`](https://github.com/cyprien63/encrypto/blob/main/src/cli.py) (CLI commands), [`src/main.py`](https://github.com/cyprien63/encrypto/blob/main/src/main.py) (Encryption core), [`web/index.js`](https://github.com/cyprien63/encrypto/blob/main/web/index.js) (Webview UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_browser["Webview UI<br/>[index.js]"]
  node_webpage["UI document<br/>[index.html]"]
  node_icons["File icons<br/>[icons_library.js]"]
  node_desktop_api["Desktop API<br/>[app.py]"]
end

subgraph group_kivy["Kivy interface"]
  node_kivy_ui["Kivy screens<br/>[main.py]"]
  node_kivy_layout["Kivy layout<br/>[app.kv]"]
  node_kivy_core["Encryption core<br/>[main.py]"]
end

subgraph group_cli["Command line"]
  node_cli_app["CLI commands<br/>[cli.py]"]
end

subgraph group_format["Crypto format"]
  node_metadata["Format metadata<br/>[app.py]"]
  node_folder_archive["Folder ZIP archive<br/>[app.py]"]
  node_derive["Key derivation<br/>[app.py]"]
  node_compression["Compression<br/>[app.py]"]
  node_encryption["AES-GCM encryption<br/>[app.py]"]
  node_crypto_file[".crypto file<br/>[app.py]"]
  node_decrypt["Decrypt and restore<br/>[app.py]"]
end

node_user(("User"))
node_files["Files and folders"]
node_cli_user(("CLI user"))
node_output["Saved output"]

node_user -->|"uses"| node_browser
node_browser -->|"renders"| node_webpage
node_browser -->|"reads icons"| node_icons
node_browser -->|"calls API"| node_desktop_api
node_desktop_api -->|"selects input"| node_files
node_desktop_api -->|"inspects"| node_metadata
node_desktop_api -->|"archives folders"| node_folder_archive
node_desktop_api -->|"derives key"| node_derive
node_desktop_api -->|"compresses"| node_compression
node_desktop_api -->|"encrypts"| node_encryption
node_desktop_api -->|"writes"| node_crypto_file
node_desktop_api -->|"decrypts"| node_decrypt
node_decrypt -->|"reads"| node_crypto_file
node_desktop_api -->|"saves result"| node_output
node_user -->|"uses"| node_kivy_ui
node_kivy_ui -->|"renders"| node_kivy_layout
node_kivy_ui -->|"starts operation"| node_kivy_core
node_kivy_core -->|"reads input"| node_files
node_kivy_core -->|"archives folders"| node_folder_archive
node_kivy_core -->|"derives key"| node_derive
node_kivy_core -->|"compresses"| node_compression
node_kivy_core -->|"encrypts"| node_encryption
node_kivy_core -->|"writes"| node_crypto_file
node_kivy_core -->|"decrypts"| node_decrypt
node_kivy_core -->|"saves result"| node_output
node_cli_user -->|"runs command"| node_cli_app
node_cli_app -->|"reads input"| node_files
node_cli_app -->|"inspects"| node_metadata
node_cli_app -->|"archives folders"| node_folder_archive
node_cli_app -->|"derives key"| node_derive
node_cli_app -->|"compresses"| node_compression
node_cli_app -->|"encrypts"| node_encryption
node_cli_app -->|"writes"| node_crypto_file
node_cli_app -->|"decrypts"| node_decrypt
node_cli_app -->|"writes result"| node_output
node_folder_archive -->|"archive bytes"| node_compression
node_compression -->|"compressed bytes"| node_encryption
node_derive -->|"key"| node_encryption
node_encryption -->|"ciphertext payload"| node_metadata
node_metadata -->|"serializes format"| node_crypto_file
node_crypto_file -->|"supplies payload"| node_decrypt
node_decrypt -->|"restores data"| node_output

click node_browser "https://github.com/cyprien63/encrypto/blob/main/web/index.js"
click node_webpage "https://github.com/cyprien63/encrypto/blob/main/web/index.html"
click node_icons "https://github.com/cyprien63/encrypto/blob/main/web/icons_library.js"
click node_desktop_api "https://github.com/cyprien63/encrypto/blob/main/app.py"
click node_kivy_ui "https://github.com/cyprien63/encrypto/blob/main/src/main.py"
click node_kivy_layout "https://github.com/cyprien63/encrypto/blob/main/src/app.kv"
click node_kivy_core "https://github.com/cyprien63/encrypto/blob/main/src/main.py"
click node_cli_app "https://github.com/cyprien63/encrypto/blob/main/src/cli.py"
click node_metadata "https://github.com/cyprien63/encrypto/blob/main/app.py"
click node_folder_archive "https://github.com/cyprien63/encrypto/blob/main/app.py"
click node_derive "https://github.com/cyprien63/encrypto/blob/main/app.py"
click node_compression "https://github.com/cyprien63/encrypto/blob/main/app.py"
click node_encryption "https://github.com/cyprien63/encrypto/blob/main/app.py"
click node_crypto_file "https://github.com/cyprien63/encrypto/blob/main/app.py"
click node_decrypt "https://github.com/cyprien63/encrypto/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_browser,node_webpage,node_icons,node_desktop_api,node_user,node_cli_user toneBlue
class node_kivy_ui,node_kivy_layout,node_kivy_core toneAmber
class node_cli_app toneMint
class node_metadata,node_folder_archive,node_derive,node_compression,node_encryption,node_crypto_file,node_decrypt toneRose
class node_files,node_output toneIndigo
```

## Components

### Desktop interface

- [Webview UI](https://github.com/cyprien63/encrypto/blob/main/web/index.js): `web/index.js`
- [UI document](https://github.com/cyprien63/encrypto/blob/main/web/index.html): `web/index.html`
- [File icons](https://github.com/cyprien63/encrypto/blob/main/web/icons_library.js): `web/icons_library.js`
- [Desktop API](https://github.com/cyprien63/encrypto/blob/main/app.py): `app.py`

### Kivy interface

- [Kivy screens](https://github.com/cyprien63/encrypto/blob/main/src/main.py): `src/main.py`
- [Kivy layout](https://github.com/cyprien63/encrypto/blob/main/src/app.kv): `src/app.kv`
- [Encryption core](https://github.com/cyprien63/encrypto/blob/main/src/main.py): `src/main.py`

### Command line

- [CLI commands](https://github.com/cyprien63/encrypto/blob/main/src/cli.py): `src/cli.py`

### Crypto format

- [Format metadata](https://github.com/cyprien63/encrypto/blob/main/app.py): `app.py`
- [Folder ZIP archive](https://github.com/cyprien63/encrypto/blob/main/app.py): `app.py`
- [Key derivation](https://github.com/cyprien63/encrypto/blob/main/app.py): `app.py`
- [Compression](https://github.com/cyprien63/encrypto/blob/main/app.py): `app.py`
- [AES-GCM encryption](https://github.com/cyprien63/encrypto/blob/main/app.py): `app.py`
- [.crypto file](https://github.com/cyprien63/encrypto/blob/main/app.py): `app.py`
- [Decrypt and restore](https://github.com/cyprien63/encrypto/blob/main/app.py): `app.py`

### Other components

- **User**
- **Files and folders**
- **CLI user**
- **Saved output**

## Connections

- User → Webview UI: uses
- Webview UI → UI document: renders
- Webview UI → File icons: reads icons
- Webview UI → Desktop API: calls API
- Desktop API → Files and folders: selects input
- Desktop API → Format metadata: inspects
- Desktop API → Folder ZIP archive: archives folders
- Desktop API → Key derivation: derives key
- Desktop API → Compression: compresses
- Desktop API → AES-GCM encryption: encrypts
- Desktop API → .crypto file: writes
- Desktop API → Decrypt and restore: decrypts
- Decrypt and restore → .crypto file: reads
- Desktop API → Saved output: saves result
- User → Kivy screens: uses
- Kivy screens → Kivy layout: renders
- Kivy screens → Encryption core: starts operation
- Encryption core → Files and folders: reads input
- Encryption core → Folder ZIP archive: archives folders
- Encryption core → Key derivation: derives key
- Encryption core → Compression: compresses
- Encryption core → AES-GCM encryption: encrypts
- Encryption core → .crypto file: writes
- Encryption core → Decrypt and restore: decrypts
- Encryption core → Saved output: saves result
- CLI user → CLI commands: runs command
- CLI commands → Files and folders: reads input
- CLI commands → Format metadata: inspects
- CLI commands → Folder ZIP archive: archives folders
- CLI commands → Key derivation: derives key
- CLI commands → Compression: compresses
- CLI commands → AES-GCM encryption: encrypts
- CLI commands → .crypto file: writes
- CLI commands → Decrypt and restore: decrypts
- CLI commands → Saved output: writes result
- Folder ZIP archive → Compression: archive bytes
- Compression → AES-GCM encryption: compressed bytes
- Key derivation → AES-GCM encryption: key
- AES-GCM encryption → Format metadata: ciphertext payload
- Format metadata → .crypto file: serializes format
- .crypto file → Decrypt and restore: supplies payload
- Decrypt and restore → Saved output: restores data
