# engmtcdrm/minno architecture

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

- Interactive diagram: https://gitdiagram.com/engmtcdrm/minno
- Repository: https://github.com/engmtcdrm/minno

## Overview

##### Project Type Analysis
This is a command-line interface (CLI) tool written in Go, focused on credential management with security features. The project follows a modular structure typical of Go applications.

##### Main Components

A. Core Components:
- CLI Interface Layer
- Credential Management System
- Encryption Service
- Storage Layer

B. Command Modules:
- Create Command
- View Command
- Update Command
- Root Command Handler

##### Component Relationships

**User Interface Layer**

**Command Layer**

**Application Core**

**Service Layer**

**Storage Layer**

##### Detailed Component Breakdown

a) User Interface Layer:
- Main CLI entry point (minno.go)
- To the command handlers

b) Command Layer (cmd/*):
- create.go
- view.go
- update.go
- root.go

c) Application Core (app/):
- Main application logic container
- To credential management

d) Service Layer:
- Encryption Service (encrypt/)
- Credentials Service (credentials/)
- Environment Handler (env/)

e) Storage Layer:
- Local File System Storage

##### Important Details

- Encryption flow for credential storage
- Security boundary
- Credential prompt system
- Configuration loading paths

##### Specific Implementation Notes

- The separation between the CLI interface and core logic
- The encryption/decryption flow for credentials
- The modular command structure
- The credential storage mechanism

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef ui fill:#2196F3,stroke:#1565C0,color:white
    classDef cmd fill:#4CAF50,stroke:#2E7D32,color:white
    classDef core fill:#9C27B0,stroke:#6A1B9A,color:white
    classDef service fill:#FF9800,stroke:#EF6C00,color:white
    classDef storage fill:#607D8B,stroke:#37474F,color:white
    classDef security fill:#FDD835,stroke:#F9A825,color:black

    %% User Interface Layer
    CLI[CLI Entry Point]:::ui
    click CLI "https://github.com/engmtcdrm/minno/blob/main/minno.go"
    Header[Header Component]:::ui
    click Header "https://github.com/engmtcdrm/minno/blob/main/header/header.go"

    %% Command Layer
    subgraph Commands
        Create[Create Command]:::cmd
        View[View Command]:::cmd
        Update[Update Command]:::cmd
        Root[Root Command Handler]:::cmd
    end
    click Create "https://github.com/engmtcdrm/minno/blob/main/cmd/create.go"
    click View "https://github.com/engmtcdrm/minno/blob/main/cmd/view.go"
    click Update "https://github.com/engmtcdrm/minno/blob/main/cmd/update.go"
    click Root "https://github.com/engmtcdrm/minno/blob/main/cmd/root.go"

    %% Application Core
    AppCore[Application Core]:::core
    click AppCore "https://github.com/engmtcdrm/minno/blob/main/app/app.go"

    %% Service Layer
    subgraph Services
        EncryptService[Encryption Service]:::security
        CredService[Credentials Service]:::service
        EnvHandler[Environment Handler]:::service
        PromptSystem[Credential Prompt System]:::service
    end
    click EncryptService "https://github.com/engmtcdrm/minno/blob/main/encrypt/encrypt.go"
    click CredService "https://github.com/engmtcdrm/minno/blob/main/credentials/credentials.go"
    click EnvHandler "https://github.com/engmtcdrm/minno/blob/main/env/env.go"
    click PromptSystem "https://github.com/engmtcdrm/minno/blob/main/credentials/prompts/prompts.go"

    %% Storage Layer
    Storage[(Local File System)]:::storage

    %% Testing Components
    EncryptTest[Encryption Tests]:::security
    CredTest[Credentials Tests]:::service
    click EncryptTest "https://github.com/engmtcdrm/minno/blob/main/encrypt/encrypt_test.go"
    click CredTest "https://github.com/engmtcdrm/minno/blob/main/credentials/credentials_test.go"

    %% Relationships
    CLI --> Header
    CLI --> Root
    Root --> Create & View & Update
    Create & View & Update --> AppCore
    AppCore --> EncryptService
    AppCore --> CredService
    AppCore --> EnvHandler
    CredService --> PromptSystem
    EncryptService --> Storage
    CredService --> Storage
    EncryptService -.-> EncryptTest
    CredService -.-> CredTest

    %% Legend
    subgraph Legend
        UI[User Interface]:::ui
        CMD[Command Handler]:::cmd
        CORE[Core Component]:::core
        SVC[Service Component]:::service
        SEC[Security Component]:::security
        STR[Storage]:::storage
    end
```
