create-next-mui 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +108 -0
- package/next-mui-template-js/.vscode/settings.json +7 -0
- package/next-mui-template-js/.vscode/typescript.code-snippets +10 -0
- package/next-mui-template-js/esling.config.mjs +90 -0
- package/next-mui-template-js/next.config.ts +7 -0
- package/next-mui-template-js/package-lock.json +6689 -0
- package/next-mui-template-js/package.json +31 -0
- package/next-mui-template-js/public/next.svg +1 -0
- package/next-mui-template-js/public/vercel.svg +1 -0
- package/next-mui-template-js/src/app/favicon.ico +0 -0
- package/next-mui-template-js/src/app/globals.css +28 -0
- package/next-mui-template-js/src/app/layout.tsx +42 -0
- package/next-mui-template-js/src/app/page.tsx +7 -0
- package/next-mui-template-js/src/lib/router-link/index.ts +5 -0
- package/next-mui-template-js/src/sections/home/view.tsx +49 -0
- package/next-mui-template-js/src/theme/core/colors.json +46 -0
- package/next-mui-template-js/src/theme/core/components/button.ts +35 -0
- package/next-mui-template-js/src/theme/core/components/card.ts +17 -0
- package/next-mui-template-js/src/theme/core/components/index.ts +9 -0
- package/next-mui-template-js/src/theme/core/palette.ts +34 -0
- package/next-mui-template-js/src/theme/core/typography.ts +51 -0
- package/next-mui-template-js/src/theme/create-theme.ts +24 -0
- package/next-mui-template-js/src/theme/theme-provider.tsx +19 -0
- package/next-mui-template-js/tsconfig.json +34 -0
- package/next-mui-template-ts/.vscode/settings.json +7 -7
- package/next-mui-template-ts/.vscode/typescript.code-snippets +10 -10
- package/next-mui-template-ts/esling.config.mjs +90 -97
- package/next-mui-template-ts/next.config.ts +7 -7
- package/next-mui-template-ts/package-lock.json +6689 -6689
- package/next-mui-template-ts/package.json +31 -31
- package/next-mui-template-ts/src/app/globals.css +28 -28
- package/next-mui-template-ts/src/app/layout.tsx +42 -42
- package/next-mui-template-ts/src/app/page.tsx +7 -7
- package/next-mui-template-ts/src/lib/router-link/index.ts +5 -5
- package/next-mui-template-ts/src/sections/home/view.tsx +49 -49
- package/next-mui-template-ts/src/theme/core/colors.json +46 -46
- package/next-mui-template-ts/src/theme/core/components/button.ts +35 -35
- package/next-mui-template-ts/src/theme/core/components/card.ts +17 -17
- package/next-mui-template-ts/src/theme/core/components/index.ts +9 -9
- package/next-mui-template-ts/src/theme/core/palette.ts +34 -34
- package/next-mui-template-ts/src/theme/core/typography.ts +51 -51
- package/next-mui-template-ts/src/theme/create-theme.ts +24 -24
- package/next-mui-template-ts/src/theme/theme-provider.tsx +19 -19
- package/next-mui-template-ts/tsconfig.json +34 -34
- package/package.json +1 -1
- package/src/index.js +88 -88
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Vikash Kumar
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vikash Kumar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# create-next-mui 🚀
|
|
2
|
+
|
|
3
|
+
A blazing-fast, interactive CLI tool to instantly scaffold production-ready **Next.js** applications pre-configured with **Material UI (MUI)**, robust theme providers, and an elite architectural linting layout.
|
|
4
|
+
|
|
5
|
+
Stop wasting time wiring up Emotion caches, Next.js App Router layout configs, or sorting your imports manually. Launch your next project perfectly in under 10 seconds.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🚀 Quick Start
|
|
10
|
+
|
|
11
|
+
You don't need to install anything globally. Just run the following command in your terminal:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx create-next-mui
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The interactive prompt engine (powered by `@clack/prompts`) will guide you through naming your project and selecting your preferred flavor.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## ✨ Key Features
|
|
22
|
+
|
|
23
|
+
- **⚡ Modern Architecture:** Built natively on top of the Next.js App Router structure.
|
|
24
|
+
- **🎨 Material UI Ready:** Seamless compilation of MUI components inside Server and Client Components with pre-configured UI themes.
|
|
25
|
+
- **🧩 Dual-Template Architecture:** Full support for both **TypeScript** and **JavaScript** boilerplates.
|
|
26
|
+
- **🧼 Perfectionist Linting Config:** Pre-packaged with **ESLint v9 Flat Config** (`eslint.config.mjs`) utilizing `eslint-plugin-perfectionist` and `eslint-plugin-unused-imports`.
|
|
27
|
+
- **📦 Pure & Lightweight:** Zero bloat. Template files are automatically stripped of development artifacts (`node_modules`, caches) before build deployment.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 📦 Choice of Flavors
|
|
32
|
+
|
|
33
|
+
During the prompt sequence, you can choose between two completely separate architectures, both fine-tuned for high-performance builds:
|
|
34
|
+
|
|
35
|
+
1. **TypeScript Template (`next-mui-template-ts`)** – Out-of-the-box strong typing, custom theme module augmentations, and strict `@typescript-eslint` checking.
|
|
36
|
+
2. **JavaScript Template (`next-mui-template-js`)** – Lightweight, clean vanilla ES modern syntax with optimized configuration overhead.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📐 Generated Project Structure
|
|
41
|
+
|
|
42
|
+
No matter which path you choose, `create-next-mui` prints out an organized, production-grade layout optimized for scalability:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
my-awesome-app/
|
|
46
|
+
├── src/
|
|
47
|
+
│ ├── app/
|
|
48
|
+
│ │ ├── layout.js/ts # Handles App Router initialization & MUI Cache Provider
|
|
49
|
+
│ │ └── page.js/ts # Pre-built home view utilizing responsive MUI layouts
|
|
50
|
+
│ ├── components/ # Reusable global presentation components
|
|
51
|
+
│ └── theme/
|
|
52
|
+
│ ├── index.js/ts # Deep theme customization (palette, typography, overrides)
|
|
53
|
+
│ └── theme-provider.js # Keeps layout tree hydrations isolated and performant
|
|
54
|
+
├── eslint.config.mjs # Elite natural line-length linting layout
|
|
55
|
+
├── next.config.js # Configured optimization vectors
|
|
56
|
+
├── package.json
|
|
57
|
+
└── README.md
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 🎨 Elite Linting Layout (Perfectionist Grouping)
|
|
64
|
+
|
|
65
|
+
Both boilerplate environments contain a fine-tuned, strict importing arrangement rule framework using `line-length` natural alpha sorting. Your files are automatically linted and organized cleanly on save down this architectural chain:
|
|
66
|
+
|
|
67
|
+
1. **React Core APIs** (`react`)
|
|
68
|
+
2. **Next.js Framework Hooks & Context** (`next/*`)
|
|
69
|
+
3. **Material UI Design Tokens & Engine** (`@mui/*`, `@emotion/*`)
|
|
70
|
+
4. **External Third-Party Libraries**
|
|
71
|
+
5. **Internal Layer Architectures** (`@/types`, `@/lib`, `@/components`, `@/theme`)
|
|
72
|
+
|
|
73
|
+
Say goodbye to disorganized, messy blocks of import statements!
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## ⚙️ Development Scripts
|
|
78
|
+
|
|
79
|
+
Once your scaffolding finishes generating, step inside your directory and run the standard lifecycle workflows:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Install dependencies
|
|
83
|
+
npm install
|
|
84
|
+
|
|
85
|
+
# Boot up local development server
|
|
86
|
+
npm run dev
|
|
87
|
+
|
|
88
|
+
# Run ESLint validation checks with automated file ordering adjustment
|
|
89
|
+
npm run lint
|
|
90
|
+
|
|
91
|
+
# Compile production-ready code bundles
|
|
92
|
+
npm run build
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 🤝 Contributing & Feedback
|
|
99
|
+
|
|
100
|
+
Issues and pull requests are highly welcome! If you want to expand the templates or suggest additional components, feel free to open an issue or submit a pull request on the official repository.
|
|
101
|
+
|
|
102
|
+
Maintained with 💻 by [thatonevikash](https://github.com/thatonevikash).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 📜 License
|
|
107
|
+
|
|
108
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import perfectionist from "eslint-plugin-perfectionist";
|
|
2
|
+
import unusedImports from "eslint-plugin-unused-imports";
|
|
3
|
+
import nextTypeScript from "eslint-config-next/typescript";
|
|
4
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
5
|
+
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
6
|
+
|
|
7
|
+
const eslintConfig = defineConfig([
|
|
8
|
+
...nextVitals,
|
|
9
|
+
...nextTypeScript,
|
|
10
|
+
globalIgnores([".next/**", "out/**", "build/**", "next-env.d.ts"]),
|
|
11
|
+
{
|
|
12
|
+
plugins: {
|
|
13
|
+
perfectionist,
|
|
14
|
+
"unused-imports": unusedImports,
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
"unused-imports/no-unused-imports": "error",
|
|
18
|
+
"no-unused-vars": "off",
|
|
19
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
20
|
+
"unused-imports/no-unused-vars": [
|
|
21
|
+
"off",
|
|
22
|
+
{
|
|
23
|
+
args: "after-used",
|
|
24
|
+
argsIgnorePattern: "^_",
|
|
25
|
+
vars: "all",
|
|
26
|
+
varsIgnorePattern: "^_",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
"perfectionist/sort-exports": [1, { order: "asc", type: "line-length" }],
|
|
30
|
+
"perfectionist/sort-named-imports": [
|
|
31
|
+
1,
|
|
32
|
+
{ order: "asc", type: "line-length" },
|
|
33
|
+
],
|
|
34
|
+
"perfectionist/sort-named-exports": [
|
|
35
|
+
1,
|
|
36
|
+
{ order: "asc", type: "line-length" },
|
|
37
|
+
],
|
|
38
|
+
"perfectionist/sort-imports": [
|
|
39
|
+
"warn",
|
|
40
|
+
{
|
|
41
|
+
order: "asc",
|
|
42
|
+
ignoreCase: true,
|
|
43
|
+
type: "line-length",
|
|
44
|
+
specialCharacters: "keep",
|
|
45
|
+
internalPattern: ["^@/.*"],
|
|
46
|
+
newlinesBetween: "always",
|
|
47
|
+
groups: [
|
|
48
|
+
"style",
|
|
49
|
+
"react",
|
|
50
|
+
"next",
|
|
51
|
+
"mui",
|
|
52
|
+
"external",
|
|
53
|
+
"type",
|
|
54
|
+
"internal-types",
|
|
55
|
+
"internal-lib",
|
|
56
|
+
"internal-hooks",
|
|
57
|
+
"internal-actions",
|
|
58
|
+
"internal-components",
|
|
59
|
+
"internal-auth",
|
|
60
|
+
"internal-routes",
|
|
61
|
+
"internal-theme",
|
|
62
|
+
"internal",
|
|
63
|
+
["parent", "sibling", "index"],
|
|
64
|
+
"icons",
|
|
65
|
+
"object",
|
|
66
|
+
"unknown",
|
|
67
|
+
],
|
|
68
|
+
customGroups: {
|
|
69
|
+
value: {
|
|
70
|
+
react: ["react"],
|
|
71
|
+
next: ["^next", "^next/.*", "cookies-next"],
|
|
72
|
+
mui: ["^@mui/.*", "^@emotion/.*"],
|
|
73
|
+
icons: ["^lucide-react$"],
|
|
74
|
+
"internal-types": ["^@/types/.*"],
|
|
75
|
+
"internal-lib": ["^@/lib/.*"],
|
|
76
|
+
"internal-actions": ["^@/actions/.*"],
|
|
77
|
+
"internal-hooks": ["^@/hooks/.*"],
|
|
78
|
+
"internal-components": ["^@/components/.*"],
|
|
79
|
+
"internal-auth": ["^@/auth/.*"],
|
|
80
|
+
"internal-routes": ["^@/routes/.*"],
|
|
81
|
+
"internal-theme": ["^@/theme/.*"],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
]);
|
|
89
|
+
|
|
90
|
+
export default eslintConfig;
|