Docs
Protocol Verified

Performance & Launch Ritual

The final checklist for ensuring a project is authoritative and measurable before production.

PRID: 1207
VERIFIED
2 min read

🚀 Performance & Launch Ritual

This ritual ensures your project is not just "functional" but "authoritative" and "measurable" before it hits the production edge.

1. Analytics & Monitoring Setup

To track user behavior and site health, we integrate Google Analytics 4 and Microsoft Clarity.

A. Configuration

Open site.config.ts and locate the analytics block:

typescript
analytics: { googleAnalyticsId: "G-XXXXXXXXXX", // Your GA4 Measurement ID microsoftClarityId: "XXXXXXXXXX", // Your Clarity Project ID }

B. Verification

  • GA4: Check the Real-time report in Google Analytics after deployment.
  • Clarity: Open the Clarity dashboard to see heatmaps and session recordings.
  • Silent Guard: Our engine includes a script guard in index.html that prevents tracking scripts from crashing the app if they are blocked by ad-blockers.

2. Performance Benchmarking (Antigravity Protocol)

We aim for a 100/100 Lighthouse Score.

Core Web Vitals Targets:

MetricTargetHow we achieve it
LCP< 1.2sFont preloading + Zero-JS Shell.
CLS0.0Aspect-ratio placeholders for all images.
INP< 200msReact 19 Transitions + TanStack Router prefetching.

Performance Audit Checklist:

  • Run npm run build and inspect dist/ size.
  • Verify rel="preload" for 'Inter' font in index.html.
  • Check LazyImage usage for all fold-below media.

3. The Sandbox Data Pipeline (Recap)

As discussed, in the AI Studio Sandbox:

  1. The Registry (src/data/*.ts) acts as our "In-Memory Filesystem".
  2. The Hydrator (useDocsDB) reads this registry on startup.
  3. The Engine (sql.js) builds a SQL database in the browser's RAM.
  4. Result: You get full-text search and database power with zero server setup.

4. Final SEO Hand-off

  • Run node scripts/generate-seo.mjs to refresh sitemap/llms.txt.
  • Verify canonical tags point to your production domain.
  • Run npm run check-i18n to ensure global authority.

Status: Ready for Global Deployment.

Authority Distribution

Share this technical artifact