@lenne.tech/cli 0.0.125 → 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.
Files changed (28) hide show
  1. package/bin/lt +145 -14
  2. package/build/commands/claude/install-skills.js +622 -0
  3. package/build/commands/config/config.js +25 -0
  4. package/build/commands/config/help.js +167 -0
  5. package/build/commands/config/init.js +143 -0
  6. package/build/commands/config/show.js +68 -0
  7. package/build/commands/server/add-property.js +163 -27
  8. package/build/commands/server/create.js +66 -4
  9. package/build/commands/server/module.js +133 -20
  10. package/build/commands/server/object.js +23 -15
  11. package/build/extensions/config.js +157 -0
  12. package/build/extensions/server.js +82 -47
  13. package/build/interfaces/lt-config.interface.js +3 -0
  14. package/build/templates/claude-skills/lt-cli/SKILL.md +190 -259
  15. package/build/templates/claude-skills/lt-cli/examples.md +433 -203
  16. package/build/templates/claude-skills/lt-cli/reference.md +400 -226
  17. package/build/templates/claude-skills/nest-server-generator/SKILL.md +2833 -0
  18. package/build/templates/claude-skills/nest-server-generator/examples.md +760 -0
  19. package/build/templates/claude-skills/nest-server-generator/reference.md +417 -0
  20. package/build/templates/nest-server-module/inputs/template-create.input.ts.ejs +1 -3
  21. package/build/templates/nest-server-module/inputs/template.input.ts.ejs +1 -1
  22. package/build/templates/nest-server-module/template.controller.ts.ejs +24 -13
  23. package/build/templates/nest-server-module/template.model.ts.ejs +2 -2
  24. package/build/templates/nest-server-module/template.module.ts.ejs +4 -0
  25. package/build/templates/nest-server-module/template.service.ts.ejs +6 -6
  26. package/build/templates/nest-server-object/template.object.ts.ejs +2 -2
  27. package/package.json +13 -11
  28. package/build/commands/claude/install-skill.js +0 -93
@@ -1,312 +1,542 @@
1
+ ---
2
+ name: lt-cli-examples
3
+ version: 1.0.0
4
+ description: Real-world examples for Git operations and Fullstack initialization with lenne.tech CLI
5
+ ---
6
+
1
7
  # LT CLI Examples
2
8
 
3
- ## Real-World Use Cases
9
+ ⚠️ **Note**: For NestJS server examples (modules, objects, properties), see the **nest-server-generator skill** instead.
10
+
11
+ This file contains examples for:
12
+ - Git operations (`lt git get`, `lt git reset`)
13
+ - Fullstack initialization (`lt fullstack init`)
4
14
 
5
- ### 1. Blog System
15
+ ---
16
+
17
+ ## Git Operations
6
18
 
7
- #### Step 1: Create User Module
19
+ ### 1. Branch Management
20
+
21
+ #### Switching to Existing Branch
8
22
  ```bash
9
- lt server module --name User --controller Both \
10
- --prop-name-0 email --prop-type-0 string \
11
- --prop-name-1 username --prop-type-1 string \
12
- --prop-name-2 firstName --prop-type-2 string \
13
- --prop-name-3 lastName --prop-type-3 string \
14
- --prop-name-4 bio --prop-type-4 string --prop-nullable-4 true
23
+ # Switch to existing branch DEV-123
24
+ lt git get DEV-123
15
25
  ```
16
26
 
17
- #### Step 2: Create Category Module
27
+ **What happens:**
28
+ 1. Checks if `DEV-123` exists locally
29
+ 2. Switches to branch `DEV-123`
30
+
31
+ #### Creating New Branch
18
32
  ```bash
19
- lt server module --name Category --controller Rest \
20
- --prop-name-0 name --prop-type-0 string \
21
- --prop-name-1 slug --prop-type-1 string \
22
- --prop-name-2 description --prop-type-2 string --prop-nullable-2 true
33
+ # Create and switch to new branch feature/new-authentication
34
+ lt git get feature/new-authentication
23
35
  ```
24
36
 
