File size: 11,852 Bytes
b190b45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# API Configuration Helper - Visual Guide

## Button Location

The API Configuration Helper button appears in two places:

### 1. Dashboard Header (Top Right)
```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  Enhanced Dashboard                    [πŸ’²] [πŸ”„] [πŸŒ™]   β”‚

β”‚  Real-time Market Data                                  β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

                                           ↑

                                    Config Helper Button

```

### 2. Global Header (All Pages)
```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  ☰  Home                    [πŸ’²] [πŸŒ™] [πŸ””] [βš™οΈ]        β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

                              ↑

                       Config Helper Button

```

## Button Design

The button is a small, circular icon button with:
- **Icon**: Dollar sign (πŸ’²) representing API/services
- **Color**: Teal gradient matching your design system
- **Size**: 20x20px icon, 40x40px clickable area
- **Hover**: Slight scale animation
- **Tooltip**: "API Configuration Guide"

## Modal Layout

When you click the button, a modal opens:

```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  πŸ’² API Configuration Guide                          βœ•  β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚                                                          β”‚

β”‚  Copy and paste these configurations to use our          β”‚

β”‚  services in your application.                           β”‚

β”‚                                                          β”‚

β”‚  Base URL: http://localhost:7860              [Copy]    β”‚

β”‚                                                          β”‚

β”‚  β”Œβ”€ Core Services ────────────────────────────────┐    β”‚

β”‚  β”‚                                                  β”‚    β”‚

β”‚  β”‚  β–Ό Market Data API                              β”‚    β”‚

β”‚  β”‚    Real-time cryptocurrency market data         β”‚    β”‚

β”‚  β”‚                                                  β”‚    β”‚

β”‚  β”‚    Endpoints:                                    β”‚    β”‚

β”‚  β”‚    [GET] /api/market/top          [Copy]        β”‚    β”‚

β”‚  β”‚    [GET] /api/market/trending     [Copy]        β”‚    β”‚

β”‚  β”‚                                                  β”‚    β”‚

β”‚  β”‚    Example Usage:                    [Copy]     β”‚    β”‚

β”‚  β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚    β”‚

β”‚  β”‚    β”‚ fetch('http://localhost:7860/api/... β”‚    β”‚    β”‚

β”‚  β”‚    β”‚   .then(res => res.json())           β”‚    β”‚    β”‚

β”‚  β”‚    β”‚   .then(data => console.log(data));  β”‚    β”‚    β”‚

β”‚  β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚    β”‚

β”‚  β”‚                                                  β”‚    β”‚

β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚

β”‚                                                          β”‚

β”‚  β”Œβ”€ AI Services ──────────────────────────────────┐    β”‚

β”‚  β”‚  β–Ά Sentiment Analysis API                       β”‚    β”‚

β”‚  β”‚  β–Ά AI Models API                                β”‚    β”‚

β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚

β”‚                                                          β”‚

β”‚  β”Œβ”€ Trading Services ─────────────────────────────┐    β”‚

β”‚  β”‚  β–Ά OHLCV Data API                               β”‚    β”‚

β”‚  β”‚  β–Ά Trading & Backtesting API                    β”‚    β”‚

β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚

β”‚                                                          β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

## Interaction Flow

### Step 1: Click Button
```

User clicks [πŸ’²] button

         ↓

Modal slides in with animation

```

### Step 2: Browse Services
```

User sees 10 services organized by category

         ↓

Click on any service to expand

         ↓

See endpoints and examples

```

### Step 3: Copy Configuration
```

User clicks [Copy] button

         ↓

Text copied to clipboard

         ↓

Button shows checkmark βœ“

         ↓

Visual feedback (green color)

```

### Step 4: Use in Code
```

User pastes into their application

         ↓

Configuration works immediately

```

## Color Scheme

The modal uses your existing design system:

```css

Primary Color:   #14b8a6 (Teal)

Secondary:       #2dd4bf (Teal Light)

Background:      #ffffff (White)

Text:            #0f2926 (Dark)

Border:          #e5e7eb (Light Gray)

Success:         #10b981 (Green)

