File size: 18,119 Bytes
4b305d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
00de03b
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Quantum Validator Console</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script>
        tailwind.config = {
            darkMode: 'class',
            theme: {
                extend: {
                    colors: {
                        primary: '#6366f1',
                        secondary: '#10b981'
                    }
                }
            }
        }
    </script>
    <style>
        .json-viewer {
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 0.875rem;
        }
        .timeline-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 2px;
            background: linear-gradient(to bottom, #6366f1, #10b981);
        }
        .glow-border {
            box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen">
    <!-- Header -->
    <header class="border-b border-gray-700 bg-gray-800/50 backdrop-blur-sm sticky top-0 z-50">
        <div class="container mx-auto px-4 py-3">
            <div class="flex items-center justify-between">
                <div class="flex items-center space-x-3">
                    <div class="w-8 h-8 bg-gradient-to-r from-primary to-secondary rounded-lg"></div>
                    <h1 class="text-xl font-bold bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent">
                        Quantum Validator
                    </h1>
                </div>
                <div class="flex items-center space-x-4">
                    <button id="themeToggle" class="p-2 rounded-lg hover:bg-gray-700 transition-colors">
                        <i data-feather="moon"></i>
                    </button>
                    <a href="#" class="text-sm text-gray-400 hover:text-primary transition-colors">
                        Feedback
                    </a>
                </div>
            </div>
        </div>
    </header>

    <div class="container mx-auto px-4 py-8">
        <!-- Hero Section -->
        <div class="text-center mb-12">
            <h2 class="text-4xl md:text-6xl font-bold mb-6 bg-gradient-to-r from-primary via-secondary to-primary bg-clip-text text-transparent">
                Scenario Validator API
            </h2>
            <p class="text-xl text-gray-400 mb-8 max-w-3xl mx-auto">
                A polished, trustworthy console for quantitative traders to validate trade scenarios with clear reasoning trails and validation context.
            </p>
            <div class="flex flex-col sm:flex-row gap-4 justify-center items-center">
                <div class="bg-green-900/20 border border-green-800 rounded-lg px-4 py-2">
                    <span class="text-green-400 flex items-center gap-2">
                        <i data-feather="check-circle" class="w-4 h-4"></i>
                        Status: Operational
                    </span>
                </div>
                <button class="bg-primary hover:bg-primary/80 text-white px-6 py-3 rounded-lg font-semibold transition-colors flex items-center gap-2">
                    <i data-feather="play" class="w-4 h-4"></i>
                    Quick Start
                </button>
            </div>
        </div>

        <!-- Main Content Grid -->
        <div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
            <!-- Side Navigation -->
            <div class="lg:col-span-1">
                <div class="bg-gray-800 rounded-xl p-6 sticky top-24">
                    <nav class="space-y-6">
                        <div>
                            <h3 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-3">
                Health
                            </h3>
                            <ul class="space-y-2">
                                <li>
                                    <a href="#health" class="flex items-center gap-3 p-3 rounded-lg hover:bg-gray-700 transition-colors text-primary">
                                <i data-feather="heart" class="w-4 h-4"></i>
                                Health Check
                            </a>
                                </li>
                            </ul>
                        </div>
                        <div>
                            <h3 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-3">
                Steps
                            </h3>
                            <ul class="space-y-2">
                                <li><a href="#price-action" class="flex items-center gap-3 p-3 rounded-lg hover:bg-gray-700 transition-colors">
                                <i data-feather="trending-up" class="w-4 h-4"></i>
                                Price Action
                            </a></li>
                                <li><a href="#order-flow" class="flex items-center gap-3 p-3 rounded-lg hover:bg-gray-700 transition-colors">
                                <i data-feather="bar-chart-2" class="w-4 h-4"></i>
                                Order Flow
                            </a></li>
                                <li><a href="#session-profile" class="flex items-center gap-3 p-3 rounded-lg hover:bg-gray-700 transition-colors">
                                <i data-feather="layers" class="w-4 h-4"></i>
                                Session Profile
                            </a></li>
                                <li><a href="#confluence" class="flex items-center gap-3 p-3 rounded-lg hover:bg-gray-700 transition-colors">
                                <i data-feather="target" class="w-4 h-4"></i>
                                Confluence
                            </a></li>
                                <li><a href="#strategies" class="flex items-center gap-3 p-3 rounded-lg hover:bg-gray-700 transition-colors">
                                <i data-feather="zap" class="w-4 h-4"></i>
                                Strategies
                            </a></li>
                            </ul>
                        </div>
                        <div>
                            <h3 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-3">
                Pipeline
                            </h3>
                            <ul class="space-y-2">
                                <li><a href="#pipeline-run" class="flex items-center gap-3 p-3 rounded-lg hover:bg-gray-700 transition-colors">
                                <i data-feather="git-merge" class="w-4 h-4"></i>
                                Run Pipeline
                            </a></li>
                            </ul>
                        </div>
                    </nav>
                </div>
            </div>

            <!-- Main Content -->
            <div class="lg:col-span-2 space-y-8">
                <!-- Health Endpoint -->
                <section id="health" class="bg-gray-800 rounded-xl p-6 glow-border">
                    <div class="flex items-center gap-3 mb-4">
                        <div class="w-2 h-6 bg-primary rounded-full"></div>
                        <h3 class="text-2xl font-bold">Health Check</h3>
                        <span class="bg-green-900 text-green-300 px-2 py-1 rounded text-xs font-medium">
                            GET /health
                        </span>
                    </div>
                    <p class="text-gray-400 mb-6">
                        Verify API service status and connectivity.
                    </p>

                    <!-- Tabs -->
                    <div class="border-b border-gray-700 mb-6">
                        <div class="flex space-x-8">
                            <button class="tab-button border-b-2 border-primary text-primary pb-3 font-medium" data-tab="reference">
                        Reference
                    </button>
                            <button class="tab-button text-gray-400 hover:text-white pb-3 font-medium transition-colors" data-tab="tryit">
                        Try It
                    </button>
                            <button class="tab-button text-gray-400 hover:text-white pb-3 font-medium transition-colors" data-tab="schema">
                        Schema
                    </button>
                        </div>
                    </div>

                    <!-- Tab Content -->
                    <div class="tab-content" id="reference">
                        <div class="bg-green-900/20 border border-green-800 rounded-lg p-4 mb-6">
                            <div class="flex items-center gap-2 text-green-400">
                            <i data-feather="check-circle" class="w-4 h-4"></i>
                            <span class="font-semibold">Status: ok</span>
                        </div>
                        <p class="text-gray-400 mb-4">
                            The health endpoint provides a simple status check for the API service. 
                            A successful response indicates the service is operational and ready to process requests.
                        </p>
                    </div>

                    <div class="tab-content hidden" id="tryit">
                        <div class="bg-gray-700 rounded-lg p-4 mb-4">
                            <div class="flex justify-between items-center mb-2">
                                <span class="text-sm font-medium text-gray-300">cURL Example</span>
                                <button class="copy-btn text-xs bg-primary hover:bg-primary/80 text-white px-3 py-1 rounded transition-colors">
                            Copy
                        </button>
                            </div>
                            <pre class="json-viewer text-gray-300 overflow-x-auto"><code>curl -X GET "https://api.quantum-validator.com/health"</code></pre>
                        </div>
                    </div>

                    <div class="tab-content hidden" id="schema">
                        <div class="bg-gray-700 rounded-lg p-4">
                            <pre class="json-viewer text-gray-300"><code>{
  "status": "ok"
}</code></pre>
                        </div>
                    </div>
                </section>

                <!-- Price Action Endpoint -->
                <section id="price-action" class="bg-gray-800 rounded-xl p-6 glow-border">
                    <div class="flex items-center gap-3 mb-4">
                        <div class="w-2 h-6 bg-primary rounded-full"></div>
                        <h3 class="text-2xl font-bold">Price Action Analysis</h3>
                        <span class="bg-primary/20 text-primary px-2 py-1 rounded text-xs font-medium">
                            GET /steps/price-action
                        </span>
                    </div>
                    <p class="text-gray-400 mb-6">
                        Analyze market structures, liquidity pools, and price action diagnostics.
                    </p>

                    <!-- Reasoning Timeline -->
                    <div class="mb-6">
                        <h4 class="text-lg font-semibold mb-4">Reasoning Timeline</h4>
                        <div class="space-y-4">
                            <div class="timeline-item relative pl-6">
                                <div class="bg-gray-700 rounded-lg p-4">
                                    <div class="flex items-center gap-2 mb-2">
                                        <span class="bg-primary text-white px-2 py-1 rounded text-xs">
                                    Step 1
                                </span>
                                        <span class="text-sm font-medium">Market Structure Analysis</span>
                                    </div>
                                    <p class="text-gray-400 text-sm">
                                        Identified key pivot points and displacement patterns across observed timeframes.
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- JSON Viewer -->
                    <div class="bg-gray-700 rounded-lg p-4">
                        <div class="flex justify-between items-center mb-4">
                            <span class="text-sm font-medium text-gray-300">Sample Response</span>
                            <button class="text-xs bg-secondary hover:bg-secondary/80 text-white px-3 py-1 rounded transition-colors">
                            Download JSON
                        </button>
                        </div>
                        <pre class="json-viewer text-gray-300 overflow-x-auto max-h-96"><code>{
  "reasoning": [...],
  "correct_answer": {
    "status": "ok",
    "price_action_diagnostics": {...},
    "market_structures": [...]
  }
}</code></pre>
                    </div>
                </section>
            </div>

            <!-- Right Rail - Glossary -->
            <div class="lg:col-span-1">
                <div class="bg-gray-800 rounded-xl p-6 sticky top-24">
                    <h3 class="text-lg font-semibold mb-4">Glossary</h3>
                    <div class="space-y-4">
                        <div class="bg-gray-700/50 rounded-lg p-4">
                        <h4 class="font-medium text-primary mb-2">BOS</h4>
                        <p class="text-sm text-gray-400">
                            Break of Structure - A significant price movement that changes the market structure.
                        </p>
                    </div>
                    <div class="bg-gray-700/50 rounded-lg p-4">
                        <h4 class="font-medium text-primary mb-2">CHOCH</h4>
                        <p class="text-sm text-gray-400">
                            Change of Character - Indicates potential trend reversal or significant shift.
                        </p>
                    </div>
                    <div class="bg-gray-700/50 rounded-lg p-4">
                        <h4 class="font-medium text-primary mb-2">FVG</h4>
                        <p class="text-sm text-gray-400">
                            Fair Value Gap - An area where price moved rapidly, creating an imbalance.
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="border-t border-gray-700 bg-gray-800/50 mt-12">
        <div class="container mx-auto px-4 py-6">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="text-gray-400 text-sm">
                    © 2024 Quantum Validator Console. All rights reserved.
                </div>
                <div class="flex gap-6 mt-4 md:mt-0">
                    <a href="#" class="text-gray-400 hover:text-primary transition-colors text-sm">
                    API Documentation
                </a>
                    <a href="#" class="text-gray-400 hover:text-primary transition-colors text-sm">
                    GitHub Repository
                </a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // Tab functionality
        document.querySelectorAll('.tab-button').forEach(button => {
            button.addEventListener('click', () => {
                const tabName = button.getAttribute('data-tab');
                
                // Update active tab button
                document.querySelectorAll('.tab-button').forEach(btn => {
                    btn.classList.remove('border-primary', 'text-primary');
                    btn.classList.add('text-gray-400');
                });
                
                button.classList.add('border-primary', 'text-primary');
                button.classList.remove('text-gray-400');
                
                // Show active tab content
                document.querySelectorAll('.tab-content').forEach(content => {
                    content.classList.add('hidden');
                });
                
                document.getElementById(tabName).classList.remove('hidden');
            });
        });

        // Copy functionality
        document.querySelectorAll('.copy-btn').forEach(button => {
            button.addEventListener('click', () => {
                const code = button.parentElement.parentElement.querySelector('code').textContent;
                navigator.clipboard.writeText(code).then(() => {
                    const originalText = button.textContent;
                    button.textContent = 'Copied!';
                    setTimeout(() => {
                        button.textContent = originalText;
                    }, 2000);
                });
            });
        });

        // Theme toggle
        document.getElementById('themeToggle').addEventListener('click', () => {
            document.documentElement.classList.toggle('dark');
            document.documentElement.classList.toggle('light');
        });

        // Smooth scroll for navigation
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                const target = document.querySelector(this.getAttribute('href'));
                if (target) {
                    target.scrollIntoView({
                        behavior: 'smooth',
                        block: 'start'
                    });
                }
            });
        });
    </script>
    <script>feather.replace();</script>
</body>
</html>