
A single HTML file is fast, but as pages grow — projects, blog, gallery, detail pages — everything becomes hard to maintain. File-based routing in Next.js solves this: every page becomes its own component.
The interesting part: with output: export, the build output is still pure HTML, CSS, and JS files. No Node server needs to run. That means it can be hosted free on GitHub Pages, as fast as static HTML.
// next.config.mjs
const nextConfig = {
output: "export", // result: out/ folder with static files
};One thing to watch: every page must be renderable at build time. Dynamic data like API fetches needs a fallback, since no server handles it at runtime.
When to move to a framework? When routing gets complex, article pages multiply, or you need reusable components. For this portfolio, the time had come — and there are no regrets.

