# gtech29/cryptography architecture

> Architecture diagram of the GitHub repository gtech29/cryptography, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gtech29/cryptography
- Repository: https://github.com/gtech29/cryptography

## Overview

##### Project type and purpose
- This is a Python-based encryption utility developed for a COMP 324 course.
- It offers two frontends (console and GUI), a core cryptographic engine, and peer-to-peer network capabilities (client and server).

##### File structure
- Top-level package “encryption_tool” contains:
- console_app.py – CLI interface
- crypto_gui.py – GUI interface
- crypto_core.py – core encryption/decryption logic
- socket_client.py – network client for remote operations
- socket_server.py – network server to expose crypto services
- No separate “src” or “lib” directories—everything lives under one package.
- Presence of both console and GUI indicates a layered UI approach; socket modules point to a network layer.

##### Detail without over-splitting
- Python script as its own component
- Configuration or protocol details (e.g., “Listens on port 9000, uses JSON over TCP”)
- Shared dependencies (crypto_core) to show code reuse

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "UI Layer"
        CLI["CLI Frontend"]:::ui
        GUI["GUI Frontend"]:::ui
    end

    subgraph "Core Logic"
        CORE["Crypto Core Engine"]:::core
    end

    subgraph "Network Layer"
        CLIENT["Network Client"]:::network
        SERVER["Network Server"]:::network
    end

    EXTERNAL["External Peers"]:::external

    CLI -->|"uses"| CORE
    GUI -->|"uses"| CORE
    CLI -->|"optional_remote"| CLIENT
    GUI -->|"optional_remote"| CLIENT
    CLIENT -->|"connects_to"| SERVER
    SERVER -->|"delegates_to"| CORE
    SERVER -->|"responds_to"| CLIENT
    EXTERNAL -->|"peer_connection"| SERVER

    click CLI "https://github.com/gtech29/cryptography/blob/master/encryption_tool/console_app.py"
    click GUI "https://github.com/gtech29/cryptography/blob/master/encryption_tool/crypto_gui.py"
    click CORE "https://github.com/gtech29/cryptography/blob/master/encryption_tool/crypto_core.py"
    click CLIENT "https://github.com/gtech29/cryptography/blob/master/encryption_tool/socket_client.py"
    click SERVER "https://github.com/gtech29/cryptography/blob/master/encryption_tool/socket_server.py"

    classDef ui fill:#ADD8E6,stroke:#000,color:#000;
    classDef core fill:#90EE90,stroke:#000,color:#000;
    classDef network fill:#FFD580,stroke:#000,color:#000;
    classDef external fill:#f0f0f0,stroke-dasharray:5 5,color:#000;
```