25
- #### Step 3: Create Post Module with References
37
+ **What happens:**
38
+ 1. Checks if `feature/new-authentication` exists locally (not found)
39
+ 2. Checks if it exists on remote (not found)
40
+ 3. Creates new branch `feature/new-authentication` from current branch
41
+ 4. Switches to the new branch
42
+
43
+ #### Checking Out Remote Branch
26
44
  ```bash
27
- lt server module --name Post --controller Both \
28
- --prop-name-0 title --prop-type-0 string \
29
- --prop-name-1 slug --prop-type-1 string \
30
- --prop-name-2 content --prop-type-2 string \
31
- --prop-name-3 excerpt --prop-type-3 string --prop-nullable-3 true \
32
- --prop-name-4 author --prop-type-4 ObjectId --prop-reference-4 User \
33
- --prop-name-5 category --prop-type-5 ObjectId --prop-reference-5 Category \
34
- --prop-name-6 tags --prop-type-6 string --prop-array-6 true \
35
- --prop-name-7 published --prop-type-7 boolean \
36
- --prop-name-8 publishedAt --prop-type-8 Date --prop-nullable-8 true
45
+ # Checkout branch that exists on remote but not locally
46
+ lt git get DEV-456
37
47
  ```
38
48
 
39
- #### Step 4: Create Comment Module
49
+ **What happens:**
50
+ 1. Checks if `DEV-456` exists locally (not found)
51
+ 2. Checks if it exists on remote (found!)
52
+ 3. Checks out `DEV-456` and sets up tracking to `origin/DEV-456`
53
+ 4. Switches to the branch
54
+
55
+ #### Using Alias
40
56
  ```bash
41
- lt server module --name Comment --controller GraphQL \
42
- --prop-name-0 content --prop-type-0 string \
43
- --prop-name-1 author --prop-type-1 ObjectId --prop-reference-1 User \
44
- --prop-name-2 post --prop-type-2 ObjectId --prop-reference-2 Post \
45
- --prop-name-3 approved --prop-type-3 boolean
57
+ # Same as "lt git get" but shorter
58
+ lt git g DEV-789
46
59
  ```
47
60
 
48
61
  ---
49
62
 
50
- ### 2. E-Commerce Platform
63
+ ### 2. Workflow Scenarios
51
64
 
52
- #### Step 1: Create Address Object
65
+ #### Start New Feature Development
53
66
  ```bash
54
- lt server object --name Address \
55
- --prop-name-0 street --prop-type-0 string \
56
- --prop-name-1 city --prop-type-1 string \
57
- --prop-name-2 state --prop-type-2 string \
58
- --prop-name-3 zipCode --prop-type-3 string \
59
- --prop-name-4 country --prop-type-4 string
67
+ # You're on main branch, start working on new ticket
68
+ git status # Verify clean working tree
69
+ lt git get DEV-234 # Create and switch to new feature branch
70
+
71
+ # Do your work...
72
+ git add .
73
+ git commit -m "Implement feature"
74
+ git push -u origin DEV-234
60
75
  ```
61
76
 
62
- #### Step 2: Create Customer Module
77
+ #### Switch Between Tickets
63
78
  ```bash
64
- lt server module --name Customer --controller Both \
65
- --prop-name-0 email --prop-type-0 string \
66
- --prop-name-1 firstName --prop-type-1 string \
67
- --prop-name-2 lastName --prop-type-2 string \
68
- --prop-name-3 phone --prop-type-3 string --prop-nullable-3 true \
69
- --prop-name-4 shippingAddress --prop-schema-4 Address \
70
- --prop-name-5 billingAddress --prop-schema-5 Address
79
+ # Working on DEV-123, need to switch to urgent DEV-456
80
+ git status # Check for uncommitted changes
81
+ git stash # Save work in progress
82
+ lt git get DEV-456 # Switch to urgent ticket
83
+
84
+ # Fix urgent issue...
85
+ git add .
86
+ git commit -m "Fix urgent bug"
87
+ git push
88
+
89
+ # Return to original work
90
+ lt git get DEV-123
91
+ git stash pop # Restore work in progress
71
92
  ```
