{
  "generated_at": "2026-06-10T10:40:00Z",
  "sprint": "NubFlow Performance-First Rendering Architecture",
  "urls": {
    "public_fast_demo": "https://nubflow.com/performance/",
    "admin_edit_demo": "https://nubflow.com/performance/admin/",
    "report": "https://nubflow.com/performance/nubflow-performance-report.json",
    "lighthouse_json": "https://nubflow.com/performance/lighthouse-nubflow-performance.json"
  },
  "principle": "Public visitor output never loads editor/admin/builder assets. Admin editing mode is a separate route and bundle.",
  "asset_weight_comparison": {
    "public_html": {
      "bytes": 3773,
      "kb": 3.68
    },
    "public_css": {
      "bytes": 3765,
      "kb": 3.68
    },
    "public_js": {
      "bytes": 218,
      "kb": 0.21
    },
    "admin_html": {
      "bytes": 1686,
      "kb": 1.65
    },
    "admin_css": {
      "bytes": 2136,
      "kb": 2.09
    },
    "admin_js": {
      "bytes": 791,
      "kb": 0.77
    }
  },
  "budgets": {
    "public_js_kb_target": 50,
    "public_css_kb_target": 75,
    "lighthouse_performance_target": 95,
    "accessibility_target": 95,
    "best_practices_target": 95,
    "seo_target": 95,
    "lcp_target_seconds": 1.8,
    "cls_target": 0.05,
    "inp_target_ms": 100
  },
  "architecture": {
    "public_mode": [
      "prebuilt static/near-static HTML per release",
      "critical CSS only",
      "tiny JS islands only when required",
      "no PHP session for normal visitors",
      "no database hit on cacheable pages",
      "no editor/admin scripts or builder UI",
      "CDN friendly cache headers"
    ],
    "admin_mode": [
      "separate /admin editor URL",
      "auth/session required",
      "overlay editor bundle",
      "right-click menus and inline editing",
      "draft/publish/rollback APIs",
      "never referenced by public HTML"
    ]
  },
  "critical_css_extraction_plan": [
    "Render each page at publish time",
    "Trace above-the-fold selectors per template/module",
    "Inline <=10KB critical CSS for LCP path or preload single critical file",
    "Defer module CSS until component intersection when needed",
    "Fail CI if public CSS exceeds budget or includes editor selectors"
  ],
  "image_optimization_plan": [
    "Generate AVIF and WebP renditions plus original fallback at publish",
    "Use width/height/aspect-ratio for all media to eliminate CLS",
    "Use responsive srcset sizes based on container rules",
    "Preload only the LCP image; lazy load below-the-fold images",
    "Strip metadata and enforce compression budgets"
  ],
  "font_loading_strategy": [
    "Prefer system font stack for fastest first paint",
    "If brand font required, self-host WOFF2 subsets",
    "font-display: swap or optional",
    "preload only one critical roman weight",
    "Avoid third-party font CSS on public pages"
  ],
  "cache_headers_plan": [
    "Hashed release assets: Cache-Control public, max-age=31536000, immutable",
    "HTML: short max-age with stale-while-revalidate or edge cache purge on publish",
    "API/form endpoints: no-store where personalized",
    "Admin editor assets: private/no-store for session pages; hashed static editor chunks may use immutable"
  ],
  "cdn_strategy": [
    "Serve public releases from CDN edge",
    "Purge/swap release key on publish",
    "Keep admin/API uncached or authenticated at origin",
    "Use Brotli/Gzip, HTTP/2/3, image CDN transforms where available"
  ],
  "static_export_strategy": [
    "/sites/{site}/releases/{release}/pages/*.html",
    "/assets/{hash}/... immutable files",
    "current release pointer for atomic publish",
    "previous release pointers retained for rollback",
    "adapter interface for SFTP/SSH/DirectAdmin/cPanel/cloud object storage"
  ],
  "dynamic_forms_without_slow_public_pages": [
    "Render static form HTML in page",
    "Load a tiny form island only on interaction or when form enters viewport",
    "Post to NubFlow Forms API endpoint",
    "Use honeypot/turnstile only when risk score requires it",
    "Never load admin/session/editor runtime for forms"
  ],
  "rollback_safe_release_folders": {
    "pattern": "/releases/{release_id}/",
    "current_pointer": "/current -> /releases/{release_id}/",
    "rollback": "swap current pointer or republish previous release manifest",
    "manifest": "manifest.json stores files, hashes, schema version, publish actor, timestamp"
  },
  "recommendation": "Adopt a release-rendered hybrid architecture: static-first public output plus isolated authenticated editor overlay. Enforce budgets in CI and block publishes that leak editor assets into public pages.",
  "next_performance_sprint": [
    "Build publish-time renderer from NubFlow JSON schema",
    "Add bundle budget checker to CI/publish pipeline",
    "Implement critical CSS extraction for real modules",
    "Add image pipeline generating AVIF/WebP/srcset",
    "Create SFTP static export adapter with release folders",
    "Run Lighthouse CI against public URLs after every publish"
  ],
  "lighthouse_results": {
    "performance": 100,
    "accessibility": 100,
    "best-practices": 100,
    "seo": 100,
    "largest_contentful_paint": "0.9 s",
    "cumulative_layout_shift": "0",
    "total_blocking_time": "0 ms",
    "speed_index": "0.9 s",
    "interactive": "0.9 s",
    "note": "Lighthouse generated a valid JSON report and scores; CLI returned a Windows temp cleanup EPERM after writing output."
  },
  "verification": {
    "public_headers": "HTTP 200, Content-Length 3773, X-NubFlow-Rendering public-static-no-editor-assets, Cache-Control public max-age=300",
    "admin_headers": "HTTP 200, separate /performance/admin/ route, X-NubFlow-Rendering admin-editor-isolated-bundle",
    "public_leakage_check": "PASS: no admin-editor, editor-shell, context-menu, or data-admin references in public HTML",
    "report_json_valid": "PASS"
  }
}