What I learned porting the Next.js Gallery to a Vite SPA I’ve always admired the Next.js Gallery template ( https://nextjsconf-pics.vercel.app/ ). It’s a beautiful piece of engineering, but it relies on a lot of "framework magic" from things like next/image and server-side functions that just work, but are sometimes hard to peek inside of. I decided to try porting it to a Vite SPA (Single Page Application). Not because Vite is "better," but because I wanted to see if I could replicate those high-end features using simpler, more transparent building blocks like Bun/NodeJS, Sharp, and Supabase. Here’s what that process looked like. The Goal: High Performance without the "Magic" The original template feels great because of two things: layout stability (no jumping around) and those smooth "blur-up" image loads. In a standard SPA, you usually lose these because you don't have a server processing the images on the fly. To get around this, I moved the "thinking" to a build-time script.…