72
93
 
73
- #### Step 3: Create Product Module
94
+ #### Sync with Remote Branch
74
95
  ```bash
75
- lt server module --name Product --controller Both \
76
- --prop-name-0 name --prop-type-0 string \
77
- --prop-name-1 sku --prop-type-1 string \
78
- --prop-name-2 description --prop-type-2 string \
79
- --prop-name-3 price --prop-type-3 number \
80
- --prop-name-4 compareAtPrice --prop-type-4 number --prop-nullable-4 true \
81
- --prop-name-5 stock --prop-type-5 number \
82
- --prop-name-6 images --prop-type-6 string --prop-array-6 true \
83
- --prop-name-7 tags --prop-type-7 string --prop-array-7 true \
84
- --prop-name-8 active --prop-type-8 boolean
96
+ # Someone else created branch DEV-789 on remote
97
+ lt git get DEV-789 # Automatically checks out and tracks remote branch
98
+
99
+ # Verify tracking
100
+ git status
101
+ # Output: "Your branch is up to date with 'origin/DEV-789'"
85
102
  ```
86
103
 
87
- #### Step 4: Create Order Module
104
+ ---
105
+
106
+ ### 3. Reset Operations
107
+
108
+ #### Discard All Local Changes
88
109
  ```bash
89
- lt server module --name Order --controller Both \
90
- --prop-name-0 orderNumber --prop-type-0 string \
91
- --prop-name-1 customer --prop-type-1 ObjectId --prop-reference-1 Customer \
92
- --prop-name-2 items --prop-type-2 Json \
93
- --prop-name-3 subtotal --prop-type-3 number \
94
- --prop-name-4 tax --prop-type-4 number \
95
- --prop-name-5 total --prop-type-5 number \
96
- --prop-name-6 status --prop-enum-6 OrderStatusEnum \
97
- --prop-name-7 shippingAddress --prop-schema-7 Address
110
+ # Your local changes are broken, start fresh from remote
111
+ git status # See what will be discarded
112
+
113
+ lt git reset
114
+ # Prompts: "Reset current branch to origin/<branch>? This will discard all local changes. (y/N)"
115
+ # Type: y
116
+
117
+ # Your branch now matches remote exactly
98
118
  ```
99
119
 
100
- ---
120
+ **⚠️ WARNING**: This is destructive! All local commits and changes are permanently lost.
101
121
 
102
- ### 3. Project Management System
122
+ #### When to Use Reset
103
123
 
104
- #### Step 1: Create Team Module
124
+ **Use Case 1**: Experimental work failed
105
125
  ```bash
106
- lt server module --name Team --controller Rest \
107
- --prop-name-0 name --prop-type-0 string \
108
- --prop-name-1 description --prop-type-1 string --prop-nullable-1 true \
109
- --prop-name-2 members --prop-type-2 ObjectId --prop-reference-2 User --prop-array-2 true
126
+ # You tried something, it didn't work, want clean slate
127
+ git status # Shows many broken changes
128
+ lt git reset # Start over from remote
110
129
  ```
111
130
 
112
- #### Step 2: Create Project Module
131
+ **Use Case 2**: Merge conflict too complex
113
132
  ```bash
114
- lt server module --name Project --controller Both \
115
- --prop-name-0 name --prop-type-0 string \
116
- --prop-name-1 description --prop-type-1 string \
117
- --prop-name-2 team --prop-type-2 ObjectId --prop-reference-2 Team \
118
- --prop-name-3 owner --prop-type-3 ObjectId --prop-reference-3 User \
119
- --prop-name-4 startDate --prop-type-4 Date \
120
- --prop-name-5 endDate --prop-type-5 Date --prop-nullable-5 true \
121
- --prop-name-6 status --prop-enum-6 ProjectStatusEnum
133
+ # Merge created complex conflicts, easier to start over
134
+ git merge main # Conflict!
135
+ # ... attempt to resolve, too complicated
136
+ git merge --abort
137
+ lt git reset # Get clean state
138
+ # Now merge again or use different approach
122
139
  ```
123
140
 
