logoNext MUI

Overview

Learn what create-next-mui generates and when to use it.

create-next-mui

create-next-mui is a Node CLI for creating Next.js App Router projects with Material UI already wired in. It gives you a clean application shell, lets you choose TypeScript or JavaScript, and can install common project features during setup or later with the add command.

The generated app stays close to the standard Next.js project model, so you can keep using familiar Next.js, React, and MUI documentation after the project is created.

What It Creates

Every new project starts from one of the base templates in this repository.

AreaIncluded setup
FrameworkNext.js App Router
UIMaterial UI, Emotion, MUI App Router cache provider, CSS baseline
ThemeLocal theme files under src/theme
Routingsrc/app with a starter page and root layout
Imports@/* path alias for source imports
LanguageTypeScript by default, JavaScript when selected

The CLI also rewrites the generated package.json name to match the project folder or the current directory name when you scaffold with ..

Setup Flow

Interactive setup asks for the decisions that change the generated project:

  1. Project name
  2. Language: TypeScript or JavaScript
  3. Linter: Oxlint, ESLint, or none
  4. Optional features: React Query and/or Zustand
  5. Whether to run npm install immediately

For automation, --yes skips the prompts and uses the current defaults: TypeScript, Oxlint, no optional features, and no automatic install.

Feature Installers

Feature installers are small, official recipes that copy files, merge dependencies, add scripts, and update the root layout when needed.

FeaturePurpose
oxlintAdds Oxlint and Oxfmt configs and scripts
eslintAdds ESLint flat config and lint scripts
react-queryAdds TanStack Query provider and dependencies
zustandAdds a starter Zustand counter store

Use installers during interactive project creation, or run npx create-next-mui@latest add <feature> inside an existing project.

Project Shape

A generated TypeScript project has this general shape before optional features are added:

my-app/
|-- public/
|-- src/
|   |-- app/
|   |   |-- globals.css
|   |   |-- layout.tsx
|   |   `-- page.tsx
|   |-- config-global.ts
|   |-- lib/
|   |   `-- router-link/
|   |-- sections/
|   |   `-- home/
|   `-- theme/
|-- next.config.ts
|-- package.json
`-- tsconfig.json

JavaScript projects use the same structure with .js and .jsx files plus jsconfig.json.

Next Step

Start with Quick Start to create and run your first project.

On this page