Project structure

Project Structure

This page provides an overview of the project structure. It covers top-level files and folders, configuration files, and routing conventions.

Top-level folders

Top-level folders are used to organize your application's code and static assets.

  • publicStatic assets to be served
    srcSource folder

    Top-level files

    Top-level files are used to configure your application, manage dependencies, run middleware, integrate monitoring tools, and define environment variables.

    • ...
    • components.json
    • next.confing.js
    • package.json
    • postcss.config.js
    • tailwindcss.config.js
    • tsconfig.json
    • webpack.config.js
  • components.jsonComponent metadata and configuration
    next.config.jsNext.js configuration file
    package.jsonProject dependencies and scripts
    postcss.config.jsPostCSS configuration
    tailwindcss.config.jsTailwind CSS configuration
    theme.config.jsxTheme settings for the project
    tsconfig.jsonTypeScript configuration
    webpack.config.jsWebpack bundler configuration

    components.json is generated by shadcn (opens in a new tab)

    postcss.config.js, tailwindcss.confing.js is generated by tailwindcss (opens in a new tab)

    src folder

    This folder is the entry to the application.

  • appNext.js App Router and entry points
    assetsPublic static files like images and fonts
    componentsReusable UI components
    contextGlobal state management with React Context
    libHelper functions and utilities

    app folder

    • global.css
    • layout.tsx
    • providers.tsx
  • This folder serves as the app entry point. To learn about NextJs app routing please visit https://nextjs.org (opens in a new tab)

    components folder

      • ..
      • button.tsx
      • ..
  • This folder serves as the repository for your global custom components, as well as Shadcn components. To explore Shadcn components in detail, please visit ui.shadcn.com (opens in a new tab)