124
- #### Step 3: Create Task Module
141
+ **Use Case 3**: Accidental commits on wrong branch
125
142
  ```bash
126
- lt server module --name Task --controller Both \
127
- --prop-name-0 title --prop-type-0 string \
128
- --prop-name-1 description --prop-type-1 string --prop-nullable-1 true \
129
- --prop-name-2 project --prop-type-2 ObjectId --prop-reference-2 Project \
130
- --prop-name-3 assignee --prop-type-3 ObjectId --prop-reference-3 User --prop-nullable-3 true \
131
- --prop-name-4 priority --prop-enum-4 PriorityEnum \
132
- --prop-name-5 status --prop-enum-5 TaskStatusEnum \
133
- --prop-name-6 dueDate --prop-type-6 Date --prop-nullable-6 true \
134
- --prop-name-7 estimatedHours --prop-type-7 number --prop-nullable-7 true
143
+ # Made commits on main instead of feature branch
144
+ git log # See unwanted commits
145
+ lt git reset # Discard commits, return to clean main
146
+ lt git get DEV-123 # Switch to correct branch
147
+ # Re-do work properly
135
148
  ```
136
149
 
137
150
  ---
138
151
 
139
- ### 4. Social Media Platform
152
+ ### 4. Common Patterns
140
153
 
141
- #### Step 1: Create Profile Object
154
+ #### Daily Development Workflow
142
155
  ```bash
143
- lt server object --name Profile \
144
- --prop-name-0 bio --prop-type-0 string --prop-nullable-0 true \
145
- --prop-name-1 avatar --prop-type-1 string --prop-nullable-1 true \
146
- --prop-name-2 coverImage --prop-type-2 string --prop-nullable-2 true \
147
- --prop-name-3 website --prop-type-3 string --prop-nullable-3 true \
148
- --prop-name-4 location --prop-type-4 string --prop-nullable-4 true
149
- ```
150
-
151
- #### Step 2: Create User with Profile
152
- ```bash
153
- lt server module --name User --controller Both \
154
- --prop-name-0 username --prop-type-0 string \
155
- --prop-name-1 email --prop-type-1 string \
156
- --prop-name-2 displayName --prop-type-2 string \
157
- --prop-name-3 profile --prop-schema-3 Profile \
158
- --prop-name-4 verified --prop-type-4 boolean
156
+ # Morning: Start work on ticket
157
+ lt git get main # Switch to main
158
+ git pull # Get latest changes
159
+ lt git get DEV-567 # Create/switch to ticket branch
160
+
161
+ # During day: Regular commits
162
+ git add .
163
+ git commit -m "Progress on feature"
164
+ git push -u origin DEV-567 # First push sets upstream
165
+
166
+ # End of day: Push progress
167
+ git add .
168
+ git commit -m "WIP: End of day checkpoint"
169
+ git push
159
170
  ```
160
171
 
161
- #### Step 3: Create Post Module
172
+ #### Handling Mistakes
162
173
  ```bash
163
- lt server module --name Post --controller Both \
164
- --prop-name-0 content --prop-type-0 string \
165
- --prop-name-1 author --prop-type-1 ObjectId --prop-reference-1 User \
166
- --prop-name-2 images --prop-type-2 string --prop-array-2 true \
167
- --prop-name-3 likes --prop-type-3 ObjectId --prop-reference-3 User --prop-array-3 true \
168
- --prop-name-4 hashtags --prop-type-4 string --prop-array-4 true \
169
- --prop-name-5 visibility --prop-enum-5 VisibilityEnum
174
+ # Scenario: Committed to wrong branch
175
+ git log -1 # See the wrong commit
176
+ git stash # Stash any uncommitted work
177
+ lt git reset # Reset to clean state
178
+ lt git get DEV-999 # Switch to correct branch
179
+ git stash pop # Restore work
180
+ # Now commit on correct branch
170
181
  ```
171
182
 
