@daawoonkim/create-arch-app 0.1.0 β 0.2.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/.github/WORKFLOWS.md +255 -0
- package/.github/workflows/deploy-main.yml +101 -0
- package/.github/workflows/lint.yml +33 -0
- package/.github/workflows/publish.yml +82 -0
- package/.github/workflows/test.yml +52 -0
- package/CHANGELOG.md +35 -0
- package/CONTRIBUTING.md +172 -0
- package/PUBLISHING.md +304 -0
- package/README.md +76 -2
- package/dist/generators/index.js +69 -9
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/nextjs.d.ts.map +1 -1
- package/dist/generators/nextjs.js +107 -50
- package/dist/generators/nextjs.js.map +1 -1
- package/dist/generators/react.d.ts.map +1 -1
- package/dist/generators/react.js +23 -1
- package/dist/generators/react.js.map +1 -1
- package/dist/prompts/projectSetup.d.ts.map +1 -1
- package/dist/prompts/projectSetup.js +22 -0
- package/dist/prompts/projectSetup.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/apiGenerator.d.ts +4 -0
- package/dist/utils/apiGenerator.d.ts.map +1 -0
- package/dist/utils/apiGenerator.js +440 -0
- package/dist/utils/apiGenerator.js.map +1 -0
- package/dist/utils/dependencies.d.ts.map +1 -1
- package/dist/utils/dependencies.js +15 -0
- package/dist/utils/dependencies.js.map +1 -1
- package/package.json +1 -1
- package/create-arch-app_mvp_faa8b53b.plan.md +0 -454
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Contributing to create-arch-app
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to create-arch-app! π
|
|
4
|
+
|
|
5
|
+
## π Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
- Node.js 18.0.0 or higher
|
|
9
|
+
- npm or yarn
|
|
10
|
+
- Git
|
|
11
|
+
|
|
12
|
+
### Setup Development Environment
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Clone the repository
|
|
16
|
+
git clone git@github.com:hec8897/create-arch-app.git
|
|
17
|
+
cd create-arch-app
|
|
18
|
+
|
|
19
|
+
# Install dependencies
|
|
20
|
+
npm install
|
|
21
|
+
|
|
22
|
+
# Build the project
|
|
23
|
+
npm run build
|
|
24
|
+
|
|
25
|
+
# Link for local testing
|
|
26
|
+
npm link
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## π Development Workflow
|
|
30
|
+
|
|
31
|
+
### 1. Create a Feature Branch
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git checkout main
|
|
35
|
+
git pull origin main
|
|
36
|
+
git checkout -b feature/your-feature-name
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Make Your Changes
|
|
40
|
+
|
|
41
|
+
- Write clear, concise commit messages
|
|
42
|
+
- Follow existing code style
|
|
43
|
+
- Add tests if applicable
|
|
44
|
+
- Update documentation
|
|
45
|
+
|
|
46
|
+
### 3. Test Your Changes
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Build
|
|
50
|
+
npm run build
|
|
51
|
+
|
|
52
|
+
# Test locally
|
|
53
|
+
cd ~/test-projects
|
|
54
|
+
create-arch-app test-app
|
|
55
|
+
|
|
56
|
+
# Verify the generated project
|
|
57
|
+
cd test-app
|
|
58
|
+
npm install
|
|
59
|
+
npm run dev
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 4. Commit Your Changes
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git add .
|
|
66
|
+
git commit -m "feat: add new feature"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Commit Message Format:**
|
|
70
|
+
- `feat:` - New feature
|
|
71
|
+
- `fix:` - Bug fix
|
|
72
|
+
- `docs:` - Documentation changes
|
|
73
|
+
- `style:` - Code style changes (formatting, etc.)
|
|
74
|
+
- `refactor:` - Code refactoring
|
|
75
|
+
- `test:` - Adding or updating tests
|
|
76
|
+
- `chore:` - Build process or auxiliary tool changes
|
|
77
|
+
|
|
78
|
+
### 5. Push and Create PR
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
git push origin feature/your-feature-name
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then create a Pull Request on GitHub.
|
|
85
|
+
|
|
86
|
+
## π Code Guidelines
|
|
87
|
+
|
|
88
|
+
### TypeScript
|
|
89
|
+
- Use TypeScript for all new code
|
|
90
|
+
- Maintain type safety
|
|
91
|
+
- Use interfaces for public APIs
|
|
92
|
+
|
|
93
|
+
### File Structure
|
|
94
|
+
- Keep generators modular
|
|
95
|
+
- Separate concerns (prompts, generators, utils)
|
|
96
|
+
- Use meaningful file and function names
|
|
97
|
+
|
|
98
|
+
### Testing
|
|
99
|
+
- Test major features manually
|
|
100
|
+
- Verify all architecture patterns work
|
|
101
|
+
- Check both React and Next.js outputs
|
|
102
|
+
|
|
103
|
+
## π Bug Reports
|
|
104
|
+
|
|
105
|
+
When reporting bugs, please include:
|
|
106
|
+
- Steps to reproduce
|
|
107
|
+
- Expected behavior
|
|
108
|
+
- Actual behavior
|
|
109
|
+
- Your environment (OS, Node version)
|
|
110
|
+
- CLI options used
|
|
111
|
+
|
|
112
|
+
## π‘ Feature Requests
|
|
113
|
+
|
|
114
|
+
We welcome feature requests! Please:
|
|
115
|
+
- Check if it already exists in issues
|
|
116
|
+
- Describe the use case
|
|
117
|
+
- Explain why it would be useful
|
|
118
|
+
- Consider backward compatibility
|
|
119
|
+
|
|
120
|
+
## π¦ Adding New Features
|
|
121
|
+
|
|
122
|
+
### Adding a New Architecture Pattern
|
|
123
|
+
|
|
124
|
+
1. Update `src/types.ts` with new architecture type
|
|
125
|
+
2. Add prompt option in `src/prompts/projectSetup.ts`
|
|
126
|
+
3. Create generator logic in `src/generators/`
|
|
127
|
+
4. Test with both React and Next.js
|
|
128
|
+
5. Update README.md and documentation
|
|
129
|
+
|
|
130
|
+
### Adding a New Library Option
|
|
131
|
+
|
|
132
|
+
1. Update types in `src/types.ts`
|
|
133
|
+
2. Add prompt in `src/prompts/projectSetup.ts`
|
|
134
|
+
3. Update `src/utils/dependencies.ts`
|
|
135
|
+
4. Update generators to include the library
|
|
136
|
+
5. Test integration
|
|
137
|
+
6. Update documentation
|
|
138
|
+
|
|
139
|
+
## β
Pull Request Checklist
|
|
140
|
+
|
|
141
|
+
Before submitting a PR, ensure:
|
|
142
|
+
|
|
143
|
+
- [ ] Code builds successfully (`npm run build`)
|
|
144
|
+
- [ ] Tested manually with at least 2 architecture patterns
|
|
145
|
+
- [ ] Updated README.md if needed
|
|
146
|
+
- [ ] Updated CHANGELOG.md
|
|
147
|
+
- [ ] Commit messages follow convention
|
|
148
|
+
- [ ] No console.logs in production code
|
|
149
|
+
- [ ] TypeScript types are correct
|
|
150
|
+
|
|
151
|
+
## π― Priority Areas
|
|
152
|
+
|
|
153
|
+
We're especially interested in contributions for:
|
|
154
|
+
- Additional architecture patterns
|
|
155
|
+
- More library integrations
|
|
156
|
+
- Improved error handling
|
|
157
|
+
- Better testing coverage
|
|
158
|
+
- Documentation improvements
|
|
159
|
+
|
|
160
|
+
## π Questions?
|
|
161
|
+
|
|
162
|
+
- Open an issue for discussion
|
|
163
|
+
- Check existing issues and PRs
|
|
164
|
+
- Review documentation
|
|
165
|
+
|
|
166
|
+
## π License
|
|
167
|
+
|
|
168
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
Thank you for contributing! π
|
package/PUBLISHING.md
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
# npm λ°°ν¬ κ°μ΄λ
|
|
2
|
+
|
|
3
|
+
μ΄ λ¬Έμλ `@daawoonkim/create-arch-app` ν¨ν€μ§λ₯Ό npmμ λ°°ν¬νλ λ°©λ²μ μ€λͺ
ν©λλ€.
|
|
4
|
+
|
|
5
|
+
## π μ¬μ μꡬμ¬ν
|
|
6
|
+
|
|
7
|
+
- npm κ³μ (https://www.npmjs.com/)
|
|
8
|
+
- npm CLI λ‘κ·ΈμΈ
|
|
9
|
+
- νλ‘μ νΈ λΉλ μλ£
|
|
10
|
+
|
|
11
|
+
## π 1. npm μΈμ¦ μ€μ
|
|
12
|
+
|
|
13
|
+
### λ°©λ² 1: Automation Token μ¬μ© (κΆμ₯)
|
|
14
|
+
|
|
15
|
+
**npm μΉμ¬μ΄νΈμμ ν ν° μμ±:**
|
|
16
|
+
|
|
17
|
+
1. https://www.npmjs.com/settings/daawoonkim/tokens μ μ
|
|
18
|
+
2. "Generate New Token" ν΄λ¦
|
|
19
|
+
3. **Token Type: "Automation"** μ ν (μ€μ!)
|
|
20
|
+
4. μ€λͺ
μ
λ ₯ (μ: "create-arch-app deployment")
|
|
21
|
+
5. "Generate Token" ν΄λ¦
|
|
22
|
+
6. ν ν° λ³΅μ¬ (ν λ²λ§ νμλ¨!)
|
|
23
|
+
|
|
24
|
+
**λ‘컬μ ν ν° μ€μ :**
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# .npmrc νμΌμ ν ν° μΆκ°
|
|
28
|
+
echo "//registry.npmjs.org/:_authToken=YOUR_TOKEN_HERE" > ~/.npmrc
|
|
29
|
+
|
|
30
|
+
# κΆν μ€μ
|
|
31
|
+
chmod 600 ~/.npmrc
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`YOUR_TOKEN_HERE`λ₯Ό μμ±ν ν ν°μΌλ‘ κ΅μ²΄νμΈμ.
|
|
35
|
+
|
|
36
|
+
### λ°©λ² 2: λΈλΌμ°μ λ‘κ·ΈμΈ
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm login
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
λΈλΌμ°μ κ° μ΄λ¦¬λ©΄ λ‘κ·ΈμΈνκ³ μΈμ¦μ μλ£νμΈμ.
|
|
43
|
+
|
|
44
|
+
### λ°©λ² 3: OTP μ¬μ©
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# λ‘κ·ΈμΈ
|
|
48
|
+
npm login
|
|
49
|
+
|
|
50
|
+
# λ°°ν¬ μ OTP μ½λ ν¬ν¨
|
|
51
|
+
npm publish --access public --otp=123456
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
μΈμ¦ μ±μμ 6μ리 μ½λλ₯Ό λ°μ μ¬μ©νμΈμ.
|
|
55
|
+
|
|
56
|
+
## π¦ 2. λ°°ν¬ μ 체ν¬λ¦¬μ€νΈ
|
|
57
|
+
|
|
58
|
+
### λ²μ νμΈ λ° μ
λ°μ΄νΈ
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# νμ¬ λ²μ νμΈ
|
|
62
|
+
npm version
|
|
63
|
+
|
|
64
|
+
# λ²μ μ
λ°μ΄νΈ (μλμΌλ‘ git tag μμ±)
|
|
65
|
+
npm version patch # 0.1.0 -> 0.1.1 (λ²κ·Έ μμ )
|
|
66
|
+
npm version minor # 0.1.0 -> 0.2.0 (μ κΈ°λ₯)
|
|
67
|
+
npm version major # 0.1.0 -> 1.0.0 (ν° λ³κ²½)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### λΉλ νμΈ
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# TypeScript μ»΄νμΌ
|
|
74
|
+
npm run build
|
|
75
|
+
|
|
76
|
+
# dist ν΄λ νμΈ
|
|
77
|
+
ls -la dist/
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### ν
μ€νΈ μ€ν
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# λ‘컬μμ CLI ν
μ€νΈ
|
|
84
|
+
npm link
|
|
85
|
+
create-arch-app test-project
|
|
86
|
+
|
|
87
|
+
# λ§ν¬ ν΄μ
|
|
88
|
+
npm unlink -g create-arch-app
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### package.json νμΈ
|
|
92
|
+
|
|
93
|
+
νμ νλ νμΈ:
|
|
94
|
+
- β
`name`: `@daawoonkim/create-arch-app`
|
|
95
|
+
- β
`version`: μ
λ°μ΄νΈλ λ²μ
|
|
96
|
+
- β
`description`: ν¨ν€μ§ μ€λͺ
|
|
97
|
+
- β
`keywords`: κ²μ ν€μλ
|
|
98
|
+
- β
`repository`: GitHub λ§ν¬
|
|
99
|
+
- β
`license`: MIT
|
|
100
|
+
- β
`bin`: CLI μ§μ
μ
|
|
101
|
+
|
|
102
|
+
### .npmignore νμΈ
|
|
103
|
+
|
|
104
|
+
λ°°ν¬μμ μ μΈν νμΌ νμΈ:
|
|
105
|
+
```
|
|
106
|
+
src/
|
|
107
|
+
*.plan.md
|
|
108
|
+
tsconfig.json
|
|
109
|
+
.git/
|
|
110
|
+
.github/
|
|
111
|
+
test-output/
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## π 3. λ°°ν¬ μ€ν
|
|
115
|
+
|
|
116
|
+
### λ°°ν¬ λͺ
λ Ήμ΄
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npm publish --access public
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### λ°°ν¬ νμΈ
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# npmμμ ν¨ν€μ§ μ 보 νμΈ
|
|
126
|
+
npm info @daawoonkim/create-arch-app
|
|
127
|
+
|
|
128
|
+
# μ€μΉ ν
μ€νΈ
|
|
129
|
+
npx @daawoonkim/create-arch-app test-app
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## π·οΈ 4. Git νκ·Έ λ° λ¦΄λ¦¬μ¦
|
|
133
|
+
|
|
134
|
+
### Git νκ·Έ μμ±
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# νκ·Έ μμ± (npm versionμ΄ μλ μμ±νμ§λ§, μλμΌλ‘λ κ°λ₯)
|
|
138
|
+
git tag v0.1.1
|
|
139
|
+
|
|
140
|
+
# νκ·Έ νΈμ
|
|
141
|
+
git push --tags
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### GitHub λ¦΄λ¦¬μ¦ μμ±
|
|
145
|
+
|
|
146
|
+
1. https://github.com/hec8897/create-arch-app/releases μ μ
|
|
147
|
+
2. "Create a new release" ν΄λ¦
|
|
148
|
+
3. νκ·Έ μ ν (v0.1.1)
|
|
149
|
+
4. λ¦΄λ¦¬μ¦ λ
ΈνΈ μμ±:
|
|
150
|
+
|
|
151
|
+
```markdown
|
|
152
|
+
## v0.1.1
|
|
153
|
+
|
|
154
|
+
### π Bug Fixes
|
|
155
|
+
- λ²κ·Έ μμ λ΄μ©
|
|
156
|
+
|
|
157
|
+
### β¨ Features
|
|
158
|
+
- μλ‘μ΄ κΈ°λ₯
|
|
159
|
+
|
|
160
|
+
### π Documentation
|
|
161
|
+
- λ¬Έμ μ
λ°μ΄νΈ
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
5. "Publish release" ν΄λ¦
|
|
165
|
+
|
|
166
|
+
## π 5. μ 체 λ°°ν¬ μν¬νλ‘μ°
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# 1. λ³κ²½μ¬ν 컀λ°
|
|
170
|
+
git add .
|
|
171
|
+
git commit -m "feat: add new feature"
|
|
172
|
+
|
|
173
|
+
# 2. λ²μ μ
λ°μ΄νΈ (μλμΌλ‘ tag μμ±)
|
|
174
|
+
npm version patch
|
|
175
|
+
|
|
176
|
+
# 3. λΉλ
|
|
177
|
+
npm run build
|
|
178
|
+
|
|
179
|
+
# 4. λ°°ν¬
|
|
180
|
+
npm publish --access public
|
|
181
|
+
|
|
182
|
+
# 5. Git νΈμ (νκ·Έ ν¬ν¨)
|
|
183
|
+
git push origin main --tags
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## β οΈ 6. λ¬Έμ ν΄κ²°
|
|
187
|
+
|
|
188
|
+
### 2FA μλ¬
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
npm ERR! 403 Two-factor authentication required
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**ν΄κ²°μ±
:**
|
|
195
|
+
- OTP μ½λ μ¬μ©: `npm publish --access public --otp=123456`
|
|
196
|
+
- λλ Automation Token μ¬μ© (μ 1λ¨κ³ μ°Έμ‘°)
|
|
197
|
+
|
|
198
|
+
### μΈμ¦ μλ¬
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
npm ERR! 401 Unauthorized
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**ν΄κ²°μ±
:**
|
|
205
|
+
```bash
|
|
206
|
+
npm logout
|
|
207
|
+
npm login
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### λ²μ μΆ©λ
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
npm ERR! 403 cannot publish over existing version
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**ν΄κ²°μ±
:**
|
|
217
|
+
```bash
|
|
218
|
+
# λ²μ μ
λ°μ΄νΈ
|
|
219
|
+
npm version patch
|
|
220
|
+
npm publish --access public
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## π 7. λ°°ν¬ ν νμΈ
|
|
224
|
+
|
|
225
|
+
### npm ν¨ν€μ§ νμ΄μ§
|
|
226
|
+
https://www.npmjs.com/package/@daawoonkim/create-arch-app
|
|
227
|
+
|
|
228
|
+
### λ€μ΄λ‘λ ν΅κ³
|
|
229
|
+
```bash
|
|
230
|
+
npm info @daawoonkim/create-arch-app
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### μ¬μ©μ ν
μ€νΈ
|
|
234
|
+
```bash
|
|
235
|
+
# λ€λ₯Έ λλ ν 리μμ
|
|
236
|
+
cd ~/test-npm-package
|
|
237
|
+
npx @daawoonkim/create-arch-app my-test-app
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## π 8. 보μ
|
|
241
|
+
|
|
242
|
+
### .npmrc νμΌ λ³΄νΈ
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# μ λλ‘ Gitμ 컀λ°νμ§ λ§μΈμ!
|
|
246
|
+
echo ".npmrc" >> .gitignore
|
|
247
|
+
|
|
248
|
+
# νμΌ κΆν μ€μ
|
|
249
|
+
chmod 600 ~/.npmrc
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### ν ν° κ°±μ
|
|
253
|
+
|
|
254
|
+
Automation Tokenμ λ§λ£λμ§ μμ§λ§, μ κΈ°μ μΌλ‘ κ°±μ νλ κ²μ΄ μ’μ΅λλ€:
|
|
255
|
+
1. npm μΉμ¬μ΄νΈμμ κΈ°μ‘΄ ν ν° μμ
|
|
256
|
+
2. μ ν ν° μμ±
|
|
257
|
+
3. ~/.npmrc νμΌ μ
λ°μ΄νΈ
|
|
258
|
+
|
|
259
|
+
## π 9. λ²μ κ΄λ¦¬ μ λ΅
|
|
260
|
+
|
|
261
|
+
### Semantic Versioning
|
|
262
|
+
|
|
263
|
+
- **MAJOR** (1.0.0): νΈνλμ§ μλ API λ³κ²½
|
|
264
|
+
- **MINOR** (0.1.0): νμ νΈνλλ μ κΈ°λ₯
|
|
265
|
+
- **PATCH** (0.0.1): νμ νΈνλλ λ²κ·Έ μμ
|
|
266
|
+
|
|
267
|
+
### λ²μ μ
λ°μ΄νΈ κ°μ΄λ
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# λ²κ·Έ μμ
|
|
271
|
+
npm version patch
|
|
272
|
+
|
|
273
|
+
# μ κΈ°λ₯ μΆκ° (νμ νΈν)
|
|
274
|
+
npm version minor
|
|
275
|
+
|
|
276
|
+
# ν° λ³κ²½ (Breaking Changes)
|
|
277
|
+
npm version major
|
|
278
|
+
|
|
279
|
+
# λ² ν λ²μ
|
|
280
|
+
npm version prerelease --preid=beta
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## π― 10. 체ν¬λ¦¬μ€νΈ
|
|
284
|
+
|
|
285
|
+
λ°°ν¬ μ νμΈμ¬ν:
|
|
286
|
+
|
|
287
|
+
- [ ] μ½λ λ³κ²½μ¬ν μ»€λ° μλ£
|
|
288
|
+
- [ ] ν
μ€νΈ ν΅κ³Ό
|
|
289
|
+
- [ ] λ²μ μ
λ°μ΄νΈ (`npm version`)
|
|
290
|
+
- [ ] CHANGELOG μ
λ°μ΄νΈ
|
|
291
|
+
- [ ] README μ
λ°μ΄νΈ
|
|
292
|
+
- [ ] λΉλ μ±κ³΅ (`npm run build`)
|
|
293
|
+
- [ ] npm λ‘κ·ΈμΈ νμΈ
|
|
294
|
+
- [ ] λ°°ν¬ μ€ν (`npm publish --access public`)
|
|
295
|
+
- [ ] Git νκ·Έ νΈμ (`git push --tags`)
|
|
296
|
+
- [ ] GitHub λ¦΄λ¦¬μ¦ μμ±
|
|
297
|
+
- [ ] npm ν¨ν€μ§ νμ΄μ§ νμΈ
|
|
298
|
+
- [ ] μ€μ μ€μΉ ν
μ€νΈ
|
|
299
|
+
|
|
300
|
+
## π μ°Έκ³ μλ£
|
|
301
|
+
|
|
302
|
+
- npm λ¬Έμ: https://docs.npmjs.com/
|
|
303
|
+
- Semantic Versioning: https://semver.org/
|
|
304
|
+
- npm ν ν°: https://docs.npmjs.com/about-access-tokens
|
package/README.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
# create-arch-app
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@daawoonkim/create-arch-app)
|
|
4
|
+
[](https://www.npmjs.com/package/@daawoonkim/create-arch-app)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+

|
|
7
|
+
[](https://github.com/hec8897/create-arch-app/actions/workflows/test.yml)
|
|
8
|
+
[](https://github.com/hec8897/create-arch-app/actions/workflows/lint.yml)
|
|
9
|
+
|
|
3
10
|
DDD, Clean Architecture, Atomic Designμ μ§μνλ λνν React/Next.js νλ‘μ νΈ μμ± CLI λꡬ
|
|
4
11
|
|
|
12
|
+
**π¦ npm**: https://www.npmjs.com/package/@daawoonkim/create-arch-app
|
|
13
|
+
|
|
14
|
+
> β οΈ **νμ¬ MVP(Minimum Viable Product) λ²μ μ
λλ€.** ν΅μ¬ κΈ°λ₯μ λͺ¨λ μλνμ§λ§, νλ°ν κ°λ° μ€μ΄λ©° νΌλλ°±μ λ°κ³ μμ΅λλ€. μ΄μλ μ μ μ¬νμ΄ μμΌμλ©΄ [GitHub Issues](https://github.com/hec8897/create-arch-app/issues)μ λ¨κ²¨μ£ΌμΈμ!
|
|
15
|
+
|
|
5
16
|
## νΉμ§
|
|
6
17
|
|
|
7
18
|
β¨ **4κ°μ§ μν€ν
μ² ν¨ν΄ μ§μ**
|
|
@@ -238,14 +249,54 @@ cd ~/test-project
|
|
|
238
249
|
create-arch-app my-test-app
|
|
239
250
|
```
|
|
240
251
|
|
|
252
|
+
### npm λ°°ν¬
|
|
253
|
+
|
|
254
|
+
npm λ°°ν¬ λ°©λ²μ [PUBLISHING.md](./PUBLISHING.md)λ₯Ό μ°Έμ‘°νμΈμ.
|
|
255
|
+
|
|
256
|
+
**μλ λ°°ν¬:** main λΈλμΉμ mergeλλ©΄ μλμΌλ‘ npm λ°°ν¬κ° μ€νλ©λλ€!
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# 1. λ²μ μ
λ°μ΄νΈ
|
|
260
|
+
npm version patch # 0.1.0 β 0.1.1
|
|
261
|
+
|
|
262
|
+
# 2. PR μμ± λ° merge
|
|
263
|
+
# mainμ merge β μλ λ°°ν¬!
|
|
264
|
+
|
|
265
|
+
# μμΈν λ΄μ©: .github/WORKFLOWS.md
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## λ²μ μ 보
|
|
269
|
+
|
|
270
|
+
### v0.1.0 - MVP λ¦΄λ¦¬μ¦ (νμ¬)
|
|
271
|
+
|
|
272
|
+
**ν¬ν¨λ κΈ°λ₯:**
|
|
273
|
+
- β
4κ°μ§ μν€ν
μ² ν¨ν΄ (DDD, Clean Architecture, Atomic Design, Default)
|
|
274
|
+
- β
React (Vite) & Next.js (App Router / Pages Router) μ§μ
|
|
275
|
+
- β
Next.js λ²μ μ ν (Latest, 15.x, 14.x, 13.x)
|
|
276
|
+
- β
TypeScript κΈ°λ³Έ ν¬ν¨
|
|
277
|
+
- β
μ€νμΌλ§: Tailwind CSS, CSS Modules
|
|
278
|
+
- β
μνκ΄λ¦¬: Zustand, Context API
|
|
279
|
+
- β
νΌ: React Hook Form
|
|
280
|
+
- β
ν
μ€ν
: Vitest + Testing Library
|
|
281
|
+
- β
νμ¬ λλ ν 리 μμ± μ§μ (`.` μ΅μ
)
|
|
282
|
+
|
|
283
|
+
**μλ €μ§ μ νμ¬ν:**
|
|
284
|
+
- μΌλΆ μ‘°ν©μμ ν
μ€νΈκ° μλ£λμ§ μμμ μ μμ΅λλ€
|
|
285
|
+
- μλ¬ μ²λ¦¬ κ°μ νμ
|
|
286
|
+
- λ λ§μ 컀μ€ν°λ§μ΄μ§ μ΅μ
μΆκ° μμ
|
|
287
|
+
|
|
241
288
|
## λ‘λλ§΅
|
|
242
289
|
|
|
290
|
+
### v0.2.0 (κ³ν μ€)
|
|
291
|
+
- [ ] μΆκ° UI λΌμ΄λΈλ¬λ¦¬ ν΅ν© (shadcn/ui, MUI)
|
|
292
|
+
- [ ] λ λ§μ ν
μ€νΈ λ° μμ μ± κ°μ
|
|
293
|
+
- [ ] μ»΄ν¬λνΈ μμ±κΈ° μΆκ°
|
|
294
|
+
|
|
295
|
+
### v0.3.0 μ΄ν
|
|
243
296
|
- [ ] μΆκ° μν€ν
μ² ν¨ν΄ (Feature-Sliced Design, Hexagonal Architecture)
|
|
244
|
-
- [ ] UI λΌμ΄λΈλ¬λ¦¬ ν΅ν© (shadcn/ui, MUI, Ant Design)
|
|
245
297
|
- [ ] μΆκ° μνκ΄λ¦¬ μ΅μ
(Redux Toolkit, Jotai, Recoil)
|
|
246
298
|
- [ ] μΈμ¦ ν΅ν© (NextAuth, Supabase)
|
|
247
299
|
- [ ] ORM ν΅ν© (Prisma, Drizzle)
|
|
248
|
-
- [ ] μ»΄ν¬λνΈ μμ±κΈ°
|
|
249
300
|
- [ ] CI/CD μ€μ μλν
|
|
250
301
|
- [ ] Docker μ€μ ν¬ν¨
|
|
251
302
|
- [ ] Monorepo μ§μ (Turborepo)
|
|
@@ -254,6 +305,29 @@ create-arch-app my-test-app
|
|
|
254
305
|
|
|
255
306
|
λ²κ·Έ 리ν¬νΈ, κΈ°λ₯ μ μ, PR λͺ¨λ νμν©λλ€!
|
|
256
307
|
|
|
308
|
+
μμΈν λ΄μ©μ [CONTRIBUTING.md](./CONTRIBUTING.md)λ₯Ό μ°Έμ‘°νμΈμ.
|
|
309
|
+
|
|
310
|
+
### κ°λ° νκ²½ μ€μ
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# μ μ₯μ ν΄λ‘
|
|
314
|
+
git clone git@github.com:hec8897/create-arch-app.git
|
|
315
|
+
cd create-arch-app
|
|
316
|
+
|
|
317
|
+
# μμ‘΄μ± μ€μΉ
|
|
318
|
+
npm install
|
|
319
|
+
|
|
320
|
+
# TypeScript μ»΄νμΌ
|
|
321
|
+
npm run build
|
|
322
|
+
|
|
323
|
+
# λ‘컬 λ§ν¬ μμ±
|
|
324
|
+
npm link
|
|
325
|
+
|
|
326
|
+
# ν
μ€νΈ
|
|
327
|
+
cd ~/test-project
|
|
328
|
+
create-arch-app my-test-app
|
|
329
|
+
```
|
|
330
|
+
|
|
257
331
|
## λΌμ΄μ μ€
|
|
258
332
|
|
|
259
333
|
MIT
|
package/dist/generators/index.js
CHANGED
|
@@ -93,10 +93,11 @@ async function generateTsConfig(config, projectPath) {
|
|
|
93
93
|
},
|
|
94
94
|
],
|
|
95
95
|
paths: {
|
|
96
|
-
'@/*': ['
|
|
96
|
+
'@/*': ['./src/*'],
|
|
97
97
|
},
|
|
98
|
+
baseUrl: '.',
|
|
98
99
|
},
|
|
99
|
-
include: ['next-env.d.ts', '**/*.ts', '**/*.tsx', '.next/types/**/*.ts'],
|
|
100
|
+
include: ['next-env.d.ts', '**/*.ts', '**/*.tsx', '.next/types/**/*.ts', 'src/**/*.ts', 'src/**/*.tsx'],
|
|
100
101
|
exclude: ['node_modules'],
|
|
101
102
|
};
|
|
102
103
|
await writeJson(path.join(projectPath, 'tsconfig.json'), tsConfig);
|
|
@@ -135,6 +136,67 @@ next-env.d.ts
|
|
|
135
136
|
await createFile(path.join(projectPath, '.gitignore'), content);
|
|
136
137
|
}
|
|
137
138
|
async function generateReadme(config, projectPath) {
|
|
139
|
+
const apiSection = (config.apiClient !== 'none' || config.dataFetching !== 'none') ? `
|
|
140
|
+
## API ν΅ν©
|
|
141
|
+
|
|
142
|
+
μ΄ νλ‘μ νΈλ λ€μ API λΌμ΄λΈλ¬λ¦¬λ₯Ό μ¬μ©ν©λλ€:
|
|
143
|
+
${config.apiClient !== 'none' ? `- **HTTP ν΄λΌμ΄μΈνΈ**: ${config.apiClient === 'axios' ? 'Axios' : 'Fetch API'}` : ''}
|
|
144
|
+
${config.dataFetching !== 'none' ? `- **λ°μ΄ν° νμΉ**: ${config.dataFetching === 'react-query' ? 'TanStack Query (React Query)' : 'SWR'}` : ''}
|
|
145
|
+
|
|
146
|
+
### API ν΄λΌμ΄μΈνΈ μ¬μ©λ²
|
|
147
|
+
|
|
148
|
+
${config.apiClient === 'axios' ? `\`\`\`typescript
|
|
149
|
+
import { apiClient } from './lib/api';
|
|
150
|
+
|
|
151
|
+
const fetchData = async () => {
|
|
152
|
+
const response = await apiClient.get('/endpoint');
|
|
153
|
+
return response.data;
|
|
154
|
+
};
|
|
155
|
+
\`\`\`` : config.apiClient === 'fetch' ? `\`\`\`typescript
|
|
156
|
+
import { apiClient } from './lib/api';
|
|
157
|
+
|
|
158
|
+
const fetchData = async () => {
|
|
159
|
+
const data = await apiClient.get('/endpoint');
|
|
160
|
+
return data;
|
|
161
|
+
};
|
|
162
|
+
\`\`\`` : ''}
|
|
163
|
+
|
|
164
|
+
${config.dataFetching === 'react-query' ? `### React Query μ¬μ©λ²
|
|
165
|
+
|
|
166
|
+
\`\`\`typescript
|
|
167
|
+
import { useExamples } from './hooks/queries/useExample';
|
|
168
|
+
|
|
169
|
+
const Component = () => {
|
|
170
|
+
const { data, isLoading, error } = useExamples();
|
|
171
|
+
|
|
172
|
+
if (isLoading) return <div>Loading...</div>;
|
|
173
|
+
if (error) return <div>Error occurred</div>;
|
|
174
|
+
|
|
175
|
+
return <div>{/* Use data */}</div>;
|
|
176
|
+
};
|
|
177
|
+
\`\`\`` : config.dataFetching === 'swr' ? `### SWR μ¬μ©λ²
|
|
178
|
+
|
|
179
|
+
\`\`\`typescript
|
|
180
|
+
import { useExamples } from './hooks/queries/useExample';
|
|
181
|
+
|
|
182
|
+
const Component = () => {
|
|
183
|
+
const { data, isLoading, isError } = useExamples();
|
|
184
|
+
|
|
185
|
+
if (isLoading) return <div>Loading...</div>;
|
|
186
|
+
if (isError) return <div>Error occurred</div>;
|
|
187
|
+
|
|
188
|
+
return <div>{/* Use data */}</div>;
|
|
189
|
+
};
|
|
190
|
+
\`\`\`` : ''}
|
|
191
|
+
|
|
192
|
+
### νκ²½λ³μ μ€μ
|
|
193
|
+
|
|
194
|
+
\`.env.local\` νμΌμ μμ±νκ³ API URLμ μ€μ νμΈμ:
|
|
195
|
+
|
|
196
|
+
\`\`\`bash
|
|
197
|
+
${config.framework === 'nextjs' ? 'NEXT_PUBLIC_API_URL' : 'VITE_API_URL'}=http://localhost:3000/api
|
|
198
|
+
\`\`\`
|
|
199
|
+
` : '';
|
|
138
200
|
const content = `# ${config.projectName}
|
|
139
201
|
|
|
140
202
|
μ΄ νλ‘μ νΈλ **create-arch-app**μΌλ‘ μμ±λμμ΅λλ€.
|
|
@@ -148,6 +210,8 @@ ${config.framework === 'nextjs' ? `- **λΌμ°ν°**: ${config.router === 'app' ?
|
|
|
148
210
|
- **μ€νμΌλ§**: ${config.styling === 'tailwind' ? 'Tailwind CSS' : 'CSS Modules'}
|
|
149
211
|
- **μνκ΄λ¦¬**: ${config.stateManagement}
|
|
150
212
|
${config.formLibrary !== 'none' ? `- **νΌ**: ${config.formLibrary}\n` : ''}
|
|
213
|
+
${config.apiClient !== 'none' ? `- **HTTP ν΄λΌμ΄μΈνΈ**: ${config.apiClient === 'axios' ? 'Axios' : 'Fetch'}\n` : ''}
|
|
214
|
+
${config.dataFetching !== 'none' ? `- **λ°μ΄ν° νμΉ**: ${config.dataFetching === 'react-query' ? 'TanStack Query' : 'SWR'}\n` : ''}
|
|
151
215
|
${config.testing ? '- **ν
μ€ν
**: Vitest + Testing Library\n' : ''}
|
|
152
216
|
|
|
153
217
|
## μμνκΈ°
|
|
@@ -163,7 +227,7 @@ npm run dev
|
|
|
163
227
|
npm run build
|
|
164
228
|
${config.testing ? '\n# ν
μ€νΈ μ€ν\nnpm test' : ''}
|
|
165
229
|
\`\`\`
|
|
166
|
-
|
|
230
|
+
${apiSection}
|
|
167
231
|
## μν€ν
μ² κ΅¬μ‘°
|
|
168
232
|
|
|
169
233
|
### ${config.architecture.toUpperCase()}
|
|
@@ -192,12 +256,8 @@ async function generateTailwindConfig(config, projectPath) {
|
|
|
192
256
|
contentPaths = ['./index.html', './src/**/*.{js,ts,jsx,tsx}'];
|
|
193
257
|
}
|
|
194
258
|
else {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
contentPaths = ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'];
|
|
200
|
-
}
|
|
259
|
+
// Next.js - src ν΄λ μ¬μ©
|
|
260
|
+
contentPaths = ['./src/**/*.{js,ts,jsx,tsx}'];
|
|
201
261
|
}
|
|
202
262
|
const tailwindConfig = `/** @type {import('tailwindcss').Config} */
|
|
203
263
|
module.exports = {
|