@teispace/next-maker 0.3.0 → 1.0.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.0](https://github.com/teispace/npm-packages/compare/next-maker-v0.4.0...next-maker-v1.0.0) (2025-12-03)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * Major CLI redesign with new setup command and improved feature management
9
+
10
+ ### Features
11
+
12
+ * add post-initialization setup command and modernize CLI architecture ([ae6a5d6](https://github.com/teispace/npm-packages/commit/ae6a5d657fafe3973ac83c67628721809ebb8080))
13
+
14
+ ## [0.4.0](https://github.com/teispace/npm-packages/compare/next-maker-v0.3.0...next-maker-v0.4.0) (2025-12-02)
15
+
16
+
17
+ ### Features
18
+
19
+ * **next-maker:** add API endpoint registration for services and features ([8db4f36](https://github.com/teispace/npm-packages/commit/8db4f36a6037a63129b4a94c7905200668715ebc))
20
+
3
21
  ## [0.3.0](https://github.com/teispace/npm-packages/compare/next-maker-v0.2.2...next-maker-v0.3.0) (2025-12-02)
4
22
 
5
23
 
package/README.md CHANGED
@@ -24,22 +24,36 @@ next-maker <command> [name] [options]
24
24
  Generate a complete Next.js application with production-ready configuration.
25
25
 
26
26
  ```bash
27
+ npx @teispace/next-maker init [project-name]
28
+ # or
27
29
  npx @teispace/next-maker app [project-name]
28
30
  # or simply
29
31
  npx @teispace/next-maker [project-name]
30
32
  ```
31
33
 
32
- **Features included:**
34
+ **Interactive Setup:**
35
+
36
+ During initialization, you'll be prompted to configure:
37
+
38
+ - 📦 **Package Manager** (npm, yarn, pnpm, bun)
39
+ - 🔗 **GitHub Repository** (optional - configures remote origin)
40
+ - 🌐 **HTTP Client** (axios, fetch, both, or none)
41
+ - 🌙 **Dark Mode** (next-themes integration)
42
+ - 🔄 **Redux Toolkit** (with redux-persist)
43
+ - 🌍 **Internationalization** (next-intl)
44
+ - 📋 **Community Files** (CODE_OF_CONDUCT, CONTRIBUTING, etc.)
45
+ - 🐳 **Docker** support
46
+ - 🔧 **CI/CD** configuration
47
+ - 🎯 **Pre-commit hooks** (Husky)
48
+
49
+ **Core Features:**
33
50
 
34
51
  - ⚡ Next.js 15+ with App Router
35
52
  - 🔷 TypeScript (strict mode)
36
53
  - 🎨 Tailwind CSS v4
37
- - 🔄 Redux Toolkit with redux-persist
38
- - 🌐 next-intl for internationalization
39
- - 📡 AxiosClient & FetchClient (Result pattern)
54
+ - 📡 Result-based HTTP clients
40
55
  - 🏗️ Feature-based DDD architecture
41
56
  - 🎯 ESLint + Prettier configured
42
- - 🐳 Docker support
43
57
 
44
58
  **Example:**
45
59
 
@@ -49,7 +63,88 @@ npx @teispace/next-maker my-awesome-app
49
63
 
50
64
  ---
51
65
 
52
- ### 2. Generate a Feature Module
66
+ ### 2. Setup Additional Features
67
+
68
+ Add features to your existing Next.js project after initialization.
69
+
70
+ ```bash
71
+ npx @teispace/next-maker setup [options]
72
+ ```
73
+
74
+ **Options:**
75
+
76
+ - `--http-client <type>` - Setup HTTP client (axios|fetch|both)
77
+ - `--dark-theme` - Setup dark theme support (next-themes)
78
+ - `--redux` - Setup Redux Toolkit with persistence
79
+ - `--i18n` - Setup next-intl for internationalization
80
+
81
+ **Features:**
82
+
83
+ Each setup command:
84
+
85
+ - ✅ Checks if already configured (exits gracefully)
86
+ - 📁 Copies necessary files from template
87
+ - 🔧 Updates configuration files
88
+ - 📦 Installs required packages
89
+ - 🔗 Integrates with existing providers
90
+
91
+ **Examples:**
92
+
93
+ ```bash
94
+ # Interactive menu
95
+ npx @teispace/next-maker setup
96
+
97
+ # Add HTTP clients
98
+ npx @teispace/next-maker setup --http-client both
99
+
100
+ # Add dark mode
101
+ npx @teispace/next-maker setup --dark-theme
102
+
103
+ # Add Redux
104
+ npx @teispace/next-maker setup --redux
105
+
106
+ # Add internationalization
107
+ npx @teispace/next-maker setup --i18n
108
+ ```
109
+
110
+ **What Gets Setup:**
111
+
112
+ **HTTP Client:**
113
+
114
+ - Copies axios-client and/or fetch-client to `src/lib/utils/http/`
115
+ - Updates `src/lib/utils/http/index.ts` with exports
116
+ - Installs axios package (if selected)
117
+
118
+ **Dark Theme:**
119
+
120
+ - Copies `CustomThemeProvider.tsx` to `src/providers/`
121
+ - Adds `@custom-variant dark` to `src/styles/globals.css`
122
+ - Adds CSS variables `--color-dark` and `--color-light`
123
+ - Updates layout.tsx with `bg-light dark:bg-dark` classes
124
+ - Integrates with RootProvider
125
+ - Installs next-themes package
126
+
127
+ **Redux Toolkit:**
128
+
129
+ - Copies store configuration to `src/store/`
130
+ - Creates hooks, persistor, and rootReducer
131
+ - Copies `StoreProvider.tsx` to `src/providers/`
132
+ - Integrates with RootProvider
133
+ - Installs @reduxjs/toolkit, react-redux, redux-persist
134
+
135
+ **Internationalization:**
136
+
137
+ - Copies i18n directory (`routing.ts`, `request.ts`, `navigation.ts`, `translations/`)
138
+ - Copies `types/i18n.ts` and `lib/config/app-locales.ts`
139
+ - Creates/updates `src/proxy.ts` (middleware)
140
+ - Updates `next.config.ts` with createNextIntlPlugin
141
+ - Updates RootProvider with NextIntlClientProvider
142
+ - Creates `[locale]` route structure
143
+ - Installs next-intl package
144
+
145
+ ---
146
+
147
+ ### 3. Generate a Feature Module
53
148
 
54
149
  Create a complete feature module following Domain-Driven Design principles.
55
150
 
@@ -100,7 +195,7 @@ npx @teispace/next-maker feature auth --store persist --service fetch --path src
100
195
 
101
196
  ---
102
197
 
103
- ### 3. Generate a Redux Slice
198
+ ### 4. Generate a Redux Slice
104
199
 
105
200
  Create a Redux Toolkit slice with persistence support.
106
201
 
@@ -142,7 +237,7 @@ npx @teispace/next-maker slice theme --no-persist --path src/store/slices
142
237
 
143
238
  ---
144
239
 
145
- ### 4. Generate an API Service
240
+ ### 5. Generate an API Service
146
241
 
147
242
  Create an API service with HTTP client integration.
148
243
 
@@ -185,7 +280,7 @@ npx @teispace/next-maker service analytics --axios --path src/api/services
185
280
  ### Quick Start - New Project
186
281
 
187
282
  ```bash
188
- # Create a new Next.js app
283
+ # Create a new Next.js app with interactive setup
189
284
  npx @teispace/next-maker my-project
190
285
 
191
286
  # Navigate to the project
@@ -198,6 +293,24 @@ npx @teispace/next-maker feature auth --store persist --service axios
198
293
  npm run dev
199
294
  ```
200
295
 
296
+ ### Setup Existing Project
297
+
298
+ ```bash
299
+ # Add features to existing Next.js project
300
+
301
+ # Add HTTP clients if you initially selected 'none'
302
+ npx @teispace/next-maker setup --http-client both
303
+
304
+ # Add dark mode support
305
+ npx @teispace/next-maker setup --dark-theme
306
+
307
+ # Add Redux state management
308
+ npx @teispace/next-maker setup --redux
309
+
310
+ # Add internationalization
311
+ npx @teispace/next-maker setup --i18n
312
+ ```
313
+
201
314
  ### Feature-Based Development
202
315
 
203
316
  ```bash
@@ -220,6 +333,8 @@ npx @teispace/next-maker service metrics --fetch --path features/dashboard/servi
220
333
  npx @teispace/next-maker --help
221
334
 
222
335
  # Command-specific help
336
+ npx @teispace/next-maker init --help
337
+ npx @teispace/next-maker setup --help
223
338
  npx @teispace/next-maker feature --help
224
339
  npx @teispace/next-maker slice --help
225
340
  npx @teispace/next-maker service --help
@@ -229,6 +344,17 @@ npx @teispace/next-maker service --help
229
344
 
230
345
  ## Key Features
231
346
 
347
+ ### 🚀 Post-Installation Setup
348
+
349
+ Add features to your project anytime with the `setup` command:
350
+
351
+ - HTTP clients (axios/fetch) even if you initially chose "none"
352
+ - Dark theme with automatic CSS and layout updates
353
+ - Redux Toolkit with complete store configuration
354
+ - Internationalization with routing and middleware
355
+ - Smart detection prevents duplicate setups
356
+ - Automatic package installation
357
+
232
358
  ### 🏗️ Feature-First Architecture
233
359
 
234
360
  All generators follow a feature-based DDD approach by default, organizing code by business domain rather than technical layers.
@@ -239,6 +365,7 @@ All generators follow a feature-based DDD approach by default, organizing code b
239
365
  - Correct import paths for any custom location
240
366
  - Optional redux-persist configuration
241
367
  - Demo actions included (setLoading, setError, resetState)
368
+ - Can be added post-initialization via `setup --redux`
242
369
 
243
370
  ### 📡 HTTP Client Support
244
371
 
@@ -246,6 +373,23 @@ All generators follow a feature-based DDD approach by default, organizing code b
246
373
  - **FetchClient**: Same Result pattern with native fetch
247
374
  - Auto-detects available clients
248
375
  - Type-safe API calls with generics
376
+ - Can be added later via `setup --http-client`
377
+
378
+ ### 🌙 Dark Mode Support
379
+
380
+ - next-themes integration with CustomThemeProvider
381
+ - Automatic CSS variable setup (`--color-dark`, `--color-light`)
382
+ - Tailwind CSS v4 custom variant (`@custom-variant dark`)
383
+ - Layout className updates (`bg-light dark:bg-dark`)
384
+ - Can be added via `setup --dark-theme`
385
+
386
+ ### 🌍 Internationalization
387
+
388
+ - next-intl with routing middleware
389
+ - Translation management system
390
+ - Locale type safety
391
+ - [locale] route structure
392
+ - Can be added via `setup --i18n`
249
393
 
250
394
  ### 🎯 Intelligent Path Handling
251
395
 
@@ -259,9 +403,10 @@ All commands support `--path` for custom locations:
259
403
  ### ✅ Built-in Validations
260
404
 
261
405
  - Checks for required dependencies (Redux, HTTP clients)
262
- - Prevents duplicate generation
406
+ - Prevents duplicate generation and setups
263
407
  - Validates naming conventions (kebab-case)
264
408
  - Ensures consistent project structure
409
+ - Validates GitHub repository URLs
265
410
 
266
411
  ---
267
412
 
@@ -275,6 +420,26 @@ All commands support:
275
420
  - `--path <path>` - Custom generation path
276
421
  - `--help` - Show command help
277
422
 
423
+ ### Init/App Options
424
+
425
+ Interactive prompts guide you through:
426
+
427
+ - Project name, description, version
428
+ - Package manager selection
429
+ - GitHub repository (optional)
430
+ - HTTP client selection
431
+ - Dark mode, Redux, i18n toggles
432
+ - Docker, CI/CD, pre-commit hooks
433
+
434
+ ### Setup Options
435
+
436
+ ```bash
437
+ --http-client <type> # Setup HTTP client (axios|fetch|both)
438
+ --dark-theme # Setup dark theme support
439
+ --redux # Setup Redux Toolkit
440
+ --i18n # Setup internationalization
441
+ ```
442
+
278
443
  ### Feature Options
279
444
 
280
445
  ```bash
@@ -377,10 +542,18 @@ yarn build
377
542
 
378
543
  ```bash
379
544
  # Test app generation
380
- node dist/index.js app test-project
545
+ node dist/index.js init test-project
381
546
 
382
- # Test feature generation
547
+ # Navigate to test project
383
548
  cd test-project
549
+
550
+ # Test setup commands
551
+ node ../dist/index.js setup --http-client both
552
+ node ../dist/index.js setup --dark-theme
553
+ node ../dist/index.js setup --redux
554
+ node ../dist/index.js setup --i18n
555
+
556
+ # Test feature generation
384
557
  node ../dist/index.js feature auth --store persist --service axios
385
558
 
386
559
  # Test slice generation