Next.js

Next.js is the toolkit that turns stored text into the pages you are reading. It is built around React, the library for building interfaces, and its whole subject is one question: which part of the work happens on the server, and which in your browser?

The obvious answer — all of it in the browser — feels slow. The page arrives empty, then asks for the content, then fills itself in while you watch. Next.js puts a server in the middle, so a page can arrive already assembled, text in place, with only the pieces that react to you — a menu that opens, a switch that changes language — travelling to the browser as code.

That split is visible in how the code is written. A file is a server file unless it says otherwise: it reads from the database through the admin panel's interface, arranges the text, and sends finished HTML. A file that needs to respond to a click declares itself and accepts the cost of being sent to the browser. The useful consequence is that passwords and database addresses stay on the server, where a visitor cannot read them.

Where things sit in the folders decides the address. One folder is one part of the URL, a page file is the page, and a layout file wraps everything below it so the header is not rebuilt on every click. That is everything a site with language-prefixed addresses needs.

Each page decides how it is produced: built in advance, rebuilt on a timer, or assembled for every request. For content that changes when an editor saves, assembling per request with a short cache is the honest default. Caching is where the annoyance lives — there are several layers, and a stale page usually means a layer you forgot about.

Two details from this project. The build can produce a self-contained server, so the container carries only what it needs instead of the whole toolbox. And values whose names start with NEXT_PUBLIC are baked in at build time, so changing a public address is a rebuild, not a setting.

The framework moves quickly. Pinning the version is the only way to know what you tested.