# How to Build a Website with Next.js: A Starter Guide

> Learn how to build a website with the Next.js App Router through planning, page structure, data, metadata, images, testing and release decisions.

- Source: https://thekai.co/notes/build-a-website-with-nextjs
- Author: Kamer Can İzvermez
- Published: 2026-03-27
- Updated: 2026-09-08
- Reading time: 5 min
- Language: English

## Key takeaways

- The App Router uses routes, layouts and the Server/Client Component split.
- Static export is an option for mostly static sites; server features are planned separately.
- SEO and performance are not guaranteed automatically; metadata and real-user measurement are needed.

Building a site with Next.js is not just running a command and generating pages. First the site’s purpose, content owner, primary action and data needs are defined; then the routes, layouts, components and release model are chosen. The Next.js App Router is file-system based and uses React features such as Server Components, Suspense and Server Functions. Which features to use should be decided by what the site actually needs.

![Komsa responsive web detail screen](https://thekai.co/images/work/2026/komsa-venue/detail-1.webp)
*How responsive content and navigation decisions look on a real venue surface.*

## The workflow from setup to release

1. **Write down the need and the routes**: List the homepage, information pages, contact, language and data flow.
2. **Start the project**: Set up the TypeScript, lint and App Router basics with create-next-app.
3. **Separate layouts and pages**: Put the shared navigation and footer in the layout and the route content in the page.
4. **Add data and metadata**: Decide the Server/Client split, the cache behaviour, and the title, description and OG image.
5. **Test and release**: Complete the responsive, accessibility, link, form, build and release-environment checks.

**Choose Next.js decisions by use case.**

| Need | Starting option | Watch for |
| --- | --- | --- |
| Static showcase | Static export | Server features are left out |
| Live data | Server or client fetch | Cache, error and loading states |
| Form | Route Handler or external endpoint | Validation and spam protection |
| Private data | Server Component / server endpoint | Auth and permission checks |
| SEO and sharing | Metadata API + OG | Unique content for every route |

Static export generates HTML per route at build time and lets you move the result to a server that can serve static files. An API call from the browser may still be possible; but a secret key, privileged data, a payment webhook or business logic that has to run on a server needs a server side as well. So do not read “static” as “no dynamic data can ever be used”; the decision depends on where the data is processed and with what permissions.

In the App Router, pages and layouts are Server Components by default. A Client Component is chosen when you need interaction, a browser API or local state. Data fetching behaviour is likewise set not by a default slogan but by the need for freshness, caching, errors and loading. The Next.js data fetching guide explains that with slow sources the flow can be split up with loading.js or Suspense.

## Evidence and references

- [Metadata](https://nextjs.org/docs/app/getting-started/metadata-and-og-images): The Next.js Metadata API helps generate fields such as title, description, canonical and OG per route.
- [SEO](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics): Google processes JavaScript applications in crawl, render and index stages; visible, meaningful HTML matters.

Generalisations such as “Next.js is the best framework” or “Core Web Vitals are almost always 90+” are not a sound starting point. Core Web Vitals are not a score; they are made up of real-user experience metrics such as LCP, INP and CLS. The Next.js production checklist covers image optimisation, caching, security, accessibility, metadata and measurement together. Vercel can offer conveniences such as automatic previews and HTTPS; check the plan and usage terms separately.

For your first project, pick a small route, run it, see the error and compare it with the acceptance example. Then add the shared layout, metadata, images, forms and release steps. On a surface carrying real multilingual content such as Komsa you can study why route and language decisions are handled separately, and on a visually heavy surface such as Shortlist Creative, why media and responsive decisions are.

### Think of the minimal route example as behaviour first

An example scenario: the file `app/hakkimizda/page.tsx` starts as a Server Component; the page has a heading, a description and an image. The shared `app/layout.tsx` carries the navigation and the metadata base. If an interactive language switcher or a form field is needed, only that piece is made a Client Component. This split sets boundaries by need instead of loading the whole page with unnecessary browser JavaScript.

Before release, check `/hakkimizda`, the language route, the 404, metadata, image alt text, keyboard navigation and the mobile breakpoint. Then verify the production output with `next build`. A passing build does not by itself prove visual or content accuracy; real route and device checks are still required.

### Read the file tree through a small example

An example scenario: `app/page.tsx` holds the homepage, `app/hakkimizda/page.tsx` the information page, `app/layout.tsx` the shared shell and `app/not-found.tsx` the route that is not found. Images under `public/` are referenced at build time. When adding a page, first write the route’s expected URL, then its metadata and lastly whether interaction is needed. This order fixes user behaviour before component names.

For a Client Component such as a form, browser state and validation can be used; a secret key or privileged data must not be placed in the client bundle. When choosing between a Route Handler and an external endpoint, decide on request validation, spam control, the error message and who is responsible for logs. In a Server Component that uses fetch, the loading, error and cache behaviour should be tried against the real data source. An empty demo endpoint does not prove production behaviour.

In the release check, open every important route directly; check the title, description, OG image, canonical, alt text, 404, language link and keyboard focus. When static export is chosen, list the unsupported server features in advance. For Core Web Vitals, read the definitions of LCP, INP and CLS in the official guide and plan real-user measurement; a Lighthouse result alone is not user experience or a sales result.

### A small but complete vertical slice for the first release

At the start, instead of producing only the homepage, choose a small vertical slice: the homepage, one content route, a 404 and completed metadata. That slice should include a real image, a mobile breakpoint, keyboard focus, an internal link and, if needed, a form error state. This shows the file tree, the data flow and the release model working together. Later pages share the same shell; but for every new route the content owner, canonical, image alt text and empty state are thought through again. This method ties learning the framework to real delivery criteria and makes visible the difference between an incomplete demo and a production-ready site.

[Let’s plan the first release scope of your Next.js project](https://thekai.co/contact)

## Sources

- [Next.js — App Router](https://nextjs.org/docs/app)
- [Next.js — Static Exports](https://nextjs.org/docs/app/guides/static-exports)
- [Next.js — Production Checklist](https://nextjs.org/docs/app/guides/production-checklist)
- [Next.js — Metadata](https://nextjs.org/docs/app/getting-started/metadata-and-og-images)
- [Google — JavaScript SEO](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)
