Model-config web apps: describe the app in configuration instead of writing code. Built on Polars and DuckDB.
mockup_dashboard.html · 12.2 KB · 414 lines
| 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>DBBasic Dashboard - 402M rows/sec</title> |
| 7 | <style> |
| 8 | * { |
| 9 | margin: 0; |
| 10 | padding: 0; |
| 11 | box-sizing: border-box; |
| 12 | } |
| 13 | |
| 14 | body { |
| 15 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; |
| 16 | background: #f5f5f5; |
| 17 | color: #333; |
| 18 | } |
| 19 | |
| 20 | .header { |
| 21 | background: #fff; |
| 22 | border-bottom: 1px solid #e0e0e0; |
| 23 | padding: 1rem 2rem; |
| 24 | display: flex; |
| 25 | justify-content: space-between; |
| 26 | align-items: center; |
| 27 | } |
| 28 | |
| 29 | .logo { |
| 30 | font-family: 'Times New Roman', Times, serif; |
| 31 | font-size: 24px; |
| 32 | font-weight: bold; |
| 33 | color: #2c3e50; |
| 34 | } |
| 35 | |
| 36 | .speed-badge { |
| 37 | background: #4CAF50; |
| 38 | color: white; |
| 39 | padding: 0.25rem 0.75rem; |
| 40 | border-radius: 20px; |
| 41 | font-size: 12px; |
| 42 | font-weight: bold; |
| 43 | } |
| 44 | |
| 45 | .nav { |
| 46 | display: flex; |
| 47 | gap: 2rem; |
| 48 | } |
| 49 | |
| 50 | .nav a { |
| 51 | text-decoration: none; |
| 52 | color: #666; |
| 53 | font-weight: 500; |
| 54 | padding: 0.5rem 0; |
| 55 | border-bottom: 2px solid transparent; |
| 56 | transition: all 0.3s; |
| 57 | } |
| 58 | |
| 59 | .nav a:hover, .nav a.active { |
| 60 | color: #2c3e50; |
| 61 | border-bottom-color: #4CAF50; |
| 62 | } |
| 63 | |
| 64 | .container { |
| 65 | max-width: 1400px; |
| 66 | margin: 0 auto; |
| 67 | padding: 2rem; |
| 68 | } |
| 69 | |
| 70 | .stats-grid { |
| 71 | display: grid; |
| 72 | grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); |
| 73 | gap: 1.5rem; |
| 74 | margin-bottom: 2rem; |
| 75 | } |
| 76 | |
| 77 | .stat-card { |
| 78 | background: white; |
| 79 | padding: 1.5rem; |
| 80 | border-radius: 8px; |
| 81 | box-shadow: 0 1px 3px rgba(0,0,0,0.1); |
| 82 | } |
| 83 | |
| 84 | .stat-label { |
| 85 | color: #666; |
| 86 | font-size: 14px; |
| 87 | margin-bottom: 0.5rem; |
| 88 | } |
| 89 | |
| 90 | .stat-value { |
| 91 | font-size: 32px; |
| 92 | font-weight: bold; |
| 93 | color: #2c3e50; |
| 94 | } |
| 95 | |
| 96 | .stat-change { |
| 97 | color: #4CAF50; |
| 98 | font-size: 14px; |
| 99 | margin-top: 0.5rem; |
| 100 | } |
| 101 | |
| 102 | .main-grid { |
| 103 | display: grid; |
| 104 | grid-template-columns: 250px 1fr; |
| 105 | gap: 2rem; |
| 106 | } |
| 107 | |
| 108 | .sidebar { |
| 109 | background: white; |
| 110 | border-radius: 8px; |
| 111 | padding: 1.5rem; |
| 112 | height: fit-content; |
| 113 | box-shadow: 0 1px 3px rgba(0,0,0,0.1); |
| 114 | } |
| 115 | |
| 116 | .sidebar h3 { |
| 117 | font-size: 14px; |
| 118 | text-transform: uppercase; |
| 119 | color: #666; |
| 120 | margin-bottom: 1rem; |
| 121 | } |
| 122 | |
| 123 | .table-list { |
| 124 | list-style: none; |
| 125 | } |
| 126 | |
| 127 | .table-item { |
| 128 | padding: 0.75rem; |
| 129 | margin-bottom: 0.5rem; |
| 130 | border-radius: 4px; |
| 131 | cursor: pointer; |
| 132 | display: flex; |
| 133 | justify-content: space-between; |
| 134 | align-items: center; |
| 135 | transition: background 0.2s; |
| 136 | } |
| 137 | |
| 138 | .table-item:hover { |
| 139 | background: #f0f0f0; |
| 140 | } |
| 141 | |
| 142 | .table-item.active { |
| 143 | background: #e8f5e9; |
| 144 | color: #2e7d32; |
| 145 | } |
| 146 | |
| 147 | .table-count { |
| 148 | background: #e0e0e0; |
| 149 | padding: 0.125rem 0.5rem; |
| 150 | border-radius: 10px; |
| 151 | font-size: 12px; |
| 152 | } |
| 153 | |
| 154 | .content { |
| 155 | background: white; |
| 156 | border-radius: 8px; |
| 157 | box-shadow: 0 1px 3px rgba(0,0,0,0.1); |
| 158 | overflow: hidden; |
| 159 | } |
| 160 | |
| 161 | .content-header { |
| 162 | padding: 1.5rem; |
| 163 | border-bottom: 1px solid #e0e0e0; |
| 164 | display: flex; |
| 165 | justify-content: space-between; |
| 166 | align-items: center; |
| 167 | } |
| 168 | |
| 169 | .actions { |
| 170 | display: flex; |
| 171 | gap: 1rem; |
| 172 | } |
| 173 | |
| 174 | .btn { |
| 175 | padding: 0.5rem 1rem; |
| 176 | border: none; |
| 177 | border-radius: 4px; |
| 178 | font-weight: 500; |
| 179 | cursor: pointer; |
| 180 | transition: all 0.2s; |
| 181 | } |
| 182 | |
| 183 | .btn-primary { |
| 184 | background: #4CAF50; |
| 185 | color: white; |
| 186 | } |
| 187 | |
| 188 | .btn-primary:hover { |
| 189 | background: #45a049; |
| 190 | } |
| 191 | |
| 192 | .btn-secondary { |
| 193 | background: #f0f0f0; |
| 194 | color: #333; |
| 195 | } |
| 196 | |
| 197 | .btn-secondary:hover { |
| 198 | background: #e0e0e0; |
| 199 | } |
| 200 | |
| 201 | .data-table { |
| 202 | width: 100%; |
| 203 | border-collapse: collapse; |
| 204 | } |
| 205 | |
| 206 | .data-table th { |
| 207 | background: #fafafa; |
| 208 | padding: 1rem; |
| 209 | text-align: left; |
| 210 | font-weight: 600; |
| 211 | font-size: 14px; |
| 212 | color: #666; |
| 213 | border-bottom: 2px solid #e0e0e0; |
| 214 | } |
| 215 | |
| 216 | .data-table td { |
| 217 | padding: 1rem; |
| 218 | border-bottom: 1px solid #f0f0f0; |
| 219 | } |
| 220 | |
| 221 | .data-table tr:hover { |
| 222 | background: #fafafa; |
| 223 | } |
| 224 | |
| 225 | .quick-actions { |
| 226 | position: fixed; |
| 227 | bottom: 2rem; |
| 228 | right: 2rem; |
| 229 | display: flex; |
| 230 | flex-direction: column; |
| 231 | gap: 1rem; |
| 232 | } |
| 233 | |
| 234 | .fab { |
| 235 | width: 56px; |
| 236 | height: 56px; |
| 237 | border-radius: 50%; |
| 238 | background: #4CAF50; |
| 239 | color: white; |
| 240 | border: none; |
| 241 | font-size: 24px; |
| 242 | cursor: pointer; |
| 243 | box-shadow: 0 4px 6px rgba(0,0,0,0.2); |
| 244 | transition: transform 0.2s; |
| 245 | } |
| 246 | |
| 247 | .fab:hover { |
| 248 | transform: scale(1.1); |
| 249 | } |
| 250 | |
| 251 | .performance-badge { |
| 252 | position: fixed; |
| 253 | bottom: 2rem; |
| 254 | left: 2rem; |
| 255 | background: rgba(0,0,0,0.8); |
| 256 | color: #4CAF50; |
| 257 | padding: 0.5rem 1rem; |
| 258 | border-radius: 4px; |
| 259 | font-family: 'Courier New', monospace; |
| 260 | font-size: 12px; |
| 261 | } |
| 262 | </style> |
| 263 | </head> |
| 264 | <body> |
| 265 | <div class="header"> |
| 266 | <div style="display: flex; align-items: center; gap: 1rem;"> |
| 267 | <div class="logo">DBBasic</div> |
| 268 | <div class="speed-badge">402M rows/sec</div> |
| 269 | </div> |
| 270 | <nav class="nav"> |
| 271 | <a href="#" class="active">Dashboard</a> |
| 272 | <a href="#">Tables</a> |
| 273 | <a href="#">Config</a> |
| 274 | <a href="#">Queries</a> |
| 275 | <a href="#">Agents</a> |
| 276 | </nav> |
| 277 | <div> |
| 278 | <button class="btn btn-secondary">Export</button> |
| 279 | <button class="btn btn-primary">Deploy</button> |
| 280 | </div> |
| 281 | </div> |
| 282 | |
| 283 | <div class="container"> |
| 284 | <div class="stats-grid"> |
| 285 | <div class="stat-card"> |
| 286 | <div class="stat-label">Total Rows</div> |
| 287 | <div class="stat-value">1.2M</div> |
| 288 | <div class="stat-change">↑ 402M rows/sec capacity</div> |
| 289 | </div> |
| 290 | <div class="stat-card"> |
| 291 | <div class="stat-label">Tables</div> |
| 292 | <div class="stat-value">23</div> |
| 293 | <div class="stat-change">↑ 3 added today</div> |
| 294 | </div> |
| 295 | <div class="stat-card"> |
| 296 | <div class="stat-label">Active Queries</div> |
| 297 | <div class="stat-value">147</div> |
| 298 | <div class="stat-change">0.002ms avg response</div> |
| 299 | </div> |
| 300 | <div class="stat-card"> |
| 301 | <div class="stat-label">Config Lines</div> |
| 302 | <div class="stat-value">256</div> |
| 303 | <div class="stat-change">Replaced 50K lines of code</div> |
| 304 | </div> |
| 305 | </div> |
| 306 | |
| 307 | <div class="main-grid"> |
| 308 | <div class="sidebar"> |
| 309 | <h3>Tables</h3> |
| 310 | <ul class="table-list"> |
| 311 | <li class="table-item active"> |
| 312 | <span>customers</span> |
| 313 | <span class="table-count">45.2K</span> |
| 314 | </li> |
| 315 | <li class="table-item"> |
| 316 | <span>orders</span> |
| 317 | <span class="table-count">128K</span> |
| 318 | </li> |
| 319 | <li class="table-item"> |
| 320 | <span>products</span> |
| 321 | <span class="table-count">3.4K</span> |
| 322 | </li> |
| 323 | <li class="table-item"> |
| 324 | <span>inventory</span> |
| 325 | <span class="table-count">8.7K</span> |
| 326 | </li> |
| 327 | <li class="table-item"> |
| 328 | <span>users</span> |
| 329 | <span class="table-count">156</span> |
| 330 | </li> |
| 331 | <li class="table-item"> |
| 332 | <span>analytics</span> |
| 333 | <span class="table-count">892K</span> |
| 334 | </li> |
| 335 | </ul> |
| 336 | </div> |
| 337 | |
| 338 | <div class="content"> |
| 339 | <div class="content-header"> |
| 340 | <h2>customers</h2> |
| 341 | <div class="actions"> |
| 342 | <button class="btn btn-secondary">Filter</button> |
| 343 | <button class="btn btn-secondary">Sort</button> |
| 344 | <button class="btn btn-primary">+ Add Row</button> |
| 345 | </div> |
| 346 | </div> |
| 347 | <table class="data-table"> |
| 348 | <thead> |
| 349 | <tr> |
| 350 | <th>ID</th> |
| 351 | <th>Name</th> |
| 352 | <th>Email</th> |
| 353 | <th>Revenue</th> |
| 354 | <th>Last Order</th> |
| 355 | <th>Status</th> |
| 356 | </tr> |
| 357 | </thead> |
| 358 | <tbody> |
| 359 | <tr> |
| 360 | <td>1001</td> |
| 361 | <td>Acme Corp</td> |
| 362 | <td>contact@acme.com</td> |
| 363 | <td>$458,230</td> |
| 364 | <td>2 days ago</td> |
| 365 | <td><span style="color: #4CAF50;">Active</span></td> |
| 366 | </tr> |
| 367 | <tr> |
| 368 | <td>1002</td> |
| 369 | <td>TechStart Inc</td> |
| 370 | <td>hello@techstart.io</td> |
| 371 | <td>$234,100</td> |
| 372 | <td>5 days ago</td> |
| 373 | <td><span style="color: #4CAF50;">Active</span></td> |
| 374 | </tr> |
| 375 | <tr> |
| 376 | <td>1003</td> |
| 377 | <td>Global Systems</td> |
| 378 | <td>info@globalsys.com</td> |
| 379 | <td>$892,450</td> |
| 380 | <td>Today</td> |
| 381 | <td><span style="color: #4CAF50;">Active</span></td> |
| 382 | </tr> |
| 383 | <tr> |
| 384 | <td>1004</td> |
| 385 | <td>DataFlow LLC</td> |
| 386 | <td>ops@dataflow.net</td> |
| 387 | <td>$123,780</td> |
| 388 | <td>1 week ago</td> |
| 389 | <td><span style="color: #FF9800;">Pending</span></td> |
| 390 | </tr> |
| 391 | <tr> |
| 392 | <td>1005</td> |
| 393 | <td>CloudNine Co</td> |
| 394 | <td>team@cloudnine.io</td> |
| 395 | <td>$567,900</td> |
| 396 | <td>3 days ago</td> |
| 397 | <td><span style="color: #4CAF50;">Active</span></td> |
| 398 | </tr> |
| 399 | </tbody> |
| 400 | </table> |
| 401 | </div> |
| 402 | </div> |
| 403 | </div> |
| 404 | |
| 405 | <div class="quick-actions"> |
| 406 | <button class="fab" title="New Table">+</button> |
| 407 | <button class="fab" title="Run Query" style="background: #2196F3;">▶</button> |
| 408 | </div> |
| 409 | |
| 410 | <div class="performance-badge"> |
| 411 | Processing: 402M rows/sec | Latency: 0.002ms |
| 412 | </div> |
| 413 | </body> |
| 414 | </html> |