172
- #### Step 4: Add Features to User
183
+ #### Code Review Feedback
173
184
  ```bash
174
- lt server addProp --type Module --element User \
175
- --prop-name-0 followers --prop-type-0 ObjectId --prop-reference-0 User --prop-array-0 true \
176
- --prop-name-1 following --prop-type-1 ObjectId --prop-reference-1 User --prop-array-1 true
185
+ # Reviewer asked for changes on PR branch
186
+ lt git get DEV-333 # Switch to PR branch
187
+ git pull # Get latest
188
+ # Make requested changes
189
+ git add .
190
+ git commit -m "Address PR feedback"
191
+ git push
177
192
  ```
178
193
 
179
194
  ---
180
195
 
181
- ### 5. Learning Management System
196
+ ## Fullstack Project Initialization
197
+
198
+ ### 1. Angular Projects
182
199
 
183
- #### Step 1: Create Course Module
200
+ #### Production Angular App with Git
184
201
  ```bash
185
- lt server module --name Course --controller Both \
186
- --prop-name-0 title --prop-type-0 string \
187
- --prop-name-1 description --prop-type-1 string \
188
- --prop-name-2 instructor --prop-type-2 ObjectId --prop-reference-2 User \
189
- --prop-name-3 thumbnail --prop-type-3 string --prop-nullable-3 true \
190
- --prop-name-4 price --prop-type-4 number \
191
- --prop-name-5 duration --prop-type-5 number \
192
- --prop-name-6 level --prop-enum-6 CourseLevelEnum \
193
- --prop-name-7 tags --prop-type-7 string --prop-array-7 true \
194
- --prop-name-8 published --prop-type-8 boolean
202
+ lt fullstack init \
203
+ --name MyAngularApp \
204
+ --frontend angular \
205
+ --git true \
206
+ --git-link https://github.com/myorg/my-angular-app.git
195
207
  ```
196
208
 
197
- #### Step 2: Create Lesson Module
209
+ **Creates:**
210
+ ```
211
+ MyAngularApp/
212
+ ├── frontend/ # Angular 18+ application
213
+ │ ├── src/
214
+ │ ├── angular.json
215
+ │ └── package.json
216
+ ├── projects/
217
+ │ └── api/ # NestJS backend (@lenne.tech/nest-server)
218
+ │ ├── src/
219
+ │ │ └── server/
220
+ │ │ ├── modules/
221
+ │ │ └── common/
222
+ │ └── package.json
223
+ ├── package.json # Root workspace config
224
+ ├── .gitignore
225
+ └── .git/ # Initialized with remote
226
+ ```
227
+
228
+ **Next steps:**
198
229
  ```bash
199
- lt server module --name Lesson --controller Both \
200
- --prop-name-0 title --prop-type-0 string \
201
- --prop-name-1 content --prop-type-1 string \
202
- --prop-name-2 course --prop-type-2 ObjectId --prop-reference-2 Course \
203
- --prop-name-3 order --prop-type-3 number \
204
- --prop-name-4 duration --prop-type-4 number \
205
- --prop-name-5 videoUrl --prop-type-5 string --prop-nullable-5 true \
206
- --prop-name-6 resources --prop-type-6 Json --prop-nullable-6 true
230
+ cd MyAngularApp
231
+ npm install # Install all dependencies
232
+ cd projects/api && npm start # Start backend (port 3000)
233
+ # In another terminal:
234
+ cd frontend && npm start # Start frontend (port 4200)
207
235
  ```
208
236
 
209
- #### Step 3: Create Enrollment Module
237
+ #### Local Development Angular App
210
238
  ```bash
211
- lt server module --name Enrollment --controller Rest \
212
- --prop-name-0 student --prop-type-0 ObjectId --prop-reference-0 User \
213
- --prop-name-1 course --prop-type-1 ObjectId --prop-reference-1 Course \
214
- --prop-name-2 progress --prop-type-2 number \
215
- --prop-name-3 completedLessons --prop-type-3 ObjectId --prop-reference-3 Lesson --prop-array-3 true \
216
- --prop-name-4 enrolledAt --prop-type-4 Date \
217
- --prop-name-5 completedAt --prop-type-5 Date --prop-nullable-5 true
239
+ lt fullstack init \
240
+ --name LocalDevApp \
241
+ --frontend angular \
242
+ --git false
218
243
  ```
