App Router, server components, rendering modes, caching and data fetching.
A storefront team wants a CI check that prints every public URL their
Next.js App Router project exposes. Write entryPoint(files) that
takes the list of file paths inside the project and returns the
public route patterns.
An internal-tools team is debugging why their admin pages render an
unexpected sidebar. Write entryPoint(files, pageFile) that returns
the layouts that wrap a given page, outermost first.
A product catalogue uses dynamic segments. Write
entryPoint(pattern, pathname) that tests a URL against one App Router
route pattern and returns the params object the page would receive,
or null if the URL does not match.
To explain error and loading behaviour to a new hire, write
entryPoint(segments) that prints the React tree the App Router builds
from its special files for one URL.
You join a team building a booking site on the Next.js App Router.
Explain how the app/ folder turns into URLs. What makes a folder
publicly reachable, and can you keep components and helpers next to
the pages that use them without creating extra routes?
What is the difference between a layout and a page in the App
Router? What happens to a layout when the user clicks between two pages
it wraps, and what is special about the root layout?