Kacper Piatek Portfolio
95+ / 100 Mobile · 100 / 100 Desktop — All Pages

Overview
A performance-obsessed portfolio scoring 95+/100 on mobile and 100/100 on desktop across all pages on PageSpeed Insights. Runs on Bun — the fast JavaScript runtime that replaced Node.js for both local development and production. Framer-motion was eliminated entirely (298 KB saved), animations replaced with IntersectionObserver + CSS transitions, and LCP images are served with fetchPriority="high" via Astro's build-time image pipeline. Served behind Nginx with brotli-compressed assets and 1-year immutable cache headers on all hashed Astro chunks.
The Challenge
What needed to be solved
Achieving 95+/100 mobile and 100/100 desktop Lighthouse scores on every single page simultaneously — not just the homepage — while running a real React SPA with i18n, dark mode, contact form, and multi-route SSR via Astro's Node adapter.
The Solution
How it was approached
Migrated the entire runtime from Node.js to Bun — faster installs, faster startup, same Astro/React compatibility. Removed all runtime animation libraries. Replaced framer-motion with native IntersectionObserver stagger animations. Pulled LCP elements (h1, hero images) outside opacity:0 wrappers and set fetchPriority="high" + eager loading. Switched all Astro islands to client:idle. Applied manual Rollup chunk splitting to isolate React and Lucide into stable, long-cached vendor bundles. Configured Nginx gzip at level 6 and immutable cache headers for all /_astro/* hashed assets.
Gallery