```

## Responsive Design

### Desktop (>768px)
```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  Full modal with all features       β”‚

β”‚  900px max width                    β”‚

β”‚  85vh max height                    β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

### Mobile (<768px)
```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  Compact layout   β”‚

β”‚  Full width       β”‚

β”‚  95vh height      β”‚

β”‚  Stacked items    β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

## Service Categories

The modal organizes services into these categories:

1. **Core Services** (2 services)
   - Market Data API
   - News Aggregator API

2. **AI Services** (2 services)
   - Sentiment Analysis API
   - AI Models API

3. **Trading Services** (2 services)
   - OHLCV Data API
   - Trading & Backtesting API

4. **Advanced Services** (2 services)
   - Multi-Source Fallback API
   - Technical Analysis API

5. **System Services** (2 services)
   - Resources API
   - Real-Time Monitoring API

## Copy Button States

### Normal State
```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  Copy   β”‚  ← Teal background

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

### Hover State
```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  Copy   β”‚  ← Darker teal, slight lift

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

### Copied State
```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚    βœ“    β”‚  ← Green background, checkmark

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

## Example Service Card

```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚  β–Ό Market Data API                                 β”‚

β”‚     Real-time cryptocurrency market data           β”‚

β”‚                                                     β”‚

β”‚  Endpoints:                                         β”‚

β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚

β”‚  β”‚ [GET] /api/market/top                 [Copy] β”‚ β”‚

β”‚  β”‚       Top cryptocurrencies                   β”‚ β”‚

β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚

β”‚  β”‚ [GET] /api/market/trending            [Copy] β”‚ β”‚

β”‚  β”‚       Trending coins                         β”‚ β”‚

β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚

β”‚                                                     β”‚

β”‚  Example Usage:                          [Copy]    β”‚

β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚

β”‚  β”‚ fetch('http://localhost:7860/api/market/top')β”‚ β”‚

β”‚  β”‚   .then(res => res.json())                   β”‚ β”‚

β”‚  β”‚   .then(data => console.log(data));          β”‚ β”‚

β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

## HTTP Method Badges

The modal uses color-coded badges for HTTP methods:

```

[GET]   ← Green badge

[POST]  ← Blue badge

[PUT]   ← Orange badge

[DELETE]← Red badge

```

## Animations

### Modal Open
- Fade in overlay (0.3s)
- Slide down + scale up (0.3s)
- Smooth easing

### Service Expand
- Smooth height transition (0.3s)
- Rotate arrow icon (0.2s)

### Copy Feedback
- Button color change (instant)
- Icon swap (instant)
- Reset after 2 seconds

## Accessibility

The modal is fully accessible:

βœ… **Keyboard Navigation**
- Tab through all interactive elements
- ESC to close modal
- Enter to activate buttons

βœ… **Screen Readers**
- Proper ARIA labels
- Semantic HTML
- Descriptive button text

βœ… **Focus Management**
- Focus trapped in modal
- Focus returns to button on close

## Mobile Experience

On mobile devices:

1. **Button**: Same size, easy to tap
2. **Modal**: Full-screen overlay
3. **Scrolling**: Smooth vertical scroll
4. **Copy**: Native clipboard integration
5. **Close**: Large X button or tap overlay

## Performance

The modal is optimized for performance:

- **Lazy Loading**: Only loads when button is clicked
- **Singleton Pattern**: One instance reused
- **Minimal DOM**: Efficient rendering
- **CSS Animations**: Hardware accelerated

## Browser Support

Tested and working on:

βœ… Chrome 90+
βœ… Firefox 88+
βœ… Safari 14+
βœ… Edge 90+
βœ… Mobile browsers

## Tips for Users

1. **Quick Access**: Button is always visible in header
2. **Copy Everything**: Every URL and code snippet is copyable
3. **Expand as Needed**: Only expand services you need
4. **Mobile Friendly**: Works great on phones and tablets
5. **Always Updated**: Shows current server URL automatically

---

**Visual Design**: Clean, modern, professional
**User Experience**: Intuitive, fast, helpful
**Implementation**: Solid, maintainable, extensible