# meet-vasita/cryptocurrency-price-prediction-using-lstm architecture

> Architecture diagram of the GitHub repository meet-vasita/cryptocurrency-price-prediction-using-lstm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/meet-vasita/cryptocurrency-price-prediction-using-lstm
- Repository: https://github.com/meet-vasita/cryptocurrency-price-prediction-using-lstm

## Overview

##### Main Components
- Model & Prediction Engine:
– File: Latest_bit_coin_model.keras holds the pre-trained Keras model.
– Code files: main.py and main.ipynb indicate where data processing, model prediction, and potential training/experimentation take place.
- Data Visualization & Static Assets:
– The static directory includes numerous HTML files showing candlestick, line, grouped bar, and other types of plots for various cryptocurrencies.
– Additional assets like script.js and style.css are used for interactive behavior and styling.
– There’s also a CSV file (e.g., btc-usd_stock_data.csv) that might be used to feed data into these visualizations.
- Web Presentation / UI Layer:
– The views folder contains multiple HTML templates (e.g., home, cryptocurrency, liveprices, marketnews, result) used for the user interface.
– These pages likely combine dynamic data (from backend predictions and visualizations) with static text/images.

##### Relationships and Interactions
- Data Flow:
– Data (stock/cryptocurrency pricing data) is either pre-loaded (CSV in static folder) or fetched from an external source by the prediction engine.
– The prediction engine (in main.py/main.ipynb) loads the pre-trained LSTM model, processes the data, and outputs predictions.
– The results of these predictions are visualized via automatically generated HTML plots (in static folder).
- Web Interface Integration:
– The main.py file could be serving as the application’s controller layer (using a web framework such as Flask or Django) to render views.
– The views use static assets to present data dynamically and might include endpoints that trigger predictions or refresh live data.
- Architectural Pattern:
– The project uses a form of MVC (Model-View-Controller) architecture:
▪ Model: The LSTM model and prediction engine.
▪ View: HTML templates in the views folder and static visualization files.
▪ Controller: The main.py file orchestrates the interaction between the model and view.

##### Important Architectural Patterns & Principles
- Separation of Concerns: By clearly dividing prediction logic (model), static visual assets (charts, CSV), and HTML templates (views), the project maintains well-separated responsibilities.

##### Relevant Technologies / Frameworks
- Python (for main.py and main.ipynb)
- Keras/TensorFlow (for the LSTM model stored as Latest_bit_coin_model.keras)
- HTML, CSS, and JavaScript (for static visualization pages and UI)
- Potential web frameworks (Flask or Django) inferred by the structure of the views folder.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Data Source"
        D1["Crypto Market Data (CSV)"]:::data
    end

    subgraph "Backend / Model Engine"
        B1["Keras Model Loader"]:::backend
        B2["LSTM Predictor"]:::backend
        B3["Jupyter Notebook Experimentation"]:::backend
    end

    subgraph "Web Server / Controller"
        C1["Application Controller"]:::backend
    end

    subgraph "Front-End / UI"
        F1["Static Assets"]:::frontend
        F2["HTML Views/Templates"]:::frontend
    end

    D1 -->|"InputData"| B1
    D1 -->|"InputData"| B2
    B1 -->|"ModelLoaded"| B2
    B2 -->|"PredictionResults"| C1
    C1 -->|"RenderOutput"| F2
    C1 -->|"ProvidesVisualData"| F1
    F1 -->|"InteractiveAssets"| F2

    click B1 "https://github.com/meet-vasita/cryptocurrency-price-prediction-using-lstm/blob/main/Latest_bit_coin_model.keras"
    click C1 "https://github.com/meet-vasita/cryptocurrency-price-prediction-using-lstm/blob/main/main.py"
    click B3 "https://github.com/meet-vasita/cryptocurrency-price-prediction-using-lstm/blob/main/main.ipynb"
    click F1 "https://github.com/meet-vasita/cryptocurrency-price-prediction-using-lstm/tree/main/static/"
    click F2 "https://github.com/meet-vasita/cryptocurrency-price-prediction-using-lstm/tree/main/views/"

    classDef backend fill:#87CEFA,stroke:#1E90FF,stroke-width:2px;
    classDef frontend fill:#90EE90,stroke:#008000,stroke-width:2px;
    classDef data fill:#FFD700,stroke:#FFA500,stroke-width:2px;
```
