# dinotaurent/jbase64-decoder architecture

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

- Interactive diagram: https://gitdiagram.com/dinotaurent/jbase64-decoder
- Repository: https://github.com/dinotaurent/jbase64-decoder

## Overview

JBase64 Decoder is a Spring Shell utility that reads Base64 documents from `ingreso.txt`, decodes them into text files, and optionally packages them as a ZIP. The user starts the workflow with the `generar` command; its handler prepares output directories, extracts document values, and delegates generation to the service. The service clears prior outputs, writes decoded files, prompts before compression, and builds the archive when requested. Internal steps share the service source file. The excerpts show these calls, but not Spring’s runtime command-registration wiring.

Main entry points: [`src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`](https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java) (Shell service), [`src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java`](https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java) (Generate command), [`src/main/java/com/dinotaurent/jbase64_decoder/Jbase64DecoderApplication.java`](https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/Jbase64DecoderApplication.java) (Spring Boot app)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Console user"))
node_app["Spring Boot app"]
node_command["Generate command<br/>[ShellCommands.java]"]
node_service["Shell service<br/>[ShellService.java]"]
node_input["JSON input"]
node_outputs["Text outputs"]
node_prompt["ZIP prompt<br/>[ShellService.java]"]
node_archive["ZIP archive"]

node_app -.->|"registers command"| node_command
node_user -->|"runs command"| node_command
node_command -->|"prepares folders"| node_service
node_command -->|"extracts documents"| node_service
node_command -->|"generates files"| node_service
node_service -->|"reads JSON"| node_input
node_service -->|"writes decoded text"| node_outputs
node_service -->|"asks ZIP choice"| node_prompt
node_prompt -->|"reads response"| node_user
node_service -->|"reads text files"| node_outputs
node_service -->|"writes ZIP"| node_archive

click node_app "https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/Jbase64DecoderApplication.java"
click node_command "https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java"
click node_service "https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java"
click node_prompt "https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java"

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_user toneBlue
class node_app,node_command,node_service,node_prompt toneTeal
class node_input,node_outputs,node_archive toneIndigo
```

## Components

### Other components

- **Console user**
- [Spring Boot app](https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/Jbase64DecoderApplication.java): `src/main/java/com/dinotaurent/jbase64_decoder/Jbase64DecoderApplication.java`
- [Generate command](https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java): `src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java`
- [Shell service](https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java): `src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`
- **JSON input**
- **Text outputs**
- [ZIP prompt](https://github.com/dinotaurent/jbase64-decoder/blob/main/src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java): `src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`
- **ZIP archive**

## Connections

- Spring Boot app → Generate command: registers command
- Console user → Generate command: runs command (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java`)
- Generate command → Shell service: prepares folders (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java`)
- Generate command → Shell service: extracts documents (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java`)
- Generate command → Shell service: generates files (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/command/ShellCommands.java`)
- Shell service → JSON input: reads JSON (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`)
- Shell service → Text outputs: writes decoded text (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`)
- Shell service → ZIP prompt: asks ZIP choice (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`)
- ZIP prompt → Console user: reads response (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`)
- Shell service → Text outputs: reads text files (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`)
- Shell service → ZIP archive: writes ZIP (evidence: `src/main/java/com/dinotaurent/jbase64_decoder/service/ShellService.java`)