219
244
 
245
+ **Use case:** Quick prototyping, learning, no version control needed
246
+
220
247
  ---
221
248
 
222
- ## Adding Properties to Existing Modules
249
+ ### 2. Nuxt Projects
223
250
 
224
- ### Add metadata to Product
251
+ #### Production Nuxt App with Git
225
252
  ```bash
226
- lt server addProp --type Module --element Product \
227
- --prop-name-0 seo --prop-type-0 Json --prop-nullable-0 true \
228
- --prop-name-1 dimensions --prop-type-1 Json --prop-nullable-1 true
253
+ lt fullstack init \
254
+ --name MyNuxtApp \
255
+ --frontend nuxt \
256
+ --git true \
257
+ --git-link https://github.com/myorg/my-nuxt-app.git
258
+ ```
259
+
260
+ **Creates:**
261
+ ```
262
+ MyNuxtApp/
263
+ ├── frontend/ # Nuxt 3 application
264
+ │ ├── pages/
265
+ │ ├── components/
266
+ │ ├── nuxt.config.ts
267
+ │ └── package.json
268
+ ├── projects/
269
+ │ └── api/ # NestJS backend
270
+ │ └── ...
271
+ ├── package.json
272
+ ├── .gitignore
273
+ └── .git/
229
274
  ```
230
275
 
231
- ### Add timestamps to custom module
276
+ #### Nuxt App without Remote
232
277
  ```bash
233
- lt server addProp --type Module --element CustomModule \
234
- --prop-name-0 lastModifiedBy --prop-type-0 ObjectId --prop-reference-0 User \
235
- --prop-name-1 archivedAt --prop-type-1 Date --prop-nullable-1 true
278
+ lt fullstack init \
279
+ --name MyNuxtProject \
280
+ --frontend nuxt \
281
+ --git true
282
+ # No --git-link, git initialized but no remote
236
283
  ```
237
284
 
238
- ### Add social features
285
+ **Use case:** Start project locally, add remote later
286
+
287
+ **Add remote later:**
239
288
  ```bash
240
- lt server addProp --type Module --element Post \
241
- --prop-name-0 comments --prop-type-0 ObjectId --prop-reference-0 Comment --prop-array-0 true \
242
- --prop-name-1 shares --prop-type-1 number \
243
- --prop-name-2 views --prop-type-2 number
289
+ cd MyNuxtProject
290
+ git remote add origin https://github.com/myorg/my-nuxt-project.git
291
+ git push -u origin main
244
292
  ```
245
293
 
246
294
  ---
247
295
 
248
- ## Common Object Patterns
296
+ ### 3. Project Types
249
297
 
250
- ### Contact Information
298
+ #### Client Project (Angular + NestJS)
251
299
  ```bash
252
- lt server object --name ContactInfo \
300
+ lt fullstack init \
301
+ --name ClientPortal \
302
+ --frontend angular \
303
+ --git true \
304
+ --git-link https://github.com/client/portal.git
305
+
306
+ # After creation:
307
+ cd ClientPortal/projects/api
308
+
309
+ # Add authentication module
310
+ lt server module --name User --controller Both \
253
311
  --prop-name-0 email --prop-type-0 string \
254
- --prop-name-1 phone --prop-type-1 string --prop-nullable-1 true \
255
- --prop-name-2 mobile --prop-type-2 string --prop-nullable-2 true \
256
- --prop-name-3 fax --prop-type-3 string --prop-nullable-3 true
312
+ --prop-name-1 password --prop-type-1 string
313
+
314
+ # Add business logic modules
315
+ # ... (use nest-server-generator skill for this)
257
316
  ```
258
317
 
259
- ### Price Range
318
+ #### Internal Tool (Nuxt + NestJS)
260
319
  ```bash
261
- lt server object --name PriceRange \
262
- --prop-name-0 min --prop-type-0 number \
263
- --prop-name-1 max --prop-type-1 number \
264
- --prop-name-2 currency --prop-type-2 string
320
+ lt fullstack init \
321
+ --name InternalDashboard \
322
+ --frontend nuxt \
323
+ --git true \
324
+ --git-link https://github.com/company/internal-dashboard.git
325
+
326
+ # Quick setup for internal tools with Nuxt's flexibility
265
327
  ```
