new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Next.js · API reference · all subjects

codebase structure

12 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Next.js monorepo structure with pnpm

Next.js is organized as a pnpm monorepo. The main framework source is in packages/next/src/, compiled output goes to packages/next/dist/. Key entry points are: dev server at src/cli/next-dev.ts, production server at src/cli/next-start.ts, and build at src/cli/next-build.ts. The repository includes Turbopack (Rust), test suites, examples, documentation, and build scripts.

Important packages in Next.js monorepo

Key packages in the monorepo include: packages/create-next-app/ for the create-next-app CLI tool, packages/next-swc/ for native Rust bindings via SWC transforms, packages/eslint-plugin-next/ for ESLint rules, packages/font/ for next/font implementation, and packages/third-parties/ for third-party script integrations.

Issue triaging automation and labels

Repository maintainers triage every issue and PR opened in the Next.js repository. Issues are opened with one of these labels: 'bug' for issues with Next.js itself, 'documentation' for feedback on or issues with Next.js documentation, and 'examples' for issues with examples in the examples folder.

Automated bug report closure for missing reproduction

If a bug report is missing or has insufficient reproduction, the issue is automatically closed and receives a comment with the correct course of action. An 'invalid link' label is added to mark the issue. To avoid closure, follow the bug report template carefully.

Manual triage label: please add a complete reproduction

When a maintainer adds the 'please add a complete reproduction' label, the provided reproduction is not sufficient for investigation. If a sufficient reproduction is not provided, the issue will automatically close after 2 days of inactivity.

Manual triage label: please verify canary

When a maintainer adds the 'please verify canary' label, the issue has not been verified against the next@canary release. The canary version ships daily with all unreleased features and fixes. Some issues may already be fixed in canary. Issues not verified against next@canary will automatically close after 14 days of inactivity.

Manual triage label: please simplify reproduction

When a maintainer adds the 'please simplify reproduction' label, the provided reproduction is too complex or requires too many steps. If a simplified reproduction is not provided, the issue will automatically close after 14 days of inactivity.

Manual triage label: good first issue

The 'good first issue' label marks an issue as beginner-friendly and a good starting point for someone new to the project who wants to contribute.

Manual triage label: resolved

The 'resolved' label indicates that a newer version of Next.js fixed the issue. When a maintainer closes an issue with this label, the issue author or someone who commented can request reopening within 14 days by following the automated comment.

Verified issues receive linear tracking labels

If an issue is verified, it receives one of these labels: 'linear: next', 'linear: turbopack', or 'linear: docs' and will be tracked by maintainers. Additionally, one or more labels can be added to indicate which part of Next.js is affected. Verified issues never become stale or are closed before resolution.

Reopening closed issues

When a maintainer closes an unlocked issue, an automated comment explains how the issue author or someone who commented can request reopening within 14 days. The request must include 'Reopen:' and a reason. All closed PRs and issues are locked after 2 weeks of inactivity.

Feature request submission process

Feature requests should be opened as discussions, not as issues, using the designated template.

Give your agent this brain