SIMON Master Console Rebuild
True command center for SIMON + WEB360
This rebuild gives you a cleaner production spine: interactive tree, live viewer, guarded editor, dynamic graphics, architecture map, and note storage. It is designed to sit beside your existing
console.php
and become the stronger replacement path.
Dashboard
Tree
Viewer
System Map
File Registry
Notes
Files
15,338
Folders
408
Scanned Size
3.84 GB
PHP Files
890
Editable Text Files
12,599
File viewer
guarded to /htdocs
/web360/Demo/api/canvas.php
<?php require_once __DIR__ . '/../core/bootstrap.php'; require_once __DIR__ . '/../engine/SmartEngine.php'; try { w360_require_csrf(); $data = (string)($_POST['image'] ?? ''); $note = (string)($_POST['note'] ?? ''); $source = (string)($_POST['source'] ?? 'viewer'); if (!preg_match('#^data:image/(png|jpeg|webp);base64,#', $data, $m)) { throw new RuntimeException('No canvas/image data received.'); } $ext = $m[1] === 'jpeg' ? 'jpg' : $m[1]; $raw = base64_decode(preg_replace('#^data:image/[^;]+;base64,#', '', $data), true); if ($raw === false || strlen($raw) < 20) { throw new RuntimeException('Invalid image payload.'); } $name = 'workspace/uploads/canvas_' . date('Ymd_His') . '_' . bin2hex(random_bytes(3)) . '.' . $ext; $full = w360_safe_path($name); file_put_contents($full, $raw); $prompt = "Analyze this captured WEB360/SIMON canvas or viewer screenshot metadata. Source: {$source}. Saved file: {$name}. User note: {$note}. Explain likely UI issue, next action, and what the user may want improved."; $result = SmartEngine::run(['prompt'=>$prompt,'type'=>'vision','provider'=>$_POST['provider'] ?? 'auto','bounce'=>'off']); w360_log('canvas.capture', ['file'=>$name,'bytes'=>strlen($raw),'source'=>$source,'note'=>$note]); w360_json(['ok'=>true,'file'=>$name,'bytes'=>strlen($raw),'analysis'=>$result]); } catch (Throwable $e) { w360_log('canvas.error', ['message'=>$e->getMessage()]); w360_json(['ok'=>false,'error'=>$e->getMessage()], 400); }
Save file
Quick jump
open a path
Open