266
328
 
267
- ### Geo Location
329
+ #### Learning/Tutorial Project
268
330
  ```bash
269
- lt server object --name GeoLocation \
270
- --prop-name-0 latitude --prop-type-0 number \
271
- --prop-name-1 longitude --prop-type-1 number \
272
- --prop-name-2 address --prop-type-2 string --prop-nullable-2 true
331
+ lt fullstack init \
332
+ --name LearningFullstack \
333
+ --frontend angular \
334
+ --git false
335
+
336
+ # No git overhead, just focus on learning
337
+ ```
338
+
339
+ ---
340
+
341
+ ### 4. Post-Creation Workflows
342
+
343
+ #### After Angular Fullstack Init
344
+ ```bash
345
+ cd MyAngularApp
346
+ npm install
347
+
348
+ # Terminal 1: Start backend
349
+ cd projects/api
350
+ npm start
351
+ # API runs on http://localhost:3000
352
+
353
+ # Terminal 2: Start frontend
354
+ cd frontend
355
+ npm start
356
+ # Frontend runs on http://localhost:4200
357
+ # Auto-proxies API calls to backend
358
+
359
+ # Terminal 3: Development
360
+ cd projects/api
361
+ # Generate server modules using nest-server-generator skill
273
362
  ```
274
363
 
275
- ### Media File
364
+ #### After Nuxt Fullstack Init
276
365
  ```bash
277
- lt server object --name MediaFile \
278
- --prop-name-0 url --prop-type-0 string \
279
- --prop-name-1 filename --prop-type-1 string \
280
- --prop-name-2 mimeType --prop-type-2 string \
281
- --prop-name-3 size --prop-type-3 number
366
+ cd MyNuxtApp
367
+ npm install
368
+
369
+ # Terminal 1: Start backend
370
+ cd projects/api
371
+ npm start
372
+ # API runs on http://localhost:3000
373
+
374
+ # Terminal 2: Start frontend
375
+ cd frontend
376
+ npm run dev
377
+ # Frontend runs on http://localhost:3000 (or 3001 if 3000 taken)
378
+
379
+ # Configure proxy in nuxt.config.ts if needed
282
380
  ```
283
381
 
284
382
  ---
285
383
 
286
- ## Fullstack Project Initialization
384
+ ### 5. Common Initialization Patterns
287
385
 
288
- ### Angular Project
386
+ #### Team Project Setup
289
387
  ```bash
388
+ # Lead developer initializes project
290
389
  lt fullstack init \
291
- --name MyAngularApp \
390
+ --name TeamProject \
292
391
  --frontend angular \
293
392
  --git true \
294
- --git-link https://github.com/myorg/my-angular-app.git
393
+ --git-link https://github.com/team/team-project.git
394
+
395
+ cd TeamProject
396
+ npm install
397
+ # ... initial setup, create base modules
398
+ git add .
399
+ git commit -m "Initial project setup"
400
+ git push -u origin main
401
+
402
+ # Team members clone
403
+ # git clone https://github.com/team/team-project.git
404
+ # cd team-project
405
+ # npm install
295
406
  ```
296
407
 
297
- ### Nuxt Project
408
+ #### Monorepo with Multiple Projects
298
409
  ```bash
299
- lt fullstack init \
300
- --name MyNuxtApp \
301
- --frontend nuxt \
302
- --git true \
303
- --git-link https://github.com/myorg/my-nuxt-app.git
410
+ # Create first project
411
+ lt fullstack init --name ProjectA --frontend angular --git true
412
+
413
+ # Create second project
414
+ lt fullstack init --name ProjectB --frontend nuxt --git true
415
+
416
+ # Each has its own git repository, npm workspace, and backend
304
417
  ```
305
418
 
