# javirassetto/cryptofinance architecture

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

- Interactive diagram: https://gitdiagram.com/javirassetto/cryptofinance
- Repository: https://github.com/javirassetto/cryptofinance

## Overview

##### Project type and purpose
- CryptoFinance is a single-page application (SPA) built with Vue.js 3.
- It functions as a virtual cryptocurrency wallet, letting users view market data, execute buy/sell operations, track transaction history, and analyze investment performance.
- It relies on an external service (CoinGecko API) for live price and coin data.

##### File structure
Top-level files and dirs:
- package.json, babel.config.js, vue.config.js – build and dependency configs
- public/index.html – application shell
- src/ – all application source code
– main.js – Vue app bootstrap
– router/index.js – SPA routing definitions
– store/index.js – Vuex state management
– services/apiService.js – HTTP client for CoinGecko and backend (if any)
– utils/calculatePrice.js – shared business logic
– components/ – reusable UI widgets (alerts, navbar, coin cards, etc.)
– views/ – route-level pages (LoginView, BuyAndSellView, etc.)

##### README for additional insights
- Lists core features: overview dashboard, operations, history, current state, investment analysis.
- Emphasizes integration with CoinGecko API for market data.
- No server-side code present here—pure frontend project.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Browser Layer
    subgraph "Browser Layer"
        browser["User’s Browser"]:::ui
        index["index.html"]:::ui
    end
    browser --> index
    click index "https://github.com/javirassetto/cryptofinance/blob/master/public/index.html"

    %% Frontend Bootstrap
    subgraph "Frontend Bootstrap"
        main["main.js"]:::frontend
    end
    index --> main
    click main "https://github.com/javirassetto/cryptofinance/blob/master/src/main.js"

    %% Routing Layer
    subgraph "Routing"
        router["Vue Router"]:::frontend
    end
    main --> router
    click router "https://github.com/javirassetto/cryptofinance/blob/master/src/router/index.js"

    %% Views and Components Layer
    subgraph "Views & Components"
        subgraph "Views"
            LoginView["LoginView.vue"]:::view
            BuyAndSellView["BuyAndSell.vue"]:::view
            CoinView["CoinView.vue"]:::view
            CurrentStateView["CurrentStateView.vue"]:::view
            InvestmentAnalysisView["InvestmentAnalysisView.vue"]:::view
            MovementHistoryView["MovementHistoryView.vue"]:::view
        end
        subgraph "Components"
            Alert["AlertComponent.vue"]:::component
            Nav["NavComponent.vue"]:::component
            CoinInfo["CoinInfo.vue"]:::component
            BuySellComp["BuyAndSell.vue"]:::component
            CurrentStateComp["CurrentState.vue"]:::component
            InvestmentAnalysisComp["InvestmentAnalysis.vue"]:::component
            LoginComp["LoginComponent.vue"]:::component
            MovementHistoryComp["MovementHistory.vue"]:::component
        end
    end
    click LoginView "https://github.com/javirassetto/cryptofinance/blob/master/src/views/LoginView.vue"
    click BuyAndSellView "https://github.com/javirassetto/cryptofinance/blob/master/src/views/BuyAndSell.vue"
    click CoinView "https://github.com/javirassetto/cryptofinance/blob/master/src/views/CoinView.vue"
    click CurrentStateView "https://github.com/javirassetto/cryptofinance/blob/master/src/views/CurrentStateView.vue"
    click InvestmentAnalysisView "https://github.com/javirassetto/cryptofinance/blob/master/src/views/InvestmentAnalysisView.vue"
    click MovementHistoryView "https://github.com/javirassetto/cryptofinance/blob/master/src/views/MovementHistoryView.vue"
    click Alert "https://github.com/javirassetto/cryptofinance/blob/master/src/components/AlertComponent.vue"
    click Nav "https://github.com/javirassetto/cryptofinance/blob/master/src/components/NavComponent.vue"
    click CoinInfo "https://github.com/javirassetto/cryptofinance/blob/master/src/components/CoinInfo.vue"
    click BuySellComp "https://github.com/javirassetto/cryptofinance/blob/master/src/components/BuyAndSell.vue"
    click CurrentStateComp "https://github.com/javirassetto/cryptofinance/blob/master/src/components/CurrentState.vue"
    click InvestmentAnalysisComp "https://github.com/javirassetto/cryptofinance/blob/master/src/components/InvestmentAnalysis.vue"
    click LoginComp "https://github.com/javirassetto/cryptofinance/blob/master/src/components/LoginComponent.vue"
    click MovementHistoryComp "https://github.com/javirassetto/cryptofinance/blob/master/src/components/MovementHistory.vue"

    router --> LoginView
    router --> BuyAndSellView
    router --> CoinView
    router --> CurrentStateView
    router --> InvestmentAnalysisView
    router --> MovementHistoryView

    %% State Layer
    subgraph "State Layer"
        store["Vuex Store"]:::state
    end
    click store "https://github.com/javirassetto/cryptofinance/blob/master/src/store/index.js"
    LoginView --> store
    BuyAndSellView --> store
    CoinView --> store
    CurrentStateView --> store
    InvestmentAnalysisView --> store
    MovementHistoryView --> store

    %% Service Layer
    subgraph "Service Layer"
        service["apiService.js"]:::service
    end
    click service "https://github.com/javirassetto/cryptofinance/blob/master/src/services/apiService.js"
    store --> service

    %% Business Logic Utility
    subgraph "Business Logic"
        util["calculatePrice.js"]:::util
    end
    click util "https://github.com/javirassetto/cryptofinance/blob/master/src/utils/calculatePrice.js"
    store --> util
    Alert --> util
    Nav --> util
    CoinInfo --> util
    BuySellComp --> util
    CurrentStateComp --> util
    InvestmentAnalysisComp --> util
    LoginComp --> util
    MovementHistoryComp --> util

    %% External Services
    subgraph "External Services"
        coingecko["CoinGecko API"]:::external
    end
    service --> coingecko

    %% Static Assets
    subgraph "Static Assets"
        assets["assets/ folder"]:::assets
    end
    click assets "https://github.com/javirassetto/cryptofinance/tree/master/src/assets/"
    index --> assets

    %% Build & Configurations
    subgraph "Build & Config"
        babel["babel.config.js"]:::config
        vueconf["vue.config.js"]:::config
        pkg["package.json"]:::config
        pkglock["package-lock.json"]:::config
        eslint[".eslintrc.js"]:::config
        prettier[".prettierrc"]:::config
    end
    index --> babel
    index --> vueconf
    index --> pkg

    %% Styles
    classDef ui fill:#f9f,stroke:#333;
    classDef frontend fill:#bbf,stroke:#333;
    classDef view fill:#aff,stroke:#333;
    classDef component fill:#cff,stroke:#333;
    classDef state fill:#bfb,stroke:#333;
    classDef service fill:#fbf,stroke:#333;
    classDef util fill:#ffb,stroke:#333;
    classDef external fill:#fbb,stroke:#333;
    classDef assets fill:#ffd,stroke:#333;
    classDef config fill:#ddd,stroke:#333;
```
