create-react-forge 1.5.1 → 1.5.2
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/README.md +46 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
[](https://github.com/chiragmak10/create-react-forge/actions/workflows/codeql.yml)
|
|
2
|
+
[](https://github.com/chiragmak10/create-react-forge/actions/workflows/release.yml)
|
|
3
|
+
[](https://github.com/chiragmak10/create-react-forge/actions/workflows/dependency-review.yml)
|
|
4
|
+
[](https://github.com/chiragmak10/create-react-forge/actions/workflows/ci.yml)
|
|
1
5
|
# create-react-forge
|
|
2
6
|
|
|
3
7
|
Production-ready React scaffolding CLI with first-class testing, flexible runtimes (Vite/Next.js), and a composable template system inspired by [bulletproof-react](https://github.com/alan2207/bulletproof-react).
|
|
4
8
|
|
|
5
9
|
## Requirements
|
|
6
10
|
|
|
7
|
-
- Node.js **>=
|
|
11
|
+
- Node.js **>= 20.9.0**
|
|
8
12
|
|
|
9
13
|
## Quick start
|
|
10
14
|
|
|
@@ -27,14 +31,14 @@ When you run `create-react-forge`, it will:
|
|
|
27
31
|
|
|
28
32
|
- Ask a few questions (runtime, language, styling, testing, etc.)
|
|
29
33
|
- Generate a new project directory (the directory **must not already exist**)
|
|
30
|
-
- Optionally initialize a git
|
|
31
|
-
- Print the
|
|
34
|
+
- Optionally initialize a git repository
|
|
35
|
+
- Print the "next steps" commands
|
|
32
36
|
|
|
33
|
-
Note: it **does not automatically install dependencies** — you
|
|
37
|
+
Note: it **does not automatically install dependencies** — you'll run your package manager install after generation.
|
|
34
38
|
|
|
35
|
-
## Interactive prompts
|
|
39
|
+
## Interactive prompts
|
|
36
40
|
|
|
37
|
-
The CLI is
|
|
41
|
+
The CLI is **prompt-driven**. You'll choose:
|
|
38
42
|
|
|
39
43
|
- **Project name** (lowercase letters/numbers/hyphens)
|
|
40
44
|
- **Project directory**
|
|
@@ -48,7 +52,6 @@ The CLI is currently **prompt-driven**. You’ll choose:
|
|
|
48
52
|
- **Data fetching**: include TanStack Query
|
|
49
53
|
- **Package manager**: npm / yarn / pnpm
|
|
50
54
|
- **Git init**: yes/no
|
|
51
|
-
- **Prettier**: yes/no
|
|
52
55
|
|
|
53
56
|
## What you get
|
|
54
57
|
|
|
@@ -59,17 +62,21 @@ my-app/
|
|
|
59
62
|
├── src/
|
|
60
63
|
│ ├── app/ # App setup (providers, router)
|
|
61
64
|
│ ├── components/ # Shared UI components
|
|
65
|
+
│ │ ├── ui/ # Base UI primitives
|
|
66
|
+
│ │ └── errors/ # Error boundaries & fallbacks
|
|
62
67
|
│ ├── features/ # Feature-based modules
|
|
63
68
|
│ ├── hooks/ # Custom hooks
|
|
64
69
|
│ ├── lib/ # Utilities, API client
|
|
65
70
|
│ ├── stores/ # State management (if selected)
|
|
71
|
+
│ ├── styles/ # Global styles
|
|
66
72
|
│ ├── testing/ # Test utilities, mocks (if selected)
|
|
67
73
|
│ └── types/ # Shared types
|
|
68
74
|
├── tests/ # E2E tests (if selected)
|
|
75
|
+
├── ARCHITECTURE.md # Auto-generated architecture docs
|
|
69
76
|
└── [config files]
|
|
70
77
|
```
|
|
71
78
|
|
|
72
|
-
## Configuration options
|
|
79
|
+
## Configuration options
|
|
73
80
|
|
|
74
81
|
| Category | Choices |
|
|
75
82
|
|---|---|
|
|
@@ -82,10 +89,25 @@ my-app/
|
|
|
82
89
|
| **E2E runner** | `playwright`, `cypress` |
|
|
83
90
|
| **Data fetching** | TanStack Query on/off |
|
|
84
91
|
| **Package manager** | `npm`, `yarn`, `pnpm` |
|
|
85
|
-
| **Formatting** | Prettier on/off |
|
|
86
92
|
| **Git** | init on/off |
|
|
87
93
|
|
|
94
|
+
## Dependency versions
|
|
95
|
+
|
|
96
|
+
The CLI uses pinned, tested versions for all dependencies:
|
|
97
|
+
|
|
98
|
+
| Package | Version |
|
|
99
|
+
|---|---|
|
|
100
|
+
| React | ^19.0.0 |
|
|
101
|
+
| Vite | ^6.0.7 |
|
|
102
|
+
| Next.js | ^16.1.6 |
|
|
103
|
+
| Tailwind CSS | ^4.0.0 |
|
|
104
|
+
| TanStack Query | ^5.62.10 |
|
|
105
|
+
| Vitest | ^2.1.8 |
|
|
106
|
+
| Playwright | ^1.49.1 |
|
|
107
|
+
| TypeScript | ^5.7.2 |
|
|
108
|
+
|
|
88
109
|
## Screenshot
|
|
110
|
+
|
|
89
111
|
<img width="709" height="1047" alt="image" src="https://github.com/user-attachments/assets/dc8956a9-473b-4001-8c2d-0b3b54f29583" />
|
|
90
112
|
|
|
91
113
|
## Next steps (after generation)
|
|
@@ -96,9 +118,9 @@ npm install
|
|
|
96
118
|
npm run dev
|
|
97
119
|
```
|
|
98
120
|
|
|
99
|
-
## Advanced:
|
|
121
|
+
## Advanced: API exports
|
|
100
122
|
|
|
101
|
-
This package exposes
|
|
123
|
+
This package exposes advanced entrypoints for tooling integration:
|
|
102
124
|
|
|
103
125
|
### Config schema (Zod)
|
|
104
126
|
|
|
@@ -114,24 +136,30 @@ const parsed = ProjectConfigSchema.parse(DEFAULT_CONFIG);
|
|
|
114
136
|
import { TemplateRegistry } from 'create-react-forge/templates';
|
|
115
137
|
|
|
116
138
|
const registry = new TemplateRegistry();
|
|
117
|
-
|
|
139
|
+
const templates = registry.loadTemplatesForConfig({
|
|
140
|
+
runtime: 'vite',
|
|
141
|
+
styling: { solution: 'tailwind' },
|
|
142
|
+
stateManagement: 'zustand',
|
|
143
|
+
testing: { enabled: true, unit: { runner: 'vitest' }, e2e: { enabled: true, runner: 'playwright' } },
|
|
144
|
+
dataFetching: { enabled: true },
|
|
145
|
+
});
|
|
118
146
|
```
|
|
119
147
|
|
|
120
148
|
## Troubleshooting
|
|
121
149
|
|
|
122
|
-
-
|
|
123
|
-
- **Node version issues**: ensure `node -v` is **
|
|
150
|
+
- **"Directory already exists"**: pick a new project directory (or delete the existing folder).
|
|
151
|
+
- **Node version issues**: ensure `node -v` is **20.9.0+**.
|
|
124
152
|
- **Install step**: dependencies are not installed automatically — run your package manager install in the generated folder.
|
|
125
153
|
|
|
126
154
|
## Architecture & development
|
|
127
155
|
|
|
128
|
-
See [ARCHITECTURE.md](
|
|
156
|
+
See [ARCHITECTURE.md](./ARCHITECTURE.md) for internal design details.
|
|
129
157
|
|
|
130
158
|
```bash
|
|
131
159
|
npm install
|
|
132
|
-
npm run dev
|
|
133
|
-
npm run test
|
|
134
|
-
npm run build
|
|
160
|
+
npm run dev # Run CLI in development
|
|
161
|
+
npm run test # Run tests
|
|
162
|
+
npm run build # Build to dist/
|
|
135
163
|
```
|
|
136
164
|
|
|
137
165
|
## License
|