Project structure in NextJS

Here is the list of important files and directories in NextJS app.
  • /src/pages - all pages of website are stored here
  • /public - stores images
  • /src/pages/api - stores all api endpoints
  • /pages/_app.tsx - Special file used to initialize pages
  • /pages/_document.tsx - Special file to manipulate HTML document
  • /pages/index.tsx - Home page of website
Complex problems, Simple Solutions