Skip to content

File-system conventions

Source URL: https://nextjs.org/docs/app/api-reference/file-conventions

  • default.js
    • API Reference for the default.js file.
  • Dynamic Segments
    • Dynamic Route Segments can be used to programmatically generate route segments from dynamic data.
  • error.js
    • API reference for the error.js special file.
  • forbidden.js
    • API reference for the forbidden.js special file.
  • instrumentation.js
    • API reference for the instrumentation.js file.
  • instrumentation-client.js
    • Learn how to add client-side instrumentation to track and monitor your Next.js application’s frontend performance.
  • Intercepting Routes
    • Use intercepting routes to load a new route within the current layout while masking the browser URL, useful for advanced routing patterns such as modals.
  • layout.js
    • API reference for the layout.js file.
  • loading.js
    • API reference for the loading.js file.
  • mdx-components.js
    • API reference for the mdx-components.js file.
  • not-found.js
    • API reference for the not-found.js file.
  • page.js
    • API reference for the page.js file.
  • Parallel Routes
    • Simultaneously render one or more pages in the same view that can be navigated independently. A pattern for highly dynamic applications.
  • proxy.js
    • API reference for the proxy.js file.
  • public
    • Next.js allows you to serve static files, like images, in the public directory. You can learn how it works here.
  • route.js
    • API reference for the route.js special file.
  • Route Groups
    • Route Groups can be used to partition your Next.js application into different sections.
  • Route Segment Config
    • Learn about how to configure options for Next.js route segments.
  • src
    • Save pages under the src folder as an alternative to the root pages directory.
  • template.js
    • API Reference for the template.js file.
  • unauthorized.js
    • API reference for the unauthorized.js special file.
  • Metadata Files
    • API documentation for the metadata file conventions.