1. License
“Permission is hereby granted, free of charge, to any person obtaining a copy of this software”
MIT allows use in paid and closed-source apps.
github.com/vercel/next.js/blob/canary/license.md3. Used by agents' projects
Dependency in 1,118 public GitHub projects set up for AI coding agents that we scanned (17.9%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
nextjs.org/llms.txtFrom the package registry and GitHub, checked daily; card checked Nov 11, 2026. Tap a verdict to see its source.How we checkedReport an error
What Next.js does
Next.js is a free framework for building websites and web apps with React. Folders in your project become the pages of your site, and the same project can also hold the server code behind them, such as form handlers. You run it on a Node.js server or a host that supports it, or export a plain static site.
What people build with it
A page for every blog post
Your blog, docs or shop has one page design; Next.js fills it for each address like /blog/my-first-post from the name in the link.
Form handlers next to the pages
A contact form or a payment provider needs an address to send data to; you write that small server handler in the same project.
Host the site as plain files
A landing page or docs site gets built into plain HTML files that any simple web host can serve, with no server running.
Good link previews and search titles
Each page gets its own title, description and share picture, so links look right in chats and search results.
Check sign-in before a page opens
Send visitors who are not signed in to the login page, or log each visit, before the page is built.
Small admin panel for a team Idea
One project holds the screens, the forms and the code that saves changes to your database, so a small team tool ships as one app.
Next.js popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How Next.js is used
- Next.js is a dependency in 1,118 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (23.0% of the 4,867 JavaScript/TypeScript ones), #2 of 76 in web frameworks.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 5,312; those are left out of every share on this page.
- The most used alternative in our scan is Astro (118 projects).
- Projects that use it most often also use React (98.7%), Lucide React (73.5%), Tailwind CSS (92.9%).
- It is more common in projects set up for Roo Code (21.6%) than for OpenAI Codex (11.9%).
By coding agent
Often used with
Next.js in practice
Strengths
The site describes Server Actions as "Skip the API": you call a function and server code runs. It says you can then revalidate cached data and update the UI in one network roundtrip.
Each page can use its own rendering and caching options, ISR included. You do not have to pick one mode for the whole app.
The Proxy layer intercepts incoming requests. The site says you define routing and access rules there for authentication, experiments and internationalization.
The Unplatform article says Next.js' rewrite functionality supports Multi Zones, where separate apps sit behind one proxy. It says a new Next.js or React version can then roll out zone by zone.
Watch out for
The maintainers' guide for language models says older answers about Next.js are frequently wrong. It tells readers to use the current pages instead.
Features belong to either the App Router or the Pages Router, and the docs are split between them. Advice from the wrong section will not fit the project.
The Unplatform article lists careless use of server-side rendering as a source of unexpected service costs.
Start a new project
npx create-next-app@latestMore about Next.js
Agent Skills for it
- : The React Framework
Head to head
- Next.js vs Astro used together in 1 projects
- Next.js vs Nuxt used together in 0 projects
Packages around it
- @next/bundle-analyzer: Bundle size analyzer
- @next/eslint-plugin-next: Next.js lint rules
- @next/third-parties: Third-party script helpers
- @next/mdx: MDX support
- @next/font: Font optimization
- @next/swc-wasm-nodejs: SWC compiler (WASM)
More in Web frameworks
Alternatives
Next.js This page
Pick Astro for content sites like blogs and docs that should ship as little JavaScript as possible by default.
Pick Nuxt when your team writes Vue instead of React but wants the same kind of full-stack framework.
Pick React Router when you want React routing with fewer framework rules, or a single-page app built with Vite.
Get started
Tell your AI assistant
“Build this as a Next.js App Router project (pin next@16.4.6, Node.js 20.9+); use async params, put request checks in proxy.ts not middleware.ts, and keep secrets out of NEXT_PUBLIC_ variables.”
Make a new project with the official starter (TypeScript, Tailwind CSS, ESLint and the App Router are on by default), then start the dev server.
npx create-next-app@latest my-app --yes cd my-app npm run devOr add it to an existing folder by hand and put these scripts into package.json.
npm i next@latest react@latest react-dom@latest # package.json scripts: # "dev": "next dev", "build": "next build", "start": "next start"Create app/layout.tsx (required, holds the html and body tags) and app/page.tsx; both show at the root address /.
// app/page.tsx export default function Page() { return <h1>Hello, Next.js!</h1> }
Rules for your agent
## Next.js
- Read the docs for the Next.js version in the project's `package.json`, not the latest. Versioned copies live at `/docs/{version}/...`.
- Check whether the project uses the App Router (`/docs/app/`) or the Pages Router (`/docs/pages/`), and answer only from that section.
- Prefer nextjs.org pages over recalled knowledge for `next.config.js` options, file conventions, `next/*` APIs and CLI flags. The maintainers say older answers are frequently wrong.
- When an error links to `nextjs.org/docs/messages/...`, open that page. It explains the cause and the fix.
- Fetch docs as markdown with `Accept: text/markdown` or by appending `.md`, but cite the canonical URL, never the `.md` one.
- For upgrades, use `/docs/app/guides/upgrading` for migration guides and `/blog` for what changed in a release.
- The docs site has no REST API and no API keys. Do not ask the user to sign up for anything to read it.
Mistakes to avoid
Next.js 16 deprecated the middleware file name and named export; proxy always runs on Node.js.
Version 15 still allowed synchronous access with a warning; version 16 removed it for params, searchParams, cookies, headers and draftMode.
Version 16 raised the minimum Node.js version.
Next.js has two routers with separate docs and different React version handling.
CVE-2025-66478 in the React Server Components protocol allowed remote code execution on unpatched App Router apps.
Questions
Can I use it in a paid, closed-source product?
Yes. It is MIT licensed; keep the copyright and license notice in copies you ship.
Do I have to host it on Vercel?
No. Any host that runs Node.js or Docker supports all features; a static export runs on any plain web server with fewer features.
App Router or Pages Router?
New projects use the App Router, the newer one with Server Components. The Pages Router is the original one and is still supported; their docs are separate.
Where did middleware.ts go in version 16?
It was renamed to proxy.ts with a proxy function. The proxy file always runs on Node.js; apps that need the edge runtime keep middleware for now.
Does it send data about my project anywhere?
Anonymous usage data about commands and builds goes to Vercel unless you turn it off with NEXT_TELEMETRY_DISABLED=1.