@backtest-kit/ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,126 @@
1
+ # 📊 @backtest-kit/ui
2
+
3
+ > Full-stack UI framework for visualizing cryptocurrency trading signals, backtests, and real-time market data. Combines a Node.js backend server with a React dashboard - all in one package.
4
+
5
+ ![bots](https://raw.githubusercontent.com/tripolskypetr/backtest-kit/HEAD/assets/bots.png)
6
+
7
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/tripolskypetr/backtest-kit)
8
+ [![npm](https://img.shields.io/npm/v/@backtest-kit/ui.svg?style=flat-square)](https://npmjs.org/package/@backtest-kit/ui)
9
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue)]()
10
+
11
+ Interactive dashboard for backtest-kit with signal visualization, candle charts, risk analysis, and notification management. Built with React 18, Material-UI, and Lightweight Charts.
12
+
13
+ 📚 **[Backtest Kit Docs](https://backtest-kit.github.io/documents/example_02_first_backtest.html)** | 🌟 **[GitHub](https://github.com/tripolskypetr/backtest-kit)**
14
+
15
+ ## ✨ Features
16
+
17
+ - 📈 **Interactive Charts**: Candlestick visualization with Lightweight Charts (1m, 15m, 1h timeframes)
18
+ - 🎯 **Signal Tracking**: View opened, closed, scheduled, and cancelled signals with full details
19
+ - 📊 **Risk Analysis**: Monitor risk rejections and position management
20
+ - 🔔 **Notifications**: Real-time notification system for all trading events
21
+ - 💹 **Trailing & Breakeven**: Visualize trailing stop/take and breakeven events
22
+ - 🌐 **Multi-Exchange**: Support for 100+ exchanges via CCXT integration
23
+ - 🎨 **Material Design**: Beautiful UI with MUI 5 and Mantine components
24
+ - 🌍 **i18n Ready**: Internationalization support built-in
25
+
26
+ ## 📋 What It Does
27
+
28
+ `@backtest-kit/ui` provides both backend API and frontend dashboard:
29
+
30
+ | Component | Description |
31
+ |-----------|-------------|
32
+ | **`serve()`** | Start HTTP server with REST API endpoints |
33
+ | **`getRouter()`** | Get expressjs-compatible router for custom middleware integration |
34
+
35
+ ## 🚀 Installation
36
+
37
+ ```bash
38
+ npm install @backtest-kit/ui backtest-kit ccxt
39
+ ```
40
+
41
+ ## 📖 Usage
42
+
43
+ ### Quick Start - Launch Dashboard
44
+
45
+ ```typescript
46
+ import { serve } from '@backtest-kit/ui';
47
+
48
+ // Start the UI server
49
+ serve('0.0.0.0', 60050);
50
+
51
+ // Dashboard available at http://localhost:60050
52
+ ```
53
+
54
+ ### Custom Logger Integration
55
+
56
+ ```typescript
57
+ import { setLogger } from '@backtest-kit/ui';
58
+
59
+ setLogger({
60
+ log: (msg) => console.log(`[UI] ${msg}`),
61
+ warn: (msg) => console.warn(`[UI] ${msg}`),
62
+ error: (msg) => console.error(`[UI] ${msg}`),
63
+ });
64
+ ```
65
+
66
+ ## 🖥️ Dashboard Views
67
+
68
+ The frontend provides specialized views for different trading events:
69
+
70
+ | View | Description |
71
+ |------|-------------|
72
+ | **Signal Opened** | Entry details with chart visualization |
73
+ | **Signal Closed** | Exit details with PnL analysis |
74
+ | **Signal Scheduled** | Pending orders awaiting activation |
75
+ | **Signal Cancelled** | Cancelled orders with reasons |
76
+ | **Risk Rejection** | Signals rejected by risk management |
77
+ | **Partial Profit/Loss** | Partial position closures |
78
+ | **Trailing Stop/Take** | Trailing adjustments visualization |
79
+ | **Breakeven** | Breakeven level adjustments |
80
+
81
+ Each view includes:
82
+ - 📋 Detailed information form
83
+ - 📈 1m, 15m, 1h candlestick charts
84
+ - 📥 JSON export for all data
85
+
86
+ ## 💡 Why Use @backtest-kit/ui?
87
+
88
+ Instead of building custom dashboards:
89
+
90
+ **Without backtest-kit**
91
+
92
+ ```typescript
93
+ // ❌ Without @backtest-kit/ui
94
+ // Build your own React app
95
+ // Implement chart components
96
+ // Create signal visualization
97
+ // Handle notifications
98
+ // Write API endpoints
99
+ // ... weeks of development
100
+ ```
101
+
102
+ **With backtest-kit**
103
+
104
+ ```typescript
105
+ // ✅ With @backtest-kit/ui
106
+ import { serve } from '@backtest-kit/ui';
107
+
108
+ serve(); // Full dashboard ready!
109
+ ```
110
+
111
+ **Benefits:**
112
+
113
+ - 📊 Production-ready trading dashboard out of the box
114
+ - 📈 Professional chart visualization with price lines and markers
115
+ - 🔔 Complete notification system for all trading events
116
+ - 🎨 Beautiful Material Design interface
117
+ - ⚡ Fast development - focus on strategy, not UI
118
+ - 🛡️ Full TypeScript support
119
+
120
+ ## 🤝 Contribute
121
+
122
+ Fork/PR on [GitHub](https://github.com/tripolskypetr/backtest-kit).
123
+
124
+ ## 📜 License
125
+
126
+ MIT © [tripolskypetr](https://github.com/tripolskypetr)
package/build/.gitkeep ADDED
File without changes