306
- ### Local Development (No Git)
419
+ #### Migration from Existing Backend
307
420
  ```bash
421
+ # Create fullstack project
308
422
  lt fullstack init \
309
- --name LocalDevProject \
423
+ --name MigratedApp \
310
424
  --frontend angular \
311
- --git false
312
- ```
425
+ --git true
426
+
427
+ cd MigratedApp/projects
428
+
429
+ # Remove generated api
430
+ rm -rf api
431
+
432
+ # Clone existing backend
433
+ git clone https://github.com/company/existing-api.git api
434
+
435
+ # Update root package.json workspace paths if needed
436
+ ```
437
+
438
+ ---
439
+
440
+ ## Troubleshooting Examples
441
+
442
+ ### Git Branch Issues
443
+
444
+ #### Branch Exists But Can't Switch
445
+ ```bash
446
+ # Problem: Uncommitted changes
447
+ git status
448
+ # Output: "Changes not staged for commit..."
449
+
450
+ # Solution 1: Stash changes
451
+ git stash
452
+ lt git get DEV-123
453
+ git stash pop
454
+
455
+ # Solution 2: Commit changes
456
+ git add .
457
+ git commit -m "WIP: Save progress"
458
+ lt git get DEV-123
459
+ ```
460
+
461
+ #### Reset Fails
462
+ ```bash
463
+ # Problem: No remote branch
464
+ lt git reset
465
+ # Error: "Remote branch not found"
466
+
467
+ # Solution: Check remote
468
+ git branch -r # List remote branches
469
+ git remote -v # Verify remote URL
470
+
471
+ # If remote missing, add it
472
+ git remote add origin https://github.com/user/repo.git
473
+ git fetch origin
474
+ lt git reset # Try again
475
+ ```
476
+
477
+ ### Fullstack Init Issues
478
+
479
+ #### Permission Denied
480
+ ```bash
481
+ # Problem: Can't create directory
482
+ lt fullstack init --name MyApp --frontend angular --git false
483
+ # Error: "Permission denied"
484
+
485
+ # Solution: Check permissions
486
+ ls -la .
487
+ # Create in home directory or with sudo
488
+ cd ~
489
+ lt fullstack init --name MyApp --frontend angular --git false
490
+ ```
491
+
492
+ #### Git Remote Already Exists
493
+ ```bash
494
+ # Problem: Directory already has .git
495
+ lt fullstack init --name ExistingDir --frontend nuxt --git true
496
+ # Error: "Directory already initialized with git"
497
+
498
+ # Solution: Use different directory or remove .git
499
+ rm -rf ExistingDir/.git
500
+ lt fullstack init --name ExistingDir --frontend nuxt --git true
501
+ ```
502
+
503
+ ---
504
+
505
+ ## Using Alias Commands
506
+
507
+ All commands have shorter aliases:
508
+
509
+ ```bash
510
+ # Full commands
511
+ lt git get DEV-123
512
+ lt fullstack init --name MyApp --frontend angular --git true
513
+
514
+ # With aliases
515
+ lt git g DEV-123
516
+ lt full init --name MyApp --frontend angular --git true
517
+ ```
518
+
519
+ ---
520
+
521
+ ## Best Practices
522
+
523
+ ### Git Operations
524
+ 1. **Always check status first**: `git status` before switching branches
525
+ 2. **Save work before switching**: Commit or stash uncommitted changes
526
+ 3. **Be cautious with reset**: It's destructive and irreversible
527
+ 4. **Use meaningful branch names**: Follow team conventions (DEV-123, feature/xyz)
528
+
529
+ ### Fullstack Initialization
530
+ 1. **Choose frontend wisely**: Angular for enterprise, Nuxt for flexibility
531
+ 2. **Enable git from start**: Use `--git true` for all real projects
532
+ 3. **Follow naming conventions**: PascalCase for project names
533
+ 4. **Read generated READMEs**: Each project has setup instructions
534
+ 5. **Install dependencies immediately**: Run `npm install` after creation
535
+
536
+ ---
537
+
538
+ ## Reference
539
+
540
+ For detailed command syntax and all available options, see [reference.md](reference.md).
541
+
542
+ For NestJS server development examples, use the **nest-server-generator skill**.