# tarunbod/sisyphus architecture

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

- Interactive diagram: https://gitdiagram.com/tarunbod/sisyphus
- Repository: https://github.com/tarunbod/sisyphus

## Overview

##### Project Type Analysis
This is a command-line tool with a split architecture (api + cli components) that generates passwords without storage, following the Spectre password manager's approach.

##### Main Components

A. Core Components:
- CLI Interface (Entry Point)
- Password Generation API
- System Keystore Integration
- Password Derivation Engine

B. External Dependencies:
- Operating System Secure Store (Windows Credential Manager/macOS Keychain/Linux keyutils)
- System Clipboard

##### Flow Representation

→ User input → CLI processing
→ CLI → API calls
→ API → Password derivation
→ Secure store interactions
→ Clipboard operations

##### Specific Implementation Details

Crucial elements:
**┌─────────────────────────┐**
- CLI Interface      │
- (spm commands layer)   │
- ┬──────────────┘
- ↓
**┌─────────────────────────┐**
- Password API Core    │
- Password Derivation   │
- Master Key Processing │
- ┬──────────────┘
- ↓
**┌─────────────────────────┐**
- System Integration    │
- Secure Store Access   │
- Clipboard Management  │
- ┘

##### Important Notes

- Stateless nature of the system
- Clear separation between CLI and API components
- Platform-specific secure store variations
- Clipboard integration as optional/platform-dependent
- Error handling flows
- Master password/username flow

##### Technical Details

- Rust version compatibility (1.67+)
- Keyring integration points
- Platform-specific implementations
- Command flow patterns

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interaction Layer"
        CLI["CLI Interface"]
        Commands["Command Processing"]
        CLI --> Commands
    end

    subgraph "Core Processing Layer"
        API["Password Generation API"]
        PDEngine["Password Derivation Engine"]
        MasterKey["Master Key Processing"]
        
        API --> PDEngine
        API --> MasterKey
    end

    subgraph "System Integration Layer"
        SecureStore[("OS Secure Store")]
        Clipboard["System Clipboard"]
        
        subgraph "Platform Specific Stores"
            Windows["Windows Credential Manager"]
            MacOS["macOS Keychain"]
            Linux["Linux keyutils"]
        end
        
        SecureStore --> Windows
        SecureStore --> MacOS
        SecureStore --> Linux
    end

    Commands --> API
    MasterKey --> SecureStore
    PDEngine --> Clipboard

    %% Component Relationships
    Commands -- "User Input" --> API
    API -- "Password Output" --> Clipboard
    MasterKey -- "Credentials" --> SecureStore

    %% Styling
    classDef cli fill:#a8d1ff,stroke:#333,stroke-width:2px
    classDef api fill:#90EE90,stroke:#333,stroke-width:2px
    classDef security fill:#FFE5B4,stroke:#333,stroke-width:2px
    classDef system fill:#E5E4E2,stroke:#333,stroke-width:2px

    class CLI,Commands cli
    class API,PDEngine api
    class MasterKey,SecureStore security
    class Windows,MacOS,Linux,Clipboard system

    %% Click Events
    click CLI "https://github.com/tarunbod/sisyphus/blob/main/cli/src/main.rs"
    click API "https://github.com/tarunbod/sisyphus/blob/main/api/src/lib.rs"
    click Commands "https://github.com/tarunbod/sisyphus/blob/main/cli/Cargo.toml"
    click PDEngine "https://github.com/tarunbod/sisyphus/blob/main/api/Cargo.toml"

    %% Legend
    subgraph Legend
        L1["CLI Components"]:::cli
        L2["API Components"]:::api
        L3["Security Components"]:::security
        L4["System Components"]:::system
    end
```
