# GEMINI.md ## Project Overview **Winterfail Web** is a comprehensive BTC trading dashboard designed for visualization and technical analysis. It features a modular frontend built with modern JavaScript (ES Modules) and a mock backend for development and testing. ### Main Technologies - **Frontend:** Vanilla JavaScript (ES Modules), [Lightweight Charts](https://github.com/tradingview/lightweight-charts) for high-performance charting. - **Backend:** Node.js with Express for a mock API server. - **Styling:** Vanilla CSS with a focus on dark-themed, TradingView-like UI components. - **Dev Tools:** `http-server` for local development. ### Architecture The project follows a modular architecture: - **`js/core/`**: Core logic for data handling and chart management. - **`js/ui/`**: UI components including the main chart, sidebar, indicator panels, and strategy panels. - **`js/indicators/`**: Implementation of various technical indicators (ATR, Bollinger Bands, Hurst, MACD, RSI, etc.). - **`js/strategies/`**: Trading strategy implementations. - **`js/utils/`**: Helper functions for calculations and data formatting. - **`api-server.js`**: A mock API server providing candle data, stats, and technical analysis (TA) signals. ## Building and Running ### Prerequisites - Node.js and npm installed. ### Installation ```powershell # Navigate to the project directory cd winterfail # Install dependencies npm install ``` ### Running the Project The project requires both the API server and the web server to be running. 1. **Start the API Server:** ```powershell node api-server.js ``` *The API server runs on `http://20.20.20.20:8000` (Note: This IP is hardcoded in the current version).* 2. **Start the Web Dashboard:** ```powershell npm start ``` *The dashboard will be available at `http://localhost:3001`.* ### Testing - No explicit test suite was found. Testing is currently performed manually by verifying the dashboard's rendering and indicator calculations. ## Development Conventions ### Coding Style - **Modules:** Uses ES Modules (`import`/`export`). Frontend files should be linked via `