# skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra architecture

> Architecture diagram of the GitHub repository skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra
- Repository: https://github.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra

## Overview

##### Project type and purpose
- This is a standalone Java desktop application with a Swing‐based GUI, built in NetBeans, whose purpose is file encryption and decryption.
- The README says: “Desarrollar un programa que implemente una aplicación con GUI para el cifrado de archivos.”

##### File structure
- Top-level: a NetBeans project under `Tarea1.1/` containing:
- nbproject/ – IDE metadata
- build.xml + build/ – Ant build output
- src/ – Java source code organized by package
- build/classes/ – compiled classes and sample files under “archivos”
- Packages:
- Cipher – GUI frames and image panels
- Codificar_descodificar – encryption and decryption logic
- Imagenes – image resources (if any)
- archivos – sample input/output text files
- Test – JUnit tests for the cipher logic

##### README for additional insights
- Confirms core feature: GUI for encrypting/decrypting files.

a. Main components
- GUI Layer
– CipherFrame.java
– Imagenpanel.java
- Business Logic Layer
– Codificar.java (encryption algorithm)
– Descodificar.java (decryption algorithm)
- File I/O Component
– Reads plaintext from files in `archivos/`
– Writes encrypted/decrypted output back to disk
- Test Suite
– CipherTest.java (validates correctness of encryption/decryption)
b. Relationships & interactions
– GUI invokes Business Logic to process files
– Business Logic interacts with File I/O to read and write data
– Test Suite invokes Business Logic directly for automated verification
c. Architectural patterns & principles
– Separation of concerns: UI vs. core cipher logic vs. I/O
– Single Responsibility: each class does one job (displaying UI or encoding data)
d. Key technologies/frameworks
– Java Swing for GUI
– Java I/O (FileReader/FileWriter or streams)
– Ant for build orchestration
– JUnit for testing

##### Elements
- Clear labels for each package/module

##### Detailed capture of essential elements
– CipherFrame
– Imagenpanel
– Codificar
– Descodificar
– File Reader
– File Writer
- Test Suite:
– Blue = UI
– Green = Core Logic
– Yellow = Persistence/I-O
– Gray = Test

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% GUI Layer
    subgraph "GUI Layer"
        CF["CipherFrame"]:::ui
        IP["Imagenpanel"]:::ui
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        CD1["Codificar"]:::logic
        CD2["Descodificar"]:::logic
    end

    %% File System Layer
    subgraph "File System Layer"
        FR["Texto_cifrado.vge"]:::io
        FW["Texto_decifrado.txt"]:::io
    end

    %% Test Suite
    subgraph "Test Suite"
        CT["CipherTest"]:::test
    end

    %% Connections
    CF -->|"invokes"| CD1
    CF -->|"invokes"| CD2
    CD1 -->|"reads/writes"| FR
    CD1 -->|"reads/writes"| FW
    CD2 -->|"reads/writes"| FR
    CD2 -->|"reads/writes"| FW
    CD1 -->|"status/result"| CF
    CD2 -->|"status/result"| CF

    CT -.->|"tests"| CD1
    CT -.->|"tests"| CD2

    %% Click Events
    click CF "https://github.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra/blob/CipherTest/Tarea1.1/src/Cipher/CipherFrame.java"
    click IP "https://github.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra/blob/CipherTest/Tarea1.1/src/Cipher/Imagenpanel.java"
    click CD1 "https://github.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra/blob/CipherTest/Tarea1.1/src/Codificar_descodificar/Codificar.java"
    click CD2 "https://github.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra/blob/CipherTest/Tarea1.1/src/Codificar_descodificar/Descodificar.java"
    click FR "https://github.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra/blob/CipherTest/Tarea1.1/src/archivos/Texto_cifrado.vge"
    click FW "https://github.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra/blob/CipherTest/Tarea1.1/src/archivos/Texto_decifrado.txt"
    click CT "https://github.com/skynet2403/cifrado-de-archivos-by-jonathan-de-jesus-perez-becerra/blob/CipherTest/Tarea1.1/src/Test/CipherTest.java"

    %% Styles
    classDef ui fill:#cce5ff,stroke:#004085,color:#004085
    classDef logic fill:#d4edda,stroke:#155724,color:#155724
    classDef io fill:#fff3cd,stroke:#856404,color:#856404
    classDef test fill:#e2e3e5,stroke:#6c757d,color:#6c757d,stroke-dasharray: 5 5
```
