CRITICAL STOP. You have generated a Frontend Dashboard Simulation. I DO NOT WANT A DASHBOARD. I DO NOT WANT HTML OR JAVASCRIPT.
Browse filesI need the ACTUAL BACKEND LOGIC in PYTHON.
The Requirement: Write the Orchestrator class in Python. This is the engine that runs on the local machine.
Technical Constraints:
Redis: Use redis.asyncio (preferred) or aioredis to poll queue:results and push to queue:tasks.
Neo4j: Use the official neo4j driver. The Orchestrator only Writes to the graph (Promotions) or Reads summaries.
Concurrency: The poll_results() loop must be non-blocking. It should pick up a result, verify it (stub this function), and route it.
State: The Orchestrator does not hold state in memory; it relies on Redis for the hot loop.
Output: A single, complete Python file. No prose.
```
Role: You are a Principal Systems Architect for a High-Frequency Trading firm pivoting to Autonomous Software Generation. You do not write "scripts"; you build fault-tolerant, state-driven engines. You do not explain basic concepts; you implement specifications.
The Objective: I need the scaffolding for a distributed, graph-based coding engine. We are abandoning the "chatbot" paradigm entirely. Software development is not a conversation; it is a search function over a state space.
The Architecture: We are building a Hybrid-Compute State Machine using the following stack:
The Brain (Local LLM - The Orchestrator):
Role: Verification, Scoring, and Routing.
Constraint: Zero heavy generation. It only reads the "Hot State," scores the quality of code, and makes decisions (Promote/Prune/Spawn).
IO: JSON-in, JSON-out. No chat.
The Muscle (Piped/Cloud LLMs - The Workers):
Role: High-volume generation.
Action: They receive a "Task Spec" and return raw AST-compliant code or diffs. They have no memory of the graph; they are stateless functions.
Constraint: Parallel execution. We spawn 5-10 workers simultaneously.
The Nervous System (Redis):
Role: The "Hot" Event Loop.
Usage: Implementation of a Pub/Sub queue.
queue:tasks -> Pending generation jobs (for Piped Models).
queue:results -> Completed code candidates (for Local Model to verify).
The Long-Term Memory (Neo4j):
Role: The "Cold" Ledger.
Usage: Stores the Verification Graph.
Nodes = Verified State Transitions (Passing Tests/Compiles).
Edges = Derivation path.
Crucial: Failed attempts are NOT stored here to prevent graph bloat. They are logged to flat files for training data, then discarded from the graph topology.
The "Gotcha" Mitigations (Must be reflected in code):
Async Decoupling: The Local Orchestrator must NEVER block waiting for the Piped Workers. The system must be fully asynchronous.
Context Economy: The Orchestrator does not read the Neo4j graph directly. It reads a summarized_state object passed from the Redis loop to fit within small context windows.
Your Task: Write the Python scaffolding for the Orchestrator class.
It must include:
The connection to Redis.
The poll_results() method (consuming from Piped workers).
The evaluate_candidate() method (stubbed logic where the Local LLM scores the code).
The update_graph() method (only committing to Neo4j if score > threshold).
Output Constraint: No prose. No "Here is your code" intros. Output the Python code block immediately. Use type hinting.
```
- README.md +7 -4
- components/architecture-diagram.js +317 -0
- components/navbar.js +161 -0
- components/stats-panel.js +316 -0
- components/system-status.js +390 -0
- index.html +165 -19
- script.js +158 -0
- style.css +144 -18
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title: Quantum Code Weaver Engine
|
| 3 |
-
|
| 4 |
-
colorFrom: pink
|
| 5 |
colorTo: pink
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Quantum Code Weaver Engine 🔧
|
| 3 |
+
colorFrom: green
|
|
|
|
| 4 |
colorTo: pink
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
|
@@ -0,0 +1,317 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class ArchitectureDiagram extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.diagram-container {
|
| 7 |
+
background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
|
| 8 |
+
border-radius: 16px;
|
| 9 |
+
padding: 2rem;
|
| 10 |
+
border: 1px solid rgba(6, 182, 212, 0.3);
|
| 11 |
+
position: relative;
|
| 12 |
+
overflow: hidden;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.diagram-grid {
|
| 16 |
+
display: grid;
|
| 17 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 18 |
+
gap: 2rem;
|
| 19 |
+
position: relative;
|
| 20 |
+
z-index: 1;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.component {
|
| 24 |
+
position: relative;
|
| 25 |
+
background: rgba(30, 41, 59, 0.8);
|
| 26 |
+
border-radius: 12px;
|
| 27 |
+
padding: 1.5rem;
|
| 28 |
+
border: 1px solid;
|
| 29 |
+
transition: all 0.3s ease;
|
| 30 |
+
cursor: pointer;
|
| 31 |
+
min-height: 180px;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.component:hover {
|
| 35 |
+
transform: translateY(-5px);
|
| 36 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.brain-component {
|
| 40 |
+
border-color: rgba(6, 182, 212, 0.5);
|
| 41 |
+
background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.05));
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.muscle-component {
|
| 45 |
+
border-color: rgba(139, 92, 246, 0.5);
|
| 46 |
+
background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.nervous-component {
|
| 50 |
+
border-color: rgba(239, 68, 68, 0.5);
|
| 51 |
+
background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.memory-component {
|
| 55 |
+
border-color: rgba(16, 185, 129, 0.5);
|
| 56 |
+
background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.component-header {
|
| 60 |
+
display: flex;
|
| 61 |
+
align-items: center;
|
| 62 |
+
gap: 12px;
|
| 63 |
+
margin-bottom: 1rem;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.component-icon {
|
| 67 |
+
width: 48px;
|
| 68 |
+
height: 48px;
|
| 69 |
+
border-radius: 10px;
|
| 70 |
+
display: flex;
|
| 71 |
+
align-items: center;
|
| 72 |
+
justify-content: center;
|
| 73 |
+
font-size: 1.5rem;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.brain-icon {
|
| 77 |
+
background: linear-gradient(135deg, #06b6d4, #0891b2);
|
| 78 |
+
color: white;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.muscle-icon {
|
| 82 |
+
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
|
| 83 |
+
color: white;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.nervous-icon {
|
| 87 |
+
background: linear-gradient(135deg, #ef4444, #dc2626);
|
| 88 |
+
color: white;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.memory-icon {
|
| 92 |
+
background: linear-gradient(135deg, #10b981, #059669);
|
| 93 |
+
color: white;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.component-title {
|
| 97 |
+
font-size: 1.25rem;
|
| 98 |
+
font-weight: 700;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.component-description {
|
| 102 |
+
color: #94a3b8;
|
| 103 |
+
font-size: 0.875rem;
|
| 104 |
+
line-height: 1.5;
|
| 105 |
+
margin-bottom: 0.5rem;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
.component-stats {
|
| 109 |
+
display: flex;
|
| 110 |
+
justify-content: space-between;
|
| 111 |
+
align-items: center;
|
| 112 |
+
margin-top: 1rem;
|
| 113 |
+
padding-top: 1rem;
|
| 114 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.stat-item {
|
| 118 |
+
display: flex;
|
| 119 |
+
flex-direction: column;
|
| 120 |
+
align-items: center;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.stat-value {
|
| 124 |
+
font-weight: 700;
|
| 125 |
+
font-size: 1.25rem;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.stat-label {
|
| 129 |
+
font-size: 0.75rem;
|
| 130 |
+
color: #94a3b8;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.connections {
|
| 134 |
+
position: absolute;
|
| 135 |
+
top: 0;
|
| 136 |
+
left: 0;
|
| 137 |
+
right: 0;
|
| 138 |
+
bottom: 0;
|
| 139 |
+
pointer-events: none;
|
| 140 |
+
z-index: 0;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.connection-line {
|
| 144 |
+
stroke: rgba(6, 182, 212, 0.3);
|
| 145 |
+
stroke-width: 2;
|
| 146 |
+
stroke-dasharray: 5, 5;
|
| 147 |
+
animation: flow 3s infinite linear;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
@keyframes flow {
|
| 151 |
+
from { stroke-dashoffset: 0; }
|
| 152 |
+
to { stroke-dashoffset: 20; }
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
@media (max-width: 768px) {
|
| 156 |
+
.diagram-grid {
|
| 157 |
+
grid-template-columns: 1fr;
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
</style>
|
| 161 |
+
|
| 162 |
+
<div class="diagram-container">
|
| 163 |
+
<div class="connections">
|
| 164 |
+
<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
|
| 165 |
+
<line class="connection-line" x1="25%" y1="50%" x2="45%" y2="50%"/>
|
| 166 |
+
<line class="connection-line" x1="55%" y1="50%" x2="75%" y2="50%"/>
|
| 167 |
+
<line class="connection-line" x1="40%" y1="50%" x2="40%" y2="80%"/>
|
| 168 |
+
<line class="connection-line" x1="60%" y1="50%" x2="60%" y2="80%"/>
|
| 169 |
+
</svg>
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="diagram-grid">
|
| 173 |
+
<div class="component brain-component" data-component="brain">
|
| 174 |
+
<div class="component-header">
|
| 175 |
+
<div class="component-icon brain-icon">
|
| 176 |
+
<i data-feather="cpu"></i>
|
| 177 |
+
</div>
|
| 178 |
+
<h3 class="component-title">The Brain</h3>
|
| 179 |
+
</div>
|
| 180 |
+
<p class="component-description">
|
| 181 |
+
Local LLM orchestrator scoring and routing code candidates with zero heavy generation.
|
| 182 |
+
</p>
|
| 183 |
+
<div class="component-stats">
|
| 184 |
+
<div class="stat-item">
|
| 185 |
+
<span class="stat-value shimmer-text">JSON Only</span>
|
| 186 |
+
<span class="stat-label">IO Format</span>
|
| 187 |
+
</div>
|
| 188 |
+
<div class="stat-item">
|
| 189 |
+
<span class="stat-value shimmer-text">Async</span>
|
| 190 |
+
<span class="stat-label">Processing</span>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<div class="component muscle-component" data-component="muscle">
|
| 196 |
+
<div class="component-header">
|
| 197 |
+
<div class="component-icon muscle-icon">
|
| 198 |
+
<i data-feather="activity"></i>
|
| 199 |
+
</div>
|
| 200 |
+
<h3 class="component-title">The Muscle</h3>
|
| 201 |
+
</div>
|
| 202 |
+
<p class="component-description">
|
| 203 |
+
Cloud LLM workers generating high-volume, parallel code in AST-compliant format.
|
| 204 |
+
</p>
|
| 205 |
+
<div class="component-stats">
|
| 206 |
+
<div class="stat-item">
|
| 207 |
+
<span class="stat-value shimmer-text">5-10x</span>
|
| 208 |
+
<span class="stat-label">Parallel</span>
|
| 209 |
+
</div>
|
| 210 |
+
<div class="stat-item">
|
| 211 |
+
<span class="stat-value shimmer-text">Stateless</span>
|
| 212 |
+
<span class="stat-label">Workers</span>
|
| 213 |
+
</div>
|
| 214 |
+
</div>
|
| 215 |
+
</div>
|
| 216 |
+
|
| 217 |
+
<div class="component nervous-component" data-component="nervous">
|
| 218 |
+
<div class="component-header">
|
| 219 |
+
<div class="component-icon nervous-icon">
|
| 220 |
+
<i data-feather="radio"></i>
|
| 221 |
+
</div>
|
| 222 |
+
<h3 class="component-title">Nervous System</h3>
|
| 223 |
+
</div>
|
| 224 |
+
<p class="component-description">
|
| 225 |
+
Redis Pub/Sub queues implementing the hot event loop for async decoupling.
|
| 226 |
+
</p>
|
| 227 |
+
<div class="component-stats">
|
| 228 |
+
<div class="stat-item">
|
| 229 |
+
<span class="stat-value shimmer-text">Pub/Sub</span>
|
| 230 |
+
<span class="stat-label">Pattern</span>
|
| 231 |
+
</div>
|
| 232 |
+
<div class="stat-item">
|
| 233 |
+
<span class="stat-value shimmer-text">Real-time</span>
|
| 234 |
+
<span class="stat-label">Events</span>
|
| 235 |
+
</div>
|
| 236 |
+
</div>
|
| 237 |
+
</div>
|
| 238 |
+
|
| 239 |
+
<div class="component memory-component" data-component="memory">
|
| 240 |
+
<div class="component-header">
|
| 241 |
+
<div class="component-icon memory-icon">
|
| 242 |
+
<i data-feather="database"></i>
|
| 243 |
+
</div>
|
| 244 |
+
<h3 class="component-title">Long-Term Memory</h3>
|
| 245 |
+
</div>
|
| 246 |
+
<p class="component-description">
|
| 247 |
+
Neo4j verification graph storing only successful state transitions.
|
| 248 |
+
</p>
|
| 249 |
+
<div class="component-stats">
|
| 250 |
+
<div class="stat-item">
|
| 251 |
+
<span class="stat-value shimmer-text">Verified</span>
|
| 252 |
+
<span class="stat-label">Only</span>
|
| 253 |
+
</div>
|
| 254 |
+
<div class="stat-item">
|
| 255 |
+
<span class="stat-value shimmer-text">Graph DB</span>
|
| 256 |
+
<span class="stat-label">Storage</span>
|
| 257 |
+
</div>
|
| 258 |
+
</div>
|
| 259 |
+
</div>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
`;
|
| 263 |
+
|
| 264 |
+
// Add event listeners to components
|
| 265 |
+
setTimeout(() => {
|
| 266 |
+
this.shadowRoot.querySelectorAll('.component').forEach(component => {
|
| 267 |
+
component.addEventListener('click', () => {
|
| 268 |
+
const compType = component.getAttribute('data-component');
|
| 269 |
+
this.showComponentDetails(compType);
|
| 270 |
+
});
|
| 271 |
+
});
|
| 272 |
+
|
| 273 |
+
// Replace feather icons
|
| 274 |
+
if (window.feather) {
|
| 275 |
+
feather.replace();
|
| 276 |
+
}
|
| 277 |
+
}, 100);
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
showComponentDetails(componentType) {
|
| 281 |
+
const details = {
|
| 282 |
+
'brain': {
|
| 283 |
+
title: 'The Brain - Orchestrator',
|
| 284 |
+
description: 'Local LLM responsible for verification, scoring, and routing. Works only with summarized state objects to maintain context economy.',
|
| 285 |
+
attributes: ['Zero heavy generation', 'JSON-in/JSON-out only', 'Hot state processing', 'Promote/Prune/Spawn decisions']
|
| 286 |
+
},
|
| 287 |
+
'muscle': {
|
| 288 |
+
title: 'The Muscle - Workers',
|
| 289 |
+
description: 'Stateless cloud LLM functions that receive Task Specs and return raw AST-compliant code or diffs.',
|
| 290 |
+
attributes: ['Parallel execution (5-10 workers)', 'No memory of graph', 'High-volume generation', 'Stateless functions']
|
| 291 |
+
},
|
| 292 |
+
'nervous': {
|
| 293 |
+
title: 'Nervous System - Redis',
|
| 294 |
+
description: 'Implements the Hot Event Loop using Pub/Sub queues to decouple orchestrator from workers.',
|
| 295 |
+
attributes: ['queue:tasks for pending jobs', 'queue:results for candidates', 'Fully async processing', 'Context summarization']
|
| 296 |
+
},
|
| 297 |
+
'memory': {
|
| 298 |
+
title: 'Long-Term Memory - Neo4j',
|
| 299 |
+
description: 'Stores the Verification Graph containing only verified state transitions that pass tests/compiles.',
|
| 300 |
+
attributes: ['Nodes = Verified states', 'Edges = Derivation paths', 'No failed attempts', 'Prevents graph bloat']
|
| 301 |
+
}
|
| 302 |
+
};
|
| 303 |
+
|
| 304 |
+
const detail = details[componentType];
|
| 305 |
+
if (detail) {
|
| 306 |
+
const alertHtml = `
|
| 307 |
+
<strong>${detail.title}</strong><br><br>
|
| 308 |
+
${detail.description}<br><br>
|
| 309 |
+
<strong>Key Attributes:</strong><br>
|
| 310 |
+
${detail.attributes.map(att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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
nav {
|
| 7 |
+
background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
|
| 8 |
+
backdrop-filter: blur(10px);
|
| 9 |
+
border-bottom: 1px solid rgba(6, 182, 212, 0.2);
|
| 10 |
+
position: sticky;
|
| 11 |
+
top: 0;
|
| 12 |
+
z-index: 1000;
|
| 13 |
+
padding: 1rem 0;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.nav-container {
|
| 17 |
+
max-width: 1200px;
|
| 18 |
+
margin: 0 auto;
|
| 19 |
+
padding: 0 1rem;
|
| 20 |
+
display: flex;
|
| 21 |
+
justify-content: space-between;
|
| 22 |
+
align-items: center;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.logo {
|
| 26 |
+
display: flex;
|
| 27 |
+
align-items: center;
|
| 28 |
+
gap: 12px;
|
| 29 |
+
text-decoration: none;
|
| 30 |
+
color: white;
|
| 31 |
+
font-weight: 700;
|
| 32 |
+
font-size: 1.5rem;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.logo-icon {
|
| 36 |
+
width: 40px;
|
| 37 |
+
height: 40px;
|
| 38 |
+
background: linear-gradient(45deg, #06b6d4, #8b5cf6);
|
| 39 |
+
border-radius: 10px;
|
| 40 |
+
display: flex;
|
| 41 |
+
align-items: center;
|
| 42 |
+
justify-content: center;
|
| 43 |
+
animation: pulse 2s infinite;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
@keyframes pulse {
|
| 47 |
+
0%, 100% { transform: scale(1); }
|
| 48 |
+
50% { transform: scale(1.05); }
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.logo-text {
|
| 52 |
+
background: linear-gradient(45deg, #06b6d4, #8b5cf6);
|
| 53 |
+
background-clip: text;
|
| 54 |
+
-webkit-background-clip: text;
|
| 55 |
+
color: transparent;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.nav-links {
|
| 59 |
+
display: flex;
|
| 60 |
+
gap: 2rem;
|
| 61 |
+
align-items: center;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.nav-link {
|
| 65 |
+
color: #cbd5e1;
|
| 66 |
+
text-decoration: none;
|
| 67 |
+
font-weight: 500;
|
| 68 |
+
transition: all 0.3s ease;
|
| 69 |
+
padding: 0.5rem 1rem;
|
| 70 |
+
border-radius: 6px;
|
| 71 |
+
display: flex;
|
| 72 |
+
align-items: center;
|
| 73 |
+
gap: 8px;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.nav-link:hover {
|
| 77 |
+
color: white;
|
| 78 |
+
background: rgba(6, 182, 212, 0.1);
|
| 79 |
+
transform: translateY(-2px);
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.nav-link i {
|
| 83 |
+
width: 18px;
|
| 84 |
+
height: 18px;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.system-indicator {
|
| 88 |
+
display: flex;
|
| 89 |
+
align-items: center;
|
| 90 |
+
gap: 8px;
|
| 91 |
+
padding: 0.5rem 1rem;
|
| 92 |
+
background: rgba(16, 185, 129, 0.1);
|
| 93 |
+
border-radius: 6px;
|
| 94 |
+
font-size: 0.875rem;
|
| 95 |
+
color: #10b981;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
.indicator-dot {
|
| 99 |
+
width: 8px;
|
| 100 |
+
height: 8px;
|
| 101 |
+
background: #10b981;
|
| 102 |
+
border-radius: 50%;
|
| 103 |
+
animation: pulse 2s infinite;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
@media (max-width: 768px) {
|
| 107 |
+
.nav-links {
|
| 108 |
+
display: none;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.mobile-menu-btn {
|
| 112 |
+
display: block;
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
</style>
|
| 116 |
+
|
| 117 |
+
<nav>
|
| 118 |
+
<div class="nav-container">
|
| 119 |
+
<a href="/" class="logo">
|
| 120 |
+
<div class="logo-icon">
|
| 121 |
+
<i data-feather="cpu"></i>
|
| 122 |
+
</div>
|
| 123 |
+
<span class="logo-text">QCWE</span>
|
| 124 |
+
</a>
|
| 125 |
+
|
| 126 |
+
<div class="nav-links">
|
| 127 |
+
<a href="/" class="nav-link">
|
| 128 |
+
<i data-feather="home"></i>
|
| 129 |
+
Dashboard
|
| 130 |
+
</a>
|
| 131 |
+
<a href="/graph" class="nav-link">
|
| 132 |
+
<i data-feather="git-merge"></i>
|
| 133 |
+
Graph Explorer
|
| 134 |
+
</a>
|
| 135 |
+
<a href="/workers" class="nav-link">
|
| 136 |
+
<i data-feather="activity"></i>
|
| 137 |
+
Worker Monitor
|
| 138 |
+
</a>
|
| 139 |
+
<a href="/settings" class="nav-link">
|
| 140 |
+
<i data-feather="settings"></i>
|
| 141 |
+
Settings
|
| 142 |
+
</a>
|
| 143 |
+
<div class="system-indicator">
|
| 144 |
+
<span class="indicator-dot"></span>
|
| 145 |
+
<span>System Operational</span>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
</div>
|
| 149 |
+
</nav>
|
| 150 |
+
`;
|
| 151 |
+
|
| 152 |
+
// Feather icons need to be replaced after insertion
|
| 153 |
+
setTimeout(() => {
|
| 154 |
+
if (window.feather) {
|
| 155 |
+
feather.replace();
|
| 156 |
+
}
|
| 157 |
+
}, 100);
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
customElements.define('custom-navbar', CustomNavbar);
|
|
@@ -0,0 +1,316 @@
|
|
|
|
|
|
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grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 9 |
+
gap: 1.5rem;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
.stat-card {
|
| 13 |
+
background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
|
| 14 |
+
border-radius: 12px;
|
| 15 |
+
padding: 1.5rem;
|
| 16 |
+
border: 1px solid;
|
| 17 |
+
position: relative;
|
| 18 |
+
overflow: hidden;
|
| 19 |
+
transition: all 0.3s ease;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.stat-card:hover {
|
| 23 |
+
transform: translateY(-3px);
|
| 24 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.stat-card::before {
|
| 28 |
+
content: '';
|
| 29 |
+
position: absolute;
|
| 30 |
+
top: 0;
|
| 31 |
+
left: 0;
|
| 32 |
+
right: 0;
|
| 33 |
+
height: 3px;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.queue-card::before {
|
| 37 |
+
background: linear-gradient(90deg, #f59e0b, #fbbf24);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.workers-card::before {
|
| 41 |
+
background: linear-gradient(90deg, #06b6d4, #0891b2);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.graph-card::before {
|
| 45 |
+
background: linear-gradient(90deg, #10b981, #34d399);
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.performance-card::before {
|
| 49 |
+
background: linear-gradient(90deg, #8b5cf6, #7c3aed);
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.stat-header {
|
| 53 |
+
display: flex;
|
| 54 |
+
justify-content: space-between;
|
| 55 |
+
align-items: center;
|
| 56 |
+
margin-bottom: 1rem;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.stat-title {
|
| 60 |
+
font-size: 0.875rem;
|
| 61 |
+
color: #94a3b8;
|
| 62 |
+
font-weight: 600;
|
| 63 |
+
text-transform: uppercase;
|
| 64 |
+
letter-spacing: 0.05em;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.stat-icon {
|
| 68 |
+
width: 36px;
|
| 69 |
+
height: 36px;
|
| 70 |
+
border-radius: 8px;
|
| 71 |
+
display: flex;
|
| 72 |
+
align-items: center;
|
| 73 |
+
justify-content: center;
|
| 74 |
+
color: white;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.queue-icon {
|
| 78 |
+
background: linear-gradient(45deg, #f59e0b, #fbbf24);
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.workers-icon {
|
| 82 |
+
background: linear-gradient(45deg, #06b6d4, #0891b2);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.graph-icon {
|
| 86 |
+
background: linear-gradient(45deg, #10b981, #34d399);
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.performance-icon {
|
| 90 |
+
background: linear-gradient(45deg, #8b5cf6, #7c3aed);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.stat-value {
|
| 94 |
+
font-size: 2.5rem;
|
| 95 |
+
font-weight: 800;
|
| 96 |
+
margin-bottom: 0.5rem;
|
| 97 |
+
background: linear-gradient(45deg, #ffffff, #cbd5e1);
|
| 98 |
+
background-clip: text;
|
| 99 |
+
-webkit-background-clip: text;
|
| 100 |
+
color: transparent;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.stat-value.small {
|
| 104 |
+
font-size: 2rem;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.stat-change {
|
| 108 |
+
display: flex;
|
| 109 |
+
align-items: center;
|
| 110 |
+
gap: 4px;
|
| 111 |
+
font-size: 0.875rem;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.change-positive {
|
| 115 |
+
color: #10b981;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.change-negative {
|
| 119 |
+
color: #ef4444;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.stat-description {
|
| 123 |
+
font-size: 0.875rem;
|
| 124 |
+
color: #94a3b8;
|
| 125 |
+
margin-top: 0.5rem;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.progress-bar {
|
| 129 |
+
height: 6px;
|
| 130 |
+
background: rgba(255, 255, 255, 0.1);
|
| 131 |
+
border-radius: 3px;
|
| 132 |
+
margin-top: 1rem;
|
| 133 |
+
overflow: hidden;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.progress-fill {
|
| 137 |
+
height: 100%;
|
| 138 |
+
border-radius: 3px;
|
| 139 |
+
transition: width 1s ease;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
.queue-progress {
|
| 143 |
+
background: linear-gradient(90deg, #f59e0b, #fbbf24);
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.performance-progress {
|
| 147 |
+
background: linear-gradient(90deg, #8b5cf6, #7c3aed);
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
.workers-progress {
|
| 151 |
+
background: linear-gradient(90deg, #06b6d4, #0891b2);
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
@media (max-width: 768px) {
|
| 155 |
+
.stats-container {
|
| 156 |
+
grid-template-columns: 1fr;
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
</style>
|
| 160 |
+
|
| 161 |
+
<div class="stats-container">
|
| 162 |
+
<div class="stat-card queue-card">
|
| 163 |
+
<div class="stat-header">
|
| 164 |
+
<div class="stat-title">Task Queue Status</div>
|
| 165 |
+
<div class="stat-icon queue-icon">
|
| 166 |
+
<i data-feather="layers"></i>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
<div class="stat-value" id="queue-tasks">87</div>
|
| 170 |
+
<div class="stat-change change-positive">
|
| 171 |
+
<i data-feather="trending-up"></i>
|
| 172 |
+
<span>+12%</span>
|
| 173 |
+
</div>
|
| 174 |
+
<div class="progress-bar">
|
| 175 |
+
<div class="progress-fill queue-progress" style="width: 65%"></div>
|
| 176 |
+
</div>
|
| 177 |
+
<div class="stat-description">
|
| 178 |
+
Pending tasks waiting for worker assignment
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<div class="stat-card workers-card">
|
| 183 |
+
<div class="stat-header">
|
| 184 |
+
<div class="stat-title">Active Workers</div>
|
| 185 |
+
<div class="stat-icon workers-icon">
|
| 186 |
+
<i data-feather="cpu"></i>
|
| 187 |
+
</div>
|
| 188 |
+
</div>
|
| 189 |
+
<div class="stat-value" id="workers-active">8</div>
|
| 190 |
+
<div class="stat-change change-positive">
|
| 191 |
+
<i data-feather="zap"></i>
|
| 192 |
+
<span>2 online</span>
|
| 193 |
+
</div>
|
| 194 |
+
<div class="progress-bar">
|
| 195 |
+
<div class="progress-fill workers-progress" style="width: 80%"></div>
|
| 196 |
+
</div>
|
| 197 |
+
<div class="stat-description">
|
| 198 |
+
Parallel workers processing code generation
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
<div class="stat-card graph-card">
|
| 203 |
+
<div class="stat-header">
|
| 204 |
+
<div class="stat-title">Verified States</div>
|
| 205 |
+
<div class="stat-icon graph-icon">
|
| 206 |
+
<i data-feather="git-merge"></i>
|
| 207 |
+
</div>
|
| 208 |
+
</div>
|
| 209 |
+
<div class="stat-value small" id="verified-states">1,247</div>
|
| 210 |
+
<div class="stat-change change-positive">
|
| 211 |
+
<i data-feather="activity"></i>
|
| 212 |
+
<span>+42 today</span>
|
| 213 |
+
</div>
|
| 214 |
+
<div class="progress-bar">
|
| 215 |
+
<div class="progress-fill workers-progress" style="width: 38%"></div>
|
| 216 |
+
</div>
|
| 217 |
+
<div class="stat-description">
|
| 218 |
+
Successful transitions stored in Neo4j graph
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
|
| 222 |
+
<div class="stat-card performance-card">
|
| 223 |
+
<div class="stat-header">
|
| 224 |
+
<div class="stat-title">Avg. Score</div>
|
| 225 |
+
<div class="stat-icon performance-icon">
|
| 226 |
+
<i data-feather="bar-chart-2"></i>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
<div class="stat-value" id="avg-score">92.4%</div>
|
| 230 |
+
<div class="stat-change change-positive">
|
| 231 |
+
<i data-feather="trending-up"></i>
|
| 232 |
+
<span>+1.2%</span>
|
| 233 |
+
</div>
|
| 234 |
+
<div class="progress-bar">
|
| 235 |
+
<div class="progress-fill performance-progress" style="width: 92%"></div>
|
| 236 |
+
</div>
|
| 237 |
+
<div class="stat-description">
|
| 238 |
+
Average verification score from LLM orchestrator
|
| 239 |
+
</div>
|
| 240 |
+
</div>
|
| 241 |
+
</div>
|
| 242 |
+
`;
|
| 243 |
+
|
| 244 |
+
// Initialize with random values
|
| 245 |
+
setTimeout(() => {
|
| 246 |
+
this.initializeStats();
|
| 247 |
+
|
| 248 |
+
// Update stats every 5 seconds
|
| 249 |
+
setInterval(() => {
|
| 250 |
+
this.updateStats();
|
| 251 |
+
}, 5000);
|
| 252 |
+
|
| 253 |
+
// Replace feather icons
|
| 254 |
+
if (window.feather) {
|
| 255 |
+
feather.replace();
|
| 256 |
+
}
|
| 257 |
+
}, 100);
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
initializeStats() {
|
| 261 |
+
const stats = {
|
| 262 |
+
'queue-tasks': Math.floor(Math.random() * 100),
|
| 263 |
+
'workers-active': Math.floor(Math.random() * 8) + 2,
|
| 264 |
+
'verified-states': 1247 + Math.floor(Math.random() * 50),
|
| 265 |
+
'avg-score': (Math.random() * 5 + 90).toFixed(1)
|
| 266 |
+
};
|
| 267 |
+
|
| 268 |
+
Object.keys(stats).forEach(id => {
|
| 269 |
+
const el = this.shadowRoot.getElementById(id);
|
| 270 |
+
if (el) {
|
| 271 |
+
el.textContent = stats[id];
|
| 272 |
+
}
|
| 273 |
+
});
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
updateStats() {
|
| 277 |
+
// Simulate stat updates
|
| 278 |
+
const stats = {
|
| 279 |
+
'queue-tasks': Math.max(0, Math.floor(Math.random() * 120)),
|
| 280 |
+
'workers-active': Math.max(2, Math.floor(Math.random() * 10)),
|
| 281 |
+
'verified-states': 1247 + Math.floor(Math.random() * 100),
|
| 282 |
+
'avg-score': (Math.random() * 5 + 90).toFixed(1)
|
| 283 |
+
};
|
| 284 |
+
|
| 285 |
+
Object.keys(stats).forEach(id => {
|
| 286 |
+
const el = this.shadowRoot.getElementById(id);
|
| 287 |
+
if (el) {
|
| 288 |
+
// Animate the change
|
| 289 |
+
const oldValue = parseInt(el.textContent.replace(/[^0-9.-]+/g, ""));
|
| 290 |
+
const newValue = parseInt(stats[id].toString().replace(/[^0-9.-]+/g, ""));
|
| 291 |
+
|
| 292 |
+
if (oldValue !== newValue) {
|
| 293 |
+
el.style.transform = 'scale(1.1)';
|
| 294 |
+
el.style.color = newValue > oldValue ? '#10b981' : '#ef4444';
|
| 295 |
+
|
| 296 |
+
setTimeout(() => {
|
| 297 |
+
el.textContent = stats[id];
|
| 298 |
+
el.style.transform = 'scale(1)';
|
| 299 |
+
setTimeout(() => {
|
| 300 |
+
el.style.color = '';
|
| 301 |
+
}, 1000);
|
| 302 |
+
}, 300);
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
});
|
| 306 |
+
|
| 307 |
+
// Update progress bars
|
| 308 |
+
const progressBars = this.shadowRoot.querySelectorAll('.progress-fill');
|
| 309 |
+
progressBars.forEach((bar, index) => {
|
| 310 |
+
const newWidth = Math.floor(Math.random() * 30 + 60);
|
| 311 |
+
bar.style.width = `${newWidth}%`;
|
| 312 |
+
});
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
customElements.define('stats-panel', StatsPanel);
|
|
@@ -0,0 +1,390 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class SystemStatus extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.status-container {
|
| 7 |
+
display: grid;
|
| 8 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 9 |
+
gap: 1.5rem;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
.status-item {
|
| 13 |
+
background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
|
| 14 |
+
border-radius: 12px;
|
| 15 |
+
padding: 1.5rem;
|
| 16 |
+
border: 1px solid;
|
| 17 |
+
display: flex;
|
| 18 |
+
flex-direction: column;
|
| 19 |
+
transition: all 0.3s ease;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.status-item:hover {
|
| 23 |
+
transform: translateY(-3px);
|
| 24 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.status-item.operational {
|
| 28 |
+
border-color: rgba(16, 185, 129, 0.5);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.status-item.degraded {
|
| 32 |
+
border-color: rgba(245, 158, 11, 0.5);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.status-item.offline {
|
| 36 |
+
border-color: rgba(239, 68, 68, 0.5);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.status-header {
|
| 40 |
+
display: flex;
|
| 41 |
+
justify-content: space-between;
|
| 42 |
+
align-items: center;
|
| 43 |
+
margin-bottom: 1rem;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.status-title {
|
| 47 |
+
font-size: 1.125rem;
|
| 48 |
+
font-weight: 600;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.status-badge {
|
| 52 |
+
padding: 0.25rem 0.75rem;
|
| 53 |
+
border-radius: 9999px;
|
| 54 |
+
font-size: 0.75rem;
|
| 55 |
+
font-weight: 600;
|
| 56 |
+
text-transform: uppercase;
|
| 57 |
+
letter-spacing: 0.05em;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.status-operational .status-badge {
|
| 61 |
+
background: rgba(16, 185, 129, 0.2);
|
| 62 |
+
color: #10b981;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.status-degraded .status-badge {
|
| 66 |
+
background: rgba(245, 158, 11, 0.2);
|
| 67 |
+
color: #f59e0b;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.status-offline .status-badge {
|
| 71 |
+
background: rgba(239, 68, 68, 0.2);
|
| 72 |
+
color: #ef4444;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.status-content {
|
| 76 |
+
flex: 1;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.status-description {
|
| 80 |
+
color: #94a3b8;
|
| 81 |
+
font-size: 0.875rem;
|
| 82 |
+
line-height: 1.5;
|
| 83 |
+
margin-bottom: 1rem;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.status-metrics {
|
| 87 |
+
display: flex;
|
| 88 |
+
gap: 1rem;
|
| 89 |
+
margin-bottom: 1rem;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.metric {
|
| 93 |
+
flex: 1;
|
| 94 |
+
text-align: center;
|
| 95 |
+
padding: 0.5rem;
|
| 96 |
+
background: rgba(255, 255, 255, 0.05);
|
| 97 |
+
border-radius: 6px;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
.metric-value {
|
| 101 |
+
font-size: 1.5rem;
|
| 102 |
+
font-weight: 700;
|
| 103 |
+
margin-bottom: 0.25rem;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.metric-label {
|
| 107 |
+
font-size: 0.75rem;
|
| 108 |
+
color: #94a3b8;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.status-footer {
|
| 112 |
+
display: flex;
|
| 113 |
+
justify-content: space-between;
|
| 114 |
+
align-items: center;
|
| 115 |
+
padding-top: 1rem;
|
| 116 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.uptime {
|
| 120 |
+
font-size: 0.875rem;
|
| 121 |
+
color: #94a3b8;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.details-btn {
|
| 125 |
+
padding: 0.5rem 1rem;
|
| 126 |
+
border-radius: 6px;
|
| 127 |
+
font-size: 0.875rem;
|
| 128 |
+
font-weight: 500;
|
| 129 |
+
cursor: pointer;
|
| 130 |
+
transition: all 0.3s ease;
|
| 131 |
+
border: 1px solid;
|
| 132 |
+
background: transparent;
|
| 133 |
+
color: inherit;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.status-operational .details-btn {
|
| 137 |
+
border-color: rgba(16, 185, 129, 0.5);
|
| 138 |
+
color: #10b981;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.status-degraded .details-btn {
|
| 142 |
+
border-color: rgba(245, 158, 11, 0.5);
|
| 143 |
+
color: #f59e0b;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.status-offline .details-btn {
|
| 147 |
+
border-color: rgba(239, 68, 68, 0.5);
|
| 148 |
+
color: #ef4444;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.details-btn:hover {
|
| 152 |
+
transform: translateY(-2px);
|
| 153 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
@media (max-width: 768px) {
|
| 157 |
+
.status-container {
|
| 158 |
+
grid-template-columns: 1fr;
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
</style>
|
| 162 |
+
|
| 163 |
+
<div class="status-container">
|
| 164 |
+
<div class="status-item operational" data-system="orchestrator">
|
| 165 |
+
<div class="status-header">
|
| 166 |
+
<h3 class="status-title">Orchestrator</h3>
|
| 167 |
+
<span class="status-badge">Operational</span>
|
| 168 |
+
</div>
|
| 169 |
+
<div class="status-content">
|
| 170 |
+
<p class="status-description">
|
| 171 |
+
The Brain - Local LLM orchestrator responsible for verification, scoring, and routing decisions.
|
| 172 |
+
</p>
|
| 173 |
+
<div class="status-metrics">
|
| 174 |
+
<div class="metric">
|
| 175 |
+
<div class="metric-value" id="candidates-scored">1,248</div>
|
| 176 |
+
<div class="metric-label">Candidates Scored</div>
|
| 177 |
+
</div>
|
| 178 |
+
<div class="metric">
|
| 179 |
+
<div class="metric-value" id="avg-response">42ms</div>
|
| 180 |
+
<div class="metric-label">Avg Response</div>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
</div>
|
| 184 |
+
<div class="status-footer">
|
| 185 |
+
<span class="uptime">Uptime: 99.8%</span>
|
| 186 |
+
<button class="details-btn">View Details</button>
|
| 187 |
+
</div>
|
| 188 |
+
</div>
|
| 189 |
+
|
| 190 |
+
<div class="status-item operational" data-system="workers">
|
| 191 |
+
<div class="status-header">
|
| 192 |
+
<h3 class="status-title">Worker Pool</h3>
|
| 193 |
+
<span class="status-badge">Operational</span>
|
| 194 |
+
</div>
|
| 195 |
+
<div class="status-content">
|
| 196 |
+
<p class="status-description">
|
| 197 |
+
The Muscle - Cloud LLM workers generating parallel code with stateless execution.
|
| 198 |
+
</p>
|
| 199 |
+
<div class="status-metrics">
|
| 200 |
+
<div class="metric">
|
| 201 |
+
<div class="metric-value" id="active-workers">8/10</div>
|
| 202 |
+
<div class="metric-label">Active Workers</div>
|
| 203 |
+
</div>
|
| 204 |
+
<div class="metric">
|
| 205 |
+
<div class="metric-value" id="tasks-completed">987</div>
|
| 206 |
+
<div class="metric-label">Tasks Completed</div>
|
| 207 |
+
</div>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
<div class="status-footer">
|
| 211 |
+
<span class="uptime">Load: 65%</span>
|
| 212 |
+
<button class="details-btn">View Details</button>
|
| 213 |
+
</div>
|
| 214 |
+
</div>
|
| 215 |
+
|
| 216 |
+
<div class="status-item operational" data-system="redis">
|
| 217 |
+
<div class="status-header">
|
| 218 |
+
<h3 class="status-title">Redis Queues</h3>
|
| 219 |
+
<span class="status-badge">Operational</span>
|
| 220 |
+
</div>
|
| 221 |
+
<div class="status-content">
|
| 222 |
+
<p class="status-description">
|
| 223 |
+
The Nervous System - Pub/Sub message queues handling async decoupling between components.
|
| 224 |
+
</p>
|
| 225 |
+
<div class="status-metrics">
|
| 226 |
+
<div class="metric">
|
| 227 |
+
<div class="metric-value" id="queue-size">87</div>
|
| 228 |
+
<div class="metric-label">Queue Size</div>
|
| 229 |
+
</div>
|
| 230 |
+
<div class="metric">
|
| 231 |
+
<div class="metric-value" id="msg-rate">342/s</div>
|
| 232 |
+
<div class="metric-label">Msg Rate</div>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
<div class="status-footer">
|
| 237 |
+
<span class="uptime">Latency: <5ms</span>
|
| 238 |
+
<button class="details-btn">View Details</button>
|
| 239 |
+
</div>
|
| 240 |
+
</div>
|
| 241 |
+
|
| 242 |
+
<div class="status-item degraded status-degraded" data-system="neo4j">
|
| 243 |
+
<div class="status-header">
|
| 244 |
+
<h3 class="status-title">Neo4j Graph</h3>
|
| 245 |
+
<span class="status-badge">Degraded</span>
|
| 246 |
+
</div>
|
| 247 |
+
<div class="status-content">
|
| 248 |
+
<p class="status-description">
|
| 249 |
+
The Long-Term Memory - Verification graph storage experiencing higher than normal latency.
|
| 250 |
+
</p>
|
| 251 |
+
<div class="status-metrics">
|
| 252 |
+
<div class="metric">
|
| 253 |
+
<div class="metric-value" id="graph-nodes">1,247</div>
|
| 254 |
+
<div class="metric-label">Total Nodes</div>
|
| 255 |
+
</div>
|
| 256 |
+
<div class="metric">
|
| 257 |
+
<div class="metric-value" id="query-latency">128ms</div>
|
| 258 |
+
<div class="metric-label">Query Latency</div>
|
| 259 |
+
</div>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
<div class="status-footer">
|
| 263 |
+
<span class="uptime">Performance: 85%</span>
|
| 264 |
+
<button class="details-btn">View Details</button>
|
| 265 |
+
</div>
|
| 266 |
+
</div>
|
| 267 |
+
</div>
|
| 268 |
+
`;
|
| 269 |
+
|
| 270 |
+
// Add event listeners
|
| 271 |
+
setTimeout(() => {
|
| 272 |
+
this.shadowRoot.querySelectorAll('.details-btn').forEach(btn => {
|
| 273 |
+
btn.addEventListener('click', (e) => {
|
| 274 |
+
const statusItem = e.target.closest('.status-item');
|
| 275 |
+
const system = statusItem.getAttribute('data-system');
|
| 276 |
+
const status = statusItem.classList.contains('operational') ? 'operational' :
|
| 277 |
+
statusItem.classList.contains('degraded') ? 'degraded' : 'offline';
|
| 278 |
+
this.showSystemDetails(system, status);
|
| 279 |
+
});
|
| 280 |
+
});
|
| 281 |
+
|
| 282 |
+
// Initialize metrics
|
| 283 |
+
this.initializeMetrics();
|
| 284 |
+
|
| 285 |
+
// Update metrics periodically
|
| 286 |
+
setInterval(() => {
|
| 287 |
+
this.updateMetrics();
|
| 288 |
+
}, 3000);
|
| 289 |
+
|
| 290 |
+
// Replace feather icons if needed
|
| 291 |
+
if (window.feather) {
|
| 292 |
+
feather.replace();
|
| 293 |
+
}
|
| 294 |
+
}, 100);
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
initializeMetrics() {
|
| 298 |
+
const metrics = {
|
| 299 |
+
'candidates-scored': 1248 + Math.floor(Math.random() * 50),
|
| 300 |
+
'avg-response': Math.floor(Math.random() * 20 + 35) + 'ms',
|
| 301 |
+
'active-workers': `${Math.floor(Math.random() * 3 + 8)}/10`,
|
| 302 |
+
'tasks-completed': 987 + Math.floor(Math.random() * 100),
|
| 303 |
+
'queue-size': Math.floor(Math.random() * 100),
|
| 304 |
+
'msg-rate': Math.floor(Math.random() * 100 + 300) + '/s',
|
| 305 |
+
'graph-nodes': 1247 + Math.floor(Math.random() * 50),
|
| 306 |
+
'query-latency': Math.floor(Math.random() * 50 + 100) + 'ms'
|
| 307 |
+
};
|
| 308 |
+
|
| 309 |
+
Object.keys(metrics).forEach(id => {
|
| 310 |
+
const el = this.shadowRoot.getElementById(id);
|
| 311 |
+
if (el) {
|
| 312 |
+
el.textContent = metrics[id];
|
| 313 |
+
}
|
| 314 |
+
});
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
updateMetrics() {
|
| 318 |
+
// Update worker metrics
|
| 319 |
+
const activeWorkers = this.shadowRoot.getElementById('active-workers');
|
| 320 |
+
if (activeWorkers) {
|
| 321 |
+
const current = parseInt(activeWorkers.textContent.split('/')[0]);
|
| 322 |
+
const newCount = Math.max(2, Math.min(10, current + (Math.random() > 0.5 ? 1 : -1)));
|
| 323 |
+
activeWorkers.textContent = `${newCount}/10`;
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
// Update queue metrics
|
| 327 |
+
const queueSize = this.shadowRoot.getElementById('queue-size');
|
| 328 |
+
if (queueSize) {
|
| 329 |
+
const current = parseInt(queueSize.textContent);
|
| 330 |
+
const newSize = Math.max(0, current + Math.floor(Math.random() * 10) - 5);
|
| 331 |
+
queueSize.textContent = newSize;
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
// Update message rate
|
| 335 |
+
const msgRate = this.shadowRoot.getElementById('msg-rate');
|
| 336 |
+
if (msgRate) {
|
| 337 |
+
const current = parseInt(msgRate.textContent);
|
| 338 |
+
const newRate = Math.max(100, Math.min(500, current + Math.floor(Math.random() * 50) - 25));
|
| 339 |
+
msgRate.textContent = newRate + '/s';
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
// Randomly change system status (for demo purposes)
|
| 343 |
+
if (Math.random() < 0.1) {
|
| 344 |
+
const neo4jCard = this.shadowRoot.querySelector('.status-degraded');
|
| 345 |
+
if (neo4jCard) {
|
| 346 |
+
if (Math.random() > 0.5 && !neo4jCard.classList.contains('operational')) {
|
| 347 |
+
neo4jCard.classList.replace('degraded', 'operational');
|
| 348 |
+
neo4jCard.classList.remove('status-degraded');
|
| 349 |
+
neo4jCard.classList.add('status-operational');
|
| 350 |
+
const badge = neo4jCard.querySelector('.status-badge');
|
| 351 |
+
if (badge) {
|
| 352 |
+
badge.textContent = 'Operational';
|
| 353 |
+
badge.style.background = 'rgba(16, 185, 129, 0.2)';
|
| 354 |
+
badge.style.color = '#10b981';
|
| 355 |
+
}
|
| 356 |
+
}
|
| 357 |
+
}
|
| 358 |
+
}
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
showSystemDetails(system, status) {
|
| 362 |
+
const details = {
|
| 363 |
+
'orchestrator': {
|
| 364 |
+
operational: 'The orchestrator is running optimally with sub-50ms response times.',
|
| 365 |
+
degraded: 'The orchestrator is experiencing higher than normal latency.',
|
| 366 |
+
offline: 'The orchestrator is offline or unresponsive.'
|
| 367 |
+
},
|
| 368 |
+
'workers': {
|
| 369 |
+
operational: 'Worker pool is fully operational with all 10 workers active.',
|
| 370 |
+
degraded: 'Some workers are experiencing issues or are offline.',
|
| 371 |
+
offline: 'The worker pool is completely offline.'
|
| 372 |
+
},
|
| 373 |
+
'redis': {
|
| 374 |
+
operational: 'Redis queues are operating normally with optimal message throughput.',
|
| 375 |
+
degraded: 'Redis is experiencing message backlog or connection issues.',
|
| 376 |
+
offline: 'Redis is offline or unreachable.'
|
| 377 |
+
},
|
| 378 |
+
'neo4j': {
|
| 379 |
+
operational: 'Neo4j graph is performing optimally with normal query latency.',
|
| 380 |
+
degraded: 'Neo4j is experiencing higher than normal query latency.',
|
| 381 |
+
offline: 'Neo4j is offline or unreachable.'
|
| 382 |
+
}
|
| 383 |
+
};
|
| 384 |
+
|
| 385 |
+
const message = details[system]?.[status] || 'Status information unavailable.';
|
| 386 |
+
alert(`${system.toUpperCase()} System Status: ${status.toUpperCase()}\n\n${message}`);
|
| 387 |
+
}
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
customElements.define('system-status', SystemStatus);
|
|
@@ -1,19 +1,165 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Quantum Code Weaver Engine - Architecture Dashboard</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
+
<link rel="stylesheet" href="style.css">
|
| 12 |
+
</head>
|
| 13 |
+
<body class="bg-gradient-to-br from-gray-900 to-black text-gray-100 min-h-screen">
|
| 14 |
+
<script src="components/navbar.js"></script>
|
| 15 |
+
<script src="components/architecture-diagram.js"></script>
|
| 16 |
+
<script src="components/stats-panel.js"></script>
|
| 17 |
+
<script src="components/system-status.js"></script>
|
| 18 |
+
<custom-navbar></custom-navbar>
|
| 19 |
+
|
| 20 |
+
<main class="container mx-auto px-4 py-8">
|
| 21 |
+
<!-- Hero Section -->
|
| 22 |
+
<section class="mb-12 text-center">
|
| 23 |
+
<h1 class="text-5xl md:text-7xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-cyan-400 to-purple-500">
|
| 24 |
+
Quantum Code Weaver Engine
|
| 25 |
+
</h1>
|
| 26 |
+
<p class="text-xl text-gray-300 max-w-3xl mx-auto">
|
| 27 |
+
A distributed, graph-based coding engine transforming software development from conversation to state-space search.
|
| 28 |
+
</p>
|
| 29 |
+
</section>
|
| 30 |
+
|
| 31 |
+
<!-- Architecture Overview -->
|
| 32 |
+
<section class="mb-16">
|
| 33 |
+
<div class="flex items-center justify-between mb-8">
|
| 34 |
+
<h2 class="text-3xl font-bold">System Architecture</h2>
|
| 35 |
+
<span class="px-4 py-2 bg-gradient-to-r from-cyan-800 to-purple-800 rounded-full text-sm font-semibold">
|
| 36 |
+
State-Driven Execution
|
| 37 |
+
</span>
|
| 38 |
+
</div>
|
| 39 |
+
<architecture-diagram></architecture-diagram>
|
| 40 |
+
</section>
|
| 41 |
+
|
| 42 |
+
<!-- System Status Grid -->
|
| 43 |
+
<section class="mb-16">
|
| 44 |
+
<h2 class="text-3xl font-bold mb-8 text-center">System Status</h2>
|
| 45 |
+
<system-status></system-status>
|
| 46 |
+
</section>
|
| 47 |
+
|
| 48 |
+
<!-- Stats and Metrics -->
|
| 49 |
+
<section class="mb-16">
|
| 50 |
+
<h2 class="text-3xl font-bold mb-8 text-center">Performance Metrics</h2>
|
| 51 |
+
<stats-panel></stats-panel>
|
| 52 |
+
</section>
|
| 53 |
+
|
| 54 |
+
<!-- Components Grid -->
|
| 55 |
+
<section class="mb-16">
|
| 56 |
+
<h2 class="text-3xl font-bold mb-8">Architecture Components</h2>
|
| 57 |
+
<div class="grid md:grid-cols-2 lg:grid-cols-4 gap-6">
|
| 58 |
+
<!-- Brain Card -->
|
| 59 |
+
<div class="bg-gradient-to-br from-gray-800 to-gray-900 rounded-xl p-6 border border-cyan-800/50">
|
| 60 |
+
<div class="flex items-center mb-4">
|
| 61 |
+
<div class="p-3 rounded-lg bg-cyan-900/50 mr-4">
|
| 62 |
+
<i data-feather="cpu"></i>
|
| 63 |
+
</div>
|
| 64 |
+
<h3 class="text-xl font-bold">The Brain</h3>
|
| 65 |
+
</div>
|
| 66 |
+
<p class="text-gray-300 mb-4">Local LLM Orchestrator responsible for verification, scoring, and routing.</p>
|
| 67 |
+
<ul class="text-sm text-gray-400 space-y-2">
|
| 68 |
+
<li class="flex items-center"><i data-feather="check" class="w-4 h-4 mr-2 text-cyan-400"></i> Zero heavy generation</li>
|
| 69 |
+
<li class="flex items-center"><i data-feather="check" class="w-4 h-4 mr-2 text-cyan-400"></i> JSON-in, JSON-out only</li>
|
| 70 |
+
<li class="flex items-center"><i data-feather="check" class="w-4 h-4 mr-2 text-cyan-400"></i> Hot state processing</li>
|
| 71 |
+
</ul>
|
| 72 |
+
</div>
|
| 73 |
+
|
| 74 |
+
<!-- Muscle Card -->
|
| 75 |
+
<div class="bg-gradient-to-br from-gray-800 to-gray-900 rounded-xl p-6 border border-purple-800/50">
|
| 76 |
+
<div class="flex items-center mb-4">
|
| 77 |
+
<div class="p-3 rounded-lg bg-purple-900/50 mr-4">
|
| 78 |
+
<i data-feather="activity"></i>
|
| 79 |
+
</div>
|
| 80 |
+
<h3 class="text-xl font-bold">The Muscle</h3>
|
| 81 |
+
</div>
|
| 82 |
+
<p class="text-gray-300 mb-4">Cloud LLM Workers for high-volume, parallel code generation.</p>
|
| 83 |
+
<ul class="text-sm text-gray-400 space-y-2">
|
| 84 |
+
<li class="flex items-center"><i data-feather="cpu" class="w-4 h-4 mr-2 text-purple-400"></i> Stateless functions</li>
|
| 85 |
+
<li class="flex items-center"><i data-feather="zap" class="w-4 h-4 mr-2 text-purple-400"></i> Parallel execution</li>
|
| 86 |
+
<li class="flex items-center"><i data-feather="code" class="w-4 h-4 mr-2 text-purple-400"></i> AST-compliant output</li>
|
| 87 |
+
</ul>
|
| 88 |
+
</div>
|
| 89 |
+
|
| 90 |
+
<!-- Nervous System Card -->
|
| 91 |
+
<div class="bg-gradient-to-br from-gray-800 to-gray-900 rounded-xl p-6 border border-red-800/50">
|
| 92 |
+
<div class="flex items-center mb-4">
|
| 93 |
+
<div class="p-3 rounded-lg bg-red-900/50 mr-4">
|
| 94 |
+
<i data-feather="radio"></i>
|
| 95 |
+
</div>
|
| 96 |
+
<h3 class="text-xl font-bold">Nervous System</h3>
|
| 97 |
+
</div>
|
| 98 |
+
<p class="text-gray-300 mb-4">Redis-based Pub/Sub queue implementing the Hot Event Loop.</p>
|
| 99 |
+
<ul class="text-sm text-gray-400 space-y-2">
|
| 100 |
+
<li class="flex items-center"><i data-feather="fast-forward" class="w-4 h-4 mr-2 text-red-400"></i> Async decoupling</li>
|
| 101 |
+
<li class="flex items-center"><i data-feather="layers" class="w-4 h-4 mr-2 text-red-400"></i> Task & result queues</li>
|
| 102 |
+
<li class="flex items-center"><i data-feather="refresh-cw" class="w-4 h-4 mr-2 text-red-400"></i> Real-time processing</li>
|
| 103 |
+
</ul>
|
| 104 |
+
</div>
|
| 105 |
+
|
| 106 |
+
<!-- Memory Card -->
|
| 107 |
+
<div class="bg-gradient-to-br from-gray-800 to-gray-900 rounded-xl p-6 border border-green-800/50">
|
| 108 |
+
<div class="flex items-center mb-4">
|
| 109 |
+
<div class="p-3 rounded-lg bg-green-900/50 mr-4">
|
| 110 |
+
<i data-feather="database"></i>
|
| 111 |
+
</div>
|
| 112 |
+
<h3 class="text-xl font-bold">Long-Term Memory</h3>
|
| 113 |
+
</div>
|
| 114 |
+
<p class="text-gray-300 mb-4">Neo4j graph database storing the Verification Graph.</p>
|
| 115 |
+
<ul class="text-sm text-gray-400 space-y-2">
|
| 116 |
+
<li class="flex items-center"><i data-feather="git-merge" class="w-4 h-4 mr-2 text-green-400"></i> Nodes = Verified states</li>
|
| 117 |
+
<li class="flex items-center"><i data-feather="link" class="w-4 h-4 mr-2 text-green-400"></i> Edges = Derivation paths</li>
|
| 118 |
+
<li class="flex items-center"><i data-feather="filter" class="w-4 h-4 mr-2 text-green-400"></i> No failed attempts stored</li>
|
| 119 |
+
</ul>
|
| 120 |
+
</div>
|
| 121 |
+
</div>
|
| 122 |
+
</section>
|
| 123 |
+
|
| 124 |
+
<!-- Code Preview Section -->
|
| 125 |
+
<section class="mb-16">
|
| 126 |
+
<div class="bg-gradient-to-r from-gray-800 to-gray-900 rounded-xl p-6 border border-cyan-800/50">
|
| 127 |
+
<h2 class="text-2xl font-bold mb-6">Orchestrator Scaffolding</h2>
|
| 128 |
+
<div class="bg-gray-900 rounded-lg p-4 overflow-x-auto">
|
| 129 |
+
<pre class="text-gray-300 text-sm font-mono">
|
| 130 |
+
<span class="text-cyan-400">class</span> <span class="text-yellow-400">Orchestrator</span>:
|
| 131 |
+
<span class="text-cyan-400">def</span> __init__(<span class="text-green-400">self</span>, redis_host: str = <span class="text-red-400">"localhost"</span>, redis_port: int = <span class="text-purple-400">6379</span>):
|
| 132 |
+
<span class="text-green-400">self</span>.redis_client = redis.Redis(host=redis_host, port=redis_port)
|
| 133 |
+
<span class="text-green-400">self</span>.neo4j_driver = GraphDatabase.driver(<span class="text-red-400">"bolt://localhost:7689"</span>)
|
| 134 |
+
<span class="text-green-400">self</span>.threshold_score = <span class="text-purple-400">0.8</span>
|
| 135 |
+
<span class="text-gray-500"># Async initialization complete</span>
|
| 136 |
+
|
| 137 |
+
<span class="text-cyan-400">async def</span> <span class="text-yellow-400">poll_results</span>(<span class="text-green-400">self</span>) -> List[Dict[str, Any]]:
|
| 138 |
+
<span class="text-gray-500">"""Continuously poll Redis for worker results"""</span>
|
| 139 |
+
<span class="text-cyan-400">while</span> <span class="text-yellow-400">True</span>:
|
| 140 |
+
result = <span class="text-green-400">self</span>.redis_client.rpop(<span class="text-red-400">"queue:results"</span>)
|
| 141 |
+
<span class="text-cyan-400">if</span> result:
|
| 142 |
+
<span class="text-cyan-400">yield</span> json.loads(result)
|
| 143 |
+
<span class="text-cyan-400">await</span> asyncio.sleep(<span class="text-purple-400">0.01</span>)
|
| 144 |
+
|
| 145 |
+
<span class="text-cyan-400">def</span> <span class="text-yellow-400">evaluate_candidate</span>(<span class="text-green-400">self</span>, candidate: Dict[str, Any]) -> float:
|
| 146 |
+
<span class="text-gray-500">"""Score code candidate (stubbed with LLM integration)"""</span>
|
| 147 |
+
<span class="text-cyan-400">return</span> random.uniform(<span class="text-purple-400">0</span>, <span class="text-purple-400">1</span>) <span class="text-gray-500"># Placeholder for LLM scoring</span>
|
| 148 |
+
|
| 149 |
+
<span class="text-cyan-400">async def</span> <span class="text-yellow-400">update_graph</span>(<span class="text-green-400">self</span>, candidate: Dict[str, Any], score: float):
|
| 150 |
+
<span class="text-gray-500">"""Commit to Neo4j if score exceeds threshold"""</span>
|
| 151 |
+
<span class="text-cyan-400">if</span> score > <span class="text-green-400">self</span>.threshold_score:
|
| 152 |
+
<span class="text-cyan-400">with</span> <span class="text-green-400">self</span>.neo4j_driver.session() <span class="text-cyan-400">as</span> session:
|
| 153 |
+
session.run(...) <span class="text-gray-500"># Graph update logic</span></pre>
|
| 154 |
+
</div>
|
| 155 |
+
</div>
|
| 156 |
+
</section>
|
| 157 |
+
</main>
|
| 158 |
+
|
| 159 |
+
<script src="script.js"></script>
|
| 160 |
+
<script>
|
| 161 |
+
feather.replace();
|
| 162 |
+
</script>
|
| 163 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 164 |
+
</body>
|
| 165 |
+
</html>
|
|
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Main JavaScript for Quantum Code Weaver Engine Dashboard
|
| 2 |
+
|
| 3 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 4 |
+
// Initialize feather icons
|
| 5 |
+
feather.replace();
|
| 6 |
+
|
| 7 |
+
// Initialize system metrics with random data
|
| 8 |
+
initializeMetrics();
|
| 9 |
+
|
| 10 |
+
// Setup event listeners
|
| 11 |
+
setupEventListeners();
|
| 12 |
+
|
| 13 |
+
// Simulate real-time updates
|
| 14 |
+
simulateLiveUpdates();
|
| 15 |
+
});
|
| 16 |
+
|
| 17 |
+
function initializeMetrics() {
|
| 18 |
+
// Initialize metrics with initial values
|
| 19 |
+
const metrics = {
|
| 20 |
+
'queue-tasks': Math.floor(Math.random() * 100),
|
| 21 |
+
'queue-results': Math.floor(Math.random() * 50),
|
| 22 |
+
'verified-states': Math.floor(Math.random() * 1000),
|
| 23 |
+
'workers-active': Math.floor(Math.random() * 8) + 2,
|
| 24 |
+
'avg-score': (Math.random() * 20 + 80).toFixed(1),
|
| 25 |
+
'processing-rate': Math.floor(Math.random() * 500) + 100
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
// Update all metric elements
|
| 29 |
+
Object.keys(metrics).forEach(key => {
|
| 30 |
+
const element = document.getElementById(key);
|
| 31 |
+
if (element) {
|
| 32 |
+
element.textContent = metrics[key];
|
| 33 |
+
}
|
| 34 |
+
});
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
function setupEventListeners() {
|
| 38 |
+
// Add click handlers for status cards
|
| 39 |
+
document.querySelectorAll('.status-card').forEach(card => {
|
| 40 |
+
card.addEventListener('click', function() {
|
| 41 |
+
const status = this.getAttribute('data-status');
|
| 42 |
+
const system = this.getAttribute('data-system');
|
| 43 |
+
showStatusDetails(system, status);
|
| 44 |
+
});
|
| 45 |
+
});
|
| 46 |
+
|
| 47 |
+
// Add refresh handler
|
| 48 |
+
const refreshBtn = document.getElementById('refresh-metrics');
|
| 49 |
+
if (refreshBtn) {
|
| 50 |
+
refreshBtn.addEventListener('click', function() {
|
| 51 |
+
refreshMetrics();
|
| 52 |
+
this.classList.add('animate-spin');
|
| 53 |
+
setTimeout(() => {
|
| 54 |
+
this.classList.remove('animate-spin');
|
| 55 |
+
}, 1000);
|
| 56 |
+
});
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
function showStatusDetails(system, status) {
|
| 61 |
+
const statusColors = {
|
| 62 |
+
'operational': 'text-green-400',
|
| 63 |
+
'degraded': 'text-yellow-400',
|
| 64 |
+
'offline': 'text-red-400'
|
| 65 |
+
};
|
| 66 |
+
|
| 67 |
+
const statusMessages = {
|
| 68 |
+
'operational': 'All systems nominal',
|
| 69 |
+
'degraded': 'Performance degradation detected',
|
| 70 |
+
'offline': 'System offline or unreachable'
|
| 71 |
+
};
|
| 72 |
+
|
| 73 |
+
alert(`System: ${system.toUpperCase()}\nStatus: ${status.toUpperCase()}\n${statusMessages[status]}`);
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
function refreshMetrics() {
|
| 77 |
+
// Simulate refreshing metrics with new random values
|
| 78 |
+
const metrics = document.querySelectorAll('.metric-value');
|
| 79 |
+
metrics.forEach(metric => {
|
| 80 |
+
const current = parseInt(metric.textContent);
|
| 81 |
+
const change = Math.floor(Math.random() * 10) - 5;
|
| 82 |
+
const newValue = Math.max(0, current + change);
|
| 83 |
+
|
| 84 |
+
// Animate the change
|
| 85 |
+
metric.style.opacity = '0.5';
|
| 86 |
+
setTimeout(() => {
|
| 87 |
+
metric.textContent = newValue;
|
| 88 |
+
metric.style.opacity = '1';
|
| 89 |
+
}, 300);
|
| 90 |
+
});
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
function simulateLiveUpdates() {
|
| 94 |
+
// Update queue counts randomly
|
| 95 |
+
setInterval(() => {
|
| 96 |
+
const tasksEl = document.getElementById('queue-tasks');
|
| 97 |
+
const resultsEl = document.getElementById('queue-results');
|
| 98 |
+
|
| 99 |
+
if (tasksEl && resultsEl) {
|
| 100 |
+
// Simulate queue movement
|
| 101 |
+
const tasks = parseInt(tasksEl.textContent);
|
| 102 |
+
const results = parseInt(resultsEl.textContent);
|
| 103 |
+
|
| 104 |
+
const newTasks = Math.max(0, tasks + Math.floor(Math.random() * 3) - 1);
|
| 105 |
+
const newResults = Math.max(0, results + Math.floor(Math.random() * 2));
|
| 106 |
+
|
| 107 |
+
tasksEl.textContent = newTasks;
|
| 108 |
+
resultsEl.textContent = newResults;
|
| 109 |
+
|
| 110 |
+
// Add visual feedback
|
| 111 |
+
if (newTasks > tasks) tasksEl.classList.add('text-green-400');
|
| 112 |
+
else if (newTasks < tasks) tasksEl.classList.add('text-red-400');
|
| 113 |
+
|
| 114 |
+
if (newResults > results) resultsEl.classList.add('text-green-400');
|
| 115 |
+
else if (newResults < results) resultsEl.classList.add('text-red-400');
|
| 116 |
+
|
| 117 |
+
setTimeout(() => {
|
| 118 |
+
tasksEl.classList.remove('text-green-400', 'text-red-400');
|
| 119 |
+
resultsEl.classList.remove('text-green-400', 'text-red-400');
|
| 120 |
+
}, 1000);
|
| 121 |
+
}
|
| 122 |
+
}, 3000);
|
| 123 |
+
|
| 124 |
+
// Update active workers
|
| 125 |
+
setInterval(() => {
|
| 126 |
+
const workersEl = document.getElementById('workers-active');
|
| 127 |
+
if (workersEl) {
|
| 128 |
+
const current = parseInt(workersEl.textContent);
|
| 129 |
+
const change = Math.random() > 0.7 ? (Math.random() > 0.5 ? 1 : -1) : 0;
|
| 130 |
+
const newCount = Math.min(10, Math.max(2, current + change));
|
| 131 |
+
|
| 132 |
+
if (newCount !== current) {
|
| 133 |
+
workersEl.textContent = newCount;
|
| 134 |
+
workersEl.classList.add('float-animation');
|
| 135 |
+
setTimeout(() => {
|
| 136 |
+
workersEl.classList.remove('float-animation');
|
| 137 |
+
}, 1000);
|
| 138 |
+
}
|
| 139 |
+
}
|
| 140 |
+
}, 5000);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
// Utility function for formatting numbers
|
| 144 |
+
function formatNumber(num) {
|
| 145 |
+
if (num >= 1000000) {
|
| 146 |
+
return (num / 1000000).toFixed(1) + 'M';
|
| 147 |
+
}
|
| 148 |
+
if (num >= 1000) {
|
| 149 |
+
return (num / 1000).toFixed(1) + 'K';
|
| 150 |
+
}
|
| 151 |
+
return num.toString();
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
// Export functions for use in web components
|
| 155 |
+
window.QCWEUtils = {
|
| 156 |
+
formatNumber,
|
| 157 |
+
refreshMetrics
|
| 158 |
+
};
|
|
@@ -1,28 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
font-size: 15px;
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Global Styles for Quantum Code Weaver Engine */
|
| 2 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
|
| 3 |
+
|
| 4 |
+
* {
|
| 5 |
+
margin: 0;
|
| 6 |
+
padding: 0;
|
| 7 |
+
box-sizing: border-box;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
body {
|
| 11 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
/* Custom scrollbar */
|
| 15 |
+
::-webkit-scrollbar {
|
| 16 |
+
width: 10px;
|
| 17 |
+
height: 10px;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
::-webkit-scrollbar-track {
|
| 21 |
+
background: rgba(30, 41, 59, 0.5);
|
| 22 |
+
border-radius: 5px;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
::-webkit-scrollbar-thumb {
|
| 26 |
+
background: linear-gradient(45deg, #06b6d4, #8b5cf6);
|
| 27 |
+
border-radius: 5px;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
::-webkit-scrollbar-thumb:hover {
|
| 31 |
+
background: linear-gradient(45deg, #0891b2, #7c3aed);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
/* Custom animations */
|
| 35 |
+
@keyframes pulse-glow {
|
| 36 |
+
0%, 100% {
|
| 37 |
+
box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
|
| 38 |
+
}
|
| 39 |
+
50% {
|
| 40 |
+
box-shadow: 0 0 40px rgba(6, 182, 212, 0.4);
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
@keyframes float {
|
| 45 |
+
0%, 100% {
|
| 46 |
+
transform: translateY(0px);
|
| 47 |
+
}
|
| 48 |
+
50% {
|
| 49 |
+
transform: translateY(-10px);
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
@keyframes shimmer {
|
| 54 |
+
0% {
|
| 55 |
+
background-position: -1000px 0;
|
| 56 |
+
}
|
| 57 |
+
100% {
|
| 58 |
+
background-position: 1000px 0;
|
| 59 |
+
}
|
| 60 |
}
|
| 61 |
|
| 62 |
+
/* Utility classes */
|
| 63 |
+
.glow-effect {
|
| 64 |
+
animation: pulse-glow 3s infinite;
|
| 65 |
}
|
| 66 |
|
| 67 |
+
.float-animation {
|
| 68 |
+
animation: float 3s ease-in-out infinite;
|
|
|
|
|
|
|
|
|
|
| 69 |
}
|
| 70 |
|
| 71 |
+
.shimmer-text {
|
| 72 |
+
background: linear-gradient(90deg, #06b6d4, #8b5cf6, #06b6d4);
|
| 73 |
+
background-size: 1000px 100%;
|
| 74 |
+
-webkit-background-clip: text;
|
| 75 |
+
background-clip: text;
|
| 76 |
+
color: transparent;
|
| 77 |
+
animation: shimmer 3s infinite linear;
|
| 78 |
}
|
| 79 |
|
| 80 |
+
/* Card hover effects */
|
| 81 |
+
.hover-card {
|
| 82 |
+
transition: all 0.3s ease;
|
| 83 |
}
|
| 84 |
+
|
| 85 |
+
.hover-card:hover {
|
| 86 |
+
transform: translateY(-5px);
|
| 87 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
/* Gradient borders */
|
| 91 |
+
.gradient-border {
|
| 92 |
+
position: relative;
|
| 93 |
+
border-radius: 12px;
|
| 94 |
+
background: linear-gradient(45deg, #1e293b, #0f172a);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.gradient-border::before {
|
| 98 |
+
content: '';
|
| 99 |
+
position: absolute;
|
| 100 |
+
top: -2px;
|
| 101 |
+
left: -2px;
|
| 102 |
+
right: -2px;
|
| 103 |
+
bottom: -2px;
|
| 104 |
+
background: linear-gradient(45deg, #06b6d4, #8b5cf6);
|
| 105 |
+
border-radius: 14px;
|
| 106 |
+
z-index: -1;
|
| 107 |
+
opacity: 0.3;
|
| 108 |
+
transition: opacity 0.3s ease;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.gradient-border:hover::before {
|
| 112 |
+
opacity: 0.6;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
/* Status indicators */
|
| 116 |
+
.status-dot {
|
| 117 |
+
width: 10px;
|
| 118 |
+
height: 10px;
|
| 119 |
+
border-radius: 50%;
|
| 120 |
+
display: inline-block;
|
| 121 |
+
margin-right: 8px;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.status-operational {
|
| 125 |
+
background: linear-gradient(45deg, #10b981, #34d399);
|
| 126 |
+
box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
.status-degraded {
|
| 130 |
+
background: linear-gradient(45deg, #f59e0b, #fbbf24);
|
| 131 |
+
box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
.status-offline {
|
| 135 |
+
background: linear-gradient(45deg, #ef4444, #f87171);
|
| 136 |
+
box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
/* Responsive fixes */
|
| 140 |
+
@media (max-width: 768px) {
|
| 141 |
+
.container {
|
| 142 |
+
padding-left: 1rem;
|
| 143 |
+
padding-right: 1rem;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
h1 {
|
| 147 |
+
font-size: 2.5rem !important;
|
| 148 |
+
line-height: 1.2 !important;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
h2 {
|
| 152 |
+
font-size: 2rem !important;
|
| 153 |
+
}
|
| 154 |
+
}
|