Skip to content

perf: Lighthouse and Core Web Vitals optimizations (#22)#1

Open
abbys-code-hub wants to merge 2 commits into
developfrom
issue-28-compare-alternatives
Open

perf: Lighthouse and Core Web Vitals optimizations (#22)#1
abbys-code-hub wants to merge 2 commits into
developfrom
issue-28-compare-alternatives

Conversation

@abbys-code-hub

Copy link
Copy Markdown
Owner

Closes wraith-protocol#22

This PR introduces critical performance and core web vitals optimizations for the landing page, raising all Lighthouse scores to 95+ (specifically achieving 99-100 on all axes on mobile and desktop).

Optimizations Performed:

  1. Typography & Font Preloading: Self-hosted Space Grotesk, Inter, and JetBrains Mono fonts as local .woff2 variable assets, setting font-display: swap and preloading critical font files to avoid render-blocking CDN network requests.
  2. CSS Inlining: Developed a custom Vite plugin to inline built CSS directly into index.html, eliminating stylesheet network requests entirely.
  3. Image Optimization: Converted logo.png to WebP, resized it from 1288x1020 to 120x95 (saving 92% file size), and set explicit width/height attributes for logos and SVGs to prevent cumulative layout shifts (CLS).
  4. Landmark & Contrast Fixes: Added a <main> container for better screen-reader landmarks. Tweaked --color-outline to #858585 to satisfy the WCAG AA 4.5:1 text color contrast requirements.
  5. Bots / Crawling Compliance: Added standard /robots.txt and /llms.txt config files.
  6. PR CI Automation: Configured a Lighthouse audit job in .github/workflows/ci.yml that comments on PRs with mobile and desktop performance reports.

Local Audit Results (Post-Optimization):

  • Mobile: Performance 99 | Accessibility 100 | Best Practices 100 | SEO 100
  • Desktop: Performance 100 | Accessibility 100 | Best Practices 100 | SEO 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lighthouse + Core Web Vitals optimization (95+ all axes)

2 participants