Course

Next.js Project Structure

Loading...

Here we are—your project is set up and ready to go. You’ll notice many files and folders, so let me walk you through them from bottom to top,

  • tsconfig.json: This is the configuration file for TypeScript. It defines what should be type-checked, ignored and the rules to follow.
  • tailwind.config.ts: This is where TailwindCSS is configured. You can extend TailwindCSS by customizing colors, sizes, shadows, plugins, or anything else you need.
  • README.md: A simple markdown file that explains how to run the project and provides relevant information.
  • postcss.config.mjs: It’s a configuration file for PostCSS, a tool used to process CSS with various plugins. You can see here that it mentions tailwindcss as a plugin, which allows you to use its utility first classes in your project.
  • package-lock.json: It’s a file that locks the versions of dependencies and their sub-dependencies, ensuring that everyone working on the project uses the exact same versions
  • package.json: It has all project dependencies and scripts. (explain some of these main scripts by showing/reading descriptions from here)
  • next-env.d.ts: It’s a typescript declaration file for Next.js. And as said here, you shouldn’t modify or put your typescript types here. It’s specifically for Next.js
  • next.config.ts: This file allows you to configure Next.js features, such as experimental options, image settings, build settings, and others.
  • .gitignore: For Git files and folders to ignore
  • .eslintrc.json: For configuring ESLint
  • public: A place for static assets. Always put your images and other static data here
  • node_modules: You know, it’s the heaviest object in the universe

Jokes aside, it’s a folder containing all the dependencies (packages) code required to run this application.

And finally, the most important folder is the app folder, which we’ll explore next,

Loading...

0 Comments

glass-bbok

No Comments Yet

Be the first to share your thoughts and start the conversation.

tick-guideNext Lesson

App Router