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:
typescriptanalytics: { 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.htmlthat 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:
| Metric | Target | How we achieve it |
|---|---|---|
| LCP | < 1.2s | Font preloading + Zero-JS Shell. |
| CLS | 0.0 | Aspect-ratio placeholders for all images. |
| INP | < 200ms | React 19 Transitions + TanStack Router prefetching. |
Performance Audit Checklist:
- Run
npm run buildand inspectdist/size. - Verify
rel="preload"for 'Inter' font inindex.html. - Check
LazyImageusage for all fold-below media.
3. The Sandbox Data Pipeline (Recap)
As discussed, in the AI Studio Sandbox:
- The Registry (
src/data/*.ts) acts as our "In-Memory Filesystem". - The Hydrator (
useDocsDB) reads this registry on startup. - The Engine (
sql.js) builds a SQL database in the browser's RAM. - Result: You get full-text search and database power with zero server setup.
4. Final SEO Hand-off
- Run
node scripts/generate-seo.mjsto refresh sitemap/llms.txt. - Verify
canonicaltags point to your production domain. - Run
npm run check-i18nto ensure global authority.
Status: Ready for Global Deployment.