# adamant-im/adamant-im architecture

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

- Interactive diagram: https://gitdiagram.com/adamant-im/adamant-im
- Repository: https://github.com/adamant-im/adamant-im

## Overview

##### Main Components

a. Client-Side Architecture:
- Frontend Layer (Vue.js Application)
- Views & Components
- Store (Vuex) Modules
- Routing System
- i18n Internationalization
- Crypto Wallets Integration

b. Platform-Specific Components:
- PWA Implementation
- Electron (Desktop)
- Capacitor (Mobile/Android)

c. Core Services:
- ADAMANT Blockchain Interface
- Cryptocurrency Services (BTC, ETH, DOGE, DASH)
- Chat System
- File Storage (IPFS)
- Node Management
- Transaction Processing

##### Relationships and Data Flow

- User Interface → Store Modules
- Store Modules → Blockchain Services
- Chat System → Encryption Layer
- Wallet Services → Multiple Cryptocurrency Networks
- Node Management → Network Services

##### Detailed Component Breakdown

Frontend Layer:

- User Interface     |

- Views        | |
- Chat         | |
- Wallets      | |
- Transactions | |

Core Services Layer:

- Store Modules       |

- Chat            |   |
- Wallets         |   |
- Transactions    |   |
- Nodes           |   |

Blockchain & Crypto Layer:

- Blockchain Services   |

- ADAMANT Core    |   |
- BTC Service     |   |
- ETH Service     |   |
- DOGE Service    |   |

##### Technical Stack Indicators

Technology badges for:
- Vue.js/Vuex
- Electron
- Capacitor
- Blockchain Technologies
- Encryption Algorithms (Diffie-Hellman Curve25519, Salsa20, etc.)

##### Cross-Platform Support

Platform-specific builds:

- Platform Builds      |

- Web (PWA)       |   |
- Desktop         |   |
- Android         |   |

##### Additional Elements

- External service dependencies
- Encryption points in the data flow
- Persistent storage locations (IndexedDB, LocalStorage)

- The decentralized nature of the application
- Security and encryption implementation
- Multi-cryptocurrency support
- Cross-platform compatibility
- Modular architecture with clear separation of concerns

Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make ADAMANT unique, such as its blockchain-based messaging system and integrated cryptocurrency wallets.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        UI[User Interface]
        Views["Views & Components"]
        Store["Store Modules"]
        Router["Routing System"]
        i18n["i18n System"]
    end

    subgraph Platforms
        PWA["PWA Implementation"]
        Electron["Desktop (Electron)"]
        Android["Mobile (Android)"]
    end

    subgraph CoreServices
        BlockchainIF["ADAMANT Blockchain Interface"]
        ChatSystem["Chat System"]
        FileStorage["File Storage (IPFS)"]
        NodeMgmt["Node Management"]
        TxProcess["Transaction Processing"]
    end

    subgraph CryptoServices
        BTC["Bitcoin Service"]
        ETH["Ethereum Service"]
        DOGE["Dogecoin Service"]
        ERC20["ERC20 Tokens"]
        DASH["Dash Service"]
    end

    subgraph Security
        Encryption["Security/Encryption Layer"]
    end

    UI --> Views
    Views --> Store
    Store --> CoreServices
    Store --> CryptoServices
    ChatSystem --> Encryption
    BlockchainIF --> NodeMgmt
    
    classDef frontend fill:#a8d5ff
    classDef platform fill:#ffe0a8
    classDef core fill:#a8ffd5
    classDef crypto fill:#ffa8d5
    classDef security fill:#d5a8ff

    class UI,Views,Store,Router,i18n frontend
    class PWA,Electron,Android platform
    class BlockchainIF,ChatSystem,FileStorage,NodeMgmt,TxProcess core
    class BTC,ETH,DOGE,ERC20,DASH crypto
    class Encryption security

    click Views "https://github.com/adamant-im/adamant-im/tree/dev/src/components/"
    click Store "https://github.com/adamant-im/adamant-im/tree/dev/src/store/modules/"
    click Router "https://github.com/adamant-im/adamant-im/tree/dev/src/router/"
    click i18n "https://github.com/adamant-im/adamant-im/blob/dev/src/i18n.js"
    click Android "https://github.com/adamant-im/adamant-im/tree/dev/android/"
    click Electron "https://github.com/adamant-im/adamant-im/tree/dev/src/electron/"
    click PWA "https://github.com/adamant-im/adamant-im/blob/dev/vite-pwa.config.ts"
    click BlockchainIF "https://github.com/adamant-im/adamant-im/tree/dev/src/lib/adamant-api/"
    click ChatSystem "https://github.com/adamant-im/adamant-im/tree/dev/src/components/AChat/"
    click FileStorage "https://github.com/adamant-im/adamant-im/tree/dev/src/lib/nodes/ipfs/"
    click NodeMgmt "https://github.com/adamant-im/adamant-im/tree/dev/src/lib/nodes/"
    click TxProcess "https://github.com/adamant-im/adamant-im/tree/dev/src/lib/pending-transactions/"
    click BTC "https://github.com/adamant-im/adamant-im/tree/dev/src/store/modules/btc/"
    click ETH "https://github.com/adamant-im/adamant-im/tree/dev/src/store/modules/eth/"
    click DOGE "https://github.com/adamant-im/adamant-im/tree/dev/src/store/modules/doge/"
    click ERC20 "https://github.com/adamant-im/adamant-im/tree/dev/src/store/modules/erc20/"
    click DASH "https://github.com/adamant-im/adamant-im/tree/dev/src/store/modules/dash/"
    click Encryption "https://github.com/adamant-im/adamant-im/blob/dev/src/lib/sodium.d.ts"
```
