Put it together and ship it
The whole thing as one Next.js application: folders that become routes, a cache you invalidate on purpose, a form that posts to a server function, metadata that makes a shared link look like something, and the checks that run before you push. There is no Node server in this frame, so each piece is written as the plain function the framework calls — and checked the same way.
Builds on Next.js
What you end up with
- A router: folders to URLs, groups and private folders ignored, and the most specific route winning.
- Data loaded on the server, cached with a tag, and invalidated by the write that changed it.
- A server action that validates its input, writes, revalidates and redirects.
- Metadata that inherits a title template and produces a shareable card, with images that reserve their space.
- A preflight that catches a leaked secret, a missing variable and a route that went dynamic by accident.
-
Start where a Next.js application starts: the file system. A folder is a URL, a group is not, a private folder is nothing at all, and when two routes could match, the more specific one wins.
Not finished yet
-
The page loads its own data, and the cache is the interesting part: a time is a guess about how stale you can bear, a tag is a statement about what changed. Tag the reads, invalidate in the write, and nothing is ever stale for an hour because nobody wanted to think about it.
Not finished yet
-
A server action is a function the browser is allowed to call — which makes it an endpoint, with every obligation an endpoint has. It takes the previous state and the form data, and what it returns is what the form shows.
Not finished yet
-
Nobody looks at this and everybody sees the result: the search snippet, the shared card, and whether the page jumps while it loads. The title template is set once, at the root, and every page below it supplies one word.
Not finished yet
-
The last step of the last build. Two things decide whether a deploy is uneventful: nothing secret reached the browser, and nothing became dynamic that you meant to prerender. Both are a function you can run before you push.
Not finished yet
Last step — finish it and the build is yours.
When it is finished