@lenne.tech/cli 0.0.123 → 0.0.125

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.
@@ -0,0 +1,341 @@
1
+ ---
2
+ name: lt-cli
3
+ description: Expert assistance with lenne.tech CLI for NestJS/TypeScript backend development. Use when creating server modules, objects, or adding properties to NestJS backends. Generates correct lt server commands with proper --prop-name-X syntax. Helps with lt server module, lt server object, lt server addProp, and lt fullstack init commands.
4
+ ---
5
+
6
+ # LT CLI Expert
7
+
8
+ You are an expert in the lenne.tech CLI tool for NestJS/TypeScript backend development. When this skill is active, help users generate correct LT CLI commands and work efficiently with the framework.
9
+
10
+ ## Available Commands
11
+
12
+ ### 1. Create Server Module
13
+ **Command**: `lt server module` (alias: `lt server m`)
14
+
15
+ Creates a complete NestJS module with model, service, controller/resolver, and DTOs.
16
+
17
+ **Non-interactive syntax**:
18
+ ```bash
19
+ lt server module --name <ModuleName> --controller <Rest|GraphQL|Both> [property-flags]
20
+ ```
21
+
22
+ **Property flags** (multiple properties with different indices):
23
+ - `--prop-name-X <name>` - Property name (X = 0, 1, 2...)
24
+ - `--prop-type-X <type>` - string, number, boolean, ObjectId, Json, Date, etc.
25
+ - `--prop-nullable-X <true|false>` - Optional property
26
+ - `--prop-array-X <true|false>` - Array type
27
+ - `--prop-enum-X <EnumName>` - Enum reference
28
+ - `--prop-schema-X <SchemaName>` - Object/schema reference
29
+ - `--prop-reference-X <RefName>` - Reference name for ObjectId
30
+ - `--skipLint` - Skip lint prompt
31
+
32
+ **Example**:
33
+ ```bash
34
+ lt server module --name Post --controller GraphQL \
35
+ --prop-name-0 title --prop-type-0 string \
36
+ --prop-name-1 content --prop-type-1 string --prop-nullable-1 true \
37
+ --prop-name-2 author --prop-type-2 ObjectId --prop-reference-2 User \
38
+ --prop-name-3 tags --prop-type-3 string --prop-array-3 true
39
+ ```
40
+
41
+ ### 2. Add Properties to Existing Module/Object
42
+ **Command**: `lt server addProp` (alias: `lt server ap`)
43
+
44
+ Adds properties to existing modules or objects, updating model and input files.
45
+
46
+ **Non-interactive syntax**:
47
+ ```bash
48
+ lt server addProp --type <Module|Object> --element <name> [property-flags]
49
+ ```
50
+
51
+ **Example**:
52
+ ```bash
53
+ lt server addProp --type Module --element User \
54
+ --prop-name-0 email --prop-type-0 string \
55
+ --prop-name-1 age --prop-type-1 number --prop-nullable-1 true
56
+ ```
57
+
58
+ ### 3. Create Server Object
59
+ **Command**: `lt server object` (alias: `lt server o`)
60
+
61
+ Creates reusable data structures (objects) for embedding in modules.
62
+
63
+ **Non-interactive syntax**:
64
+ ```bash
65
+ lt server object --name <ObjectName> [property-flags] [--skipLint]
66
+ ```
67
+
68
+ **Example**:
69
+ ```bash
70
+ lt server object --name Address \
71
+ --prop-name-0 street --prop-type-0 string \
72
+ --prop-name-1 city --prop-type-1 string \
73
+ --prop-name-2 zipCode --prop-type-2 string
74
+ ```
75
+
76
+ ### 4. Initialize Fullstack Workspace
77
+ **Command**: `lt fullstack init` (alias: `lt full init`)
78
+
79
+ Creates complete fullstack workspace with frontend and backend.
80
+
81
+ **Non-interactive syntax**:
82
+ ```bash
83
+ lt fullstack init --name <WorkspaceName> --frontend <angular|nuxt> --git <true|false> --git-link <GitURL>
84
+ ```
85
+
86
+ **Example**:
87
+ ```bash
88
+ lt fullstack init --name MyApp --frontend angular --git true --git-link https://github.com/user/repo.git
89
+ ```
90
+
91
+ ## Critical Rules for Command Generation
92
+
93
+ ### 1. Index-Based Property Flags
94
+ Always use numbered indices for property flags:
95
+ ```bash
96
+ # CORRECT
97
+ --prop-name-0 title --prop-type-0 string \
98
+ --prop-name-1 content --prop-type-1 string
99
+
100
+ # WRONG - Don't use sequential arrays
101
+ --prop-name title --prop-type string
102
+ ```
103
+
104
+ ### 2. Match Indices Across Flags
105
+ All flags for one property must use the same index:
106
+ ```bash
107
+ # CORRECT
108
+ --prop-name-1 company --prop-type-1 string --prop-nullable-1 false
109
+
110
+ # WRONG - Mixed indices
111
+ --prop-name-1 company --prop-type-0 string --prop-nullable-2 false
112
+ ```
113
+
114
+ ### 3. ObjectId References
115
+ Always include `--prop-reference-X` with ObjectId type:
116
+ ```bash
117
+ --prop-name-0 author --prop-type-0 ObjectId --prop-reference-0 User
118
+ ```
119
+
120
+ ### 4. Schema/Object Properties
121
+ Use `--prop-schema-X` for embedding objects:
122
+ ```bash
123
+ --prop-name-0 address --prop-schema-0 Address
124
+ ```
125
+
126
+ ### 5. Boolean Values
127
+ Use lowercase string literals:
128
+ ```bash
129
+ --prop-nullable-0 true # CORRECT
130
+ --prop-nullable-0 True # WRONG
131
+ --prop-nullable-0 TRUE # WRONG
132
+ ```
133
+
134
+ ## Property Types Reference
135
+
136
+ ### Primitive Types
137
+ - `string` - Text values
138
+ - `number` - Numeric values
139
+ - `boolean` - True/false
140
+ - `bigint` - Large integers
141
+ - `Date` - Date/time values
142
+
143
+ ### Special Types
144
+ - `ObjectId` - MongoDB reference (requires `--prop-reference-X`)
145
+ - `Json` - JSON data for flexible metadata
146
+ - Custom objects (requires `--prop-schema-X`)
147
+ - Custom enums (requires `--prop-enum-X`) - **Note: CLI generates the reference, but you must create the enum file manually afterwards**
148
+
149
+ ### Modifiers
150
+ - `--prop-nullable-X true` - Makes property optional
151
+ - `--prop-array-X true` - Makes property an array type
152
+
153
+ ## Common Patterns
154
+
155
+ ### User Authentication
156
+ ```bash
157
+ lt server module --name User --controller Both \
158
+ --prop-name-0 email --prop-type-0 string \
159
+ --prop-name-1 username --prop-type-1 string \
160
+ --prop-name-2 roles --prop-type-2 string --prop-array-2 true \
161
+ --prop-name-3 verified --prop-type-3 boolean
162
+ ```
163
+
164
+ ### Blog Post with Relationships
165
+ ```bash
166
+ lt server module --name Post --controller GraphQL \
167
+ --prop-name-0 title --prop-type-0 string \
168
+ --prop-name-1 content --prop-type-1 string \
169
+ --prop-name-2 author --prop-type-2 ObjectId --prop-reference-2 User \
170
+ --prop-name-3 tags --prop-type-3 string --prop-array-3 true \
171
+ --prop-name-4 published --prop-type-4 boolean
172
+ ```
173
+
174
+ ### E-commerce Product
175
+ ```bash
176
+ lt server module --name Product --controller Both \
177
+ --prop-name-0 name --prop-type-0 string \
178
+ --prop-name-1 description --prop-type-1 string --prop-nullable-1 true \
179
+ --prop-name-2 price --prop-type-2 number \
180
+ --prop-name-3 stock --prop-type-3 number \
181
+ --prop-name-4 category --prop-enum-4 ProductCategoryEnum \
182
+ --prop-name-5 metadata --prop-type-5 Json --prop-nullable-5 true
183
+ ```
184
+
185
+ ### Nested Object Pattern
186
+ ```bash
187
+ # First create the object
188
+ lt server object --name Address \
189
+ --prop-name-0 street --prop-type-0 string \
190
+ --prop-name-1 city --prop-type-1 string \
191
+ --prop-name-2 country --prop-type-2 string
192
+
193
+ # Then use it in a module
194
+ lt server addProp --type Module --element User \
195
+ --prop-name-0 address --prop-schema-0 Address
196
+ ```
197
+
198
+ ## Project Structure
199
+
200
+ The CLI expects this structure:
201
+ ```
202
+ src/
203
+ server/
204
+ modules/
205
+ <module-name>/
206
+ <module-name>.model.ts # MongoDB schema
207
+ <module-name>.service.ts # Business logic
208
+ <module-name>.controller.ts # REST controller
209
+ <module-name>.resolver.ts # GraphQL resolver
210
+ <module-name>.module.ts # NestJS module
211
+ inputs/
212
+ <module-name>.input.ts # Update DTO
213
+ <module-name>-create.input.ts # Create DTO
214
+ outputs/
215
+ find-and-count-<module-name>s-result.output.ts
216
+ common/
217
+ objects/
218
+ <object-name>/
219
+ <object-name>.object.ts
220
+ <object-name>.input.ts
221
+ <object-name>-create.input.ts
222
+ ```
223
+
224
+ ## Generated Code Features
225
+
226
+ ### Model Files (.model.ts)
227
+ - MongoDB schema with `@Prop()` decorator
228
+ - `@UnifiedField()` decorator for GraphQL/REST
229
+ - Mongoose schema definition
230
+ - TypeScript typing with proper suffixes
231
+
232
+ ### Input Files (.input.ts / -create.input.ts)
233
+ - `@UnifiedField()` decorator
234
+ - Validation decorators
235
+ - TypeScript typing
236
+ - Generic support for references
237
+
238
+ ### Service Files (.service.ts)
239
+ - CRUD operations
240
+ - Pagination support
241
+ - Reference handling
242
+ - Business logic structure
243
+
244
+ ### Controller/Resolver Files
245
+ - REST endpoints (controller)
246
+ - GraphQL queries/mutations (resolver)
247
+ - Proper authentication guards
248
+ - DTO validation
249
+
250
+ ## Troubleshooting
251
+
252
+ ### Property Index Mismatch
253
+ **Symptom**: Properties not created correctly or values mixed up
254
+ **Cause**: Using wrong indices (e.g., `--prop-name-1` with `--prop-type-0`)
255
+ **Solution**: Ensure all flags for one property use the same index
256
+
257
+ ### ObjectId Without Reference
258
+ **Symptom**: TypeScript errors about missing reference
259
+ **Cause**: Using `ObjectId` type without `--prop-reference-X`
260
+ **Solution**: Always pair ObjectId with reference:
261
+ ```bash
262
+ --prop-type-0 ObjectId --prop-reference-0 User
263
+ ```
264
+
265
+ ### Module Already Exists
266
+ **Symptom**: Error that module directory exists
267
+ **Solution**: Use `lt server addProp` instead to add to existing modules
268
+
269
+ ### Empty Property Lists
270
+ **Symptom**: "Cannot read properties of undefined"
271
+ **Status**: Fixed in latest version
272
+ **Solution**: Update to latest CLI version
273
+
274
+ ## Best Practices
275
+
276
+ 1. **Plan relationships first**: Sketch entity relationships before generating
277
+ 2. **Create objects for reusable structures**: Don't duplicate data structures
278
+ 3. **Use meaningful names**: PascalCase for modules/objects, camelCase for properties
279
+ 4. **Start with one API type**: Use Rest or GraphQL, add Both later if needed
280
+ 5. **Create enum files after generation**: CLI generates enum references, you create the actual enum files manually afterwards in `src/server/common/enums/`
281
+ 6. **Mark truly optional fields**: Only use nullable for genuinely optional data
282
+ 7. **Use JSON for extensibility**: Metadata and flexible fields work well as JSON
283
+ 8. **Run lint after generation**: Always run lint fix for code quality
284
+ 9. **Test incrementally**: Generate one module, test, then continue
285
+ 10. **Version control**: Commit after successful generation
286
+
287
+ ## Working with This Skill
288
+
289
+ When helping users:
290
+
291
+ 1. **Clarify requirements**: Ask about API type (REST/GraphQL/Both), relationships, data types
292
+ 2. **Suggest architecture**: Recommend objects for shared structures, modules for entities
293
+ 3. **Generate complete commands**: Include all necessary flags with correct syntax
294
+ 4. **Explain side effects**: Describe what files will be created and where
295
+ 5. **Provide next steps**: Suggest related modules, testing, or additional properties
296
+
297
+ ### Example Response Pattern
298
+
299
+ User: "Create a Task module with title, description, due date, and assignee"
300
+
301
+ Your response:
302
+ ```bash
303
+ # First ensure User module exists, then create Task module
304
+ lt server module --name Task --controller Both \
305
+ --prop-name-0 title --prop-type-0 string \
306
+ --prop-name-1 description --prop-type-1 string --prop-nullable-1 true \
307
+ --prop-name-2 dueDate --prop-type-2 Date --prop-nullable-2 true \
308
+ --prop-name-3 assignee --prop-type-3 ObjectId --prop-reference-3 User \
309
+ --prop-name-4 status --prop-enum-4 TaskStatusEnum
310
+
311
+ # This creates:
312
+ # ✓ Task model with MongoDB schema
313
+ # ✓ Task service with CRUD operations
314
+ # ✓ REST controller and GraphQL resolver
315
+ # ✓ Input DTOs for create/update
316
+
317
+ # Next steps:
318
+ # 1. Manually create TaskStatusEnum file in src/server/common/enums/task-status.enum.ts
319
+ # 2. Verify User module exists
320
+ # 3. Run lint fix
321
+ # 4. Add custom business logic to TaskService
322
+ ```
323
+
324
+ ## Integration Details
325
+
326
+ - Uses `ts-morph` for AST manipulation
327
+ - Integrates with `@lenne.tech/nest-server` package
328
+ - Generates `@UnifiedField()` decorators for dual REST/GraphQL support
329
+ - Handles `useDefineForClassFields` TypeScript config
330
+ - Automatically adds properties to `.model.ts`, `.input.ts`, and `-create.input.ts`
331
+ - Manages imports and decorators automatically
332
+
333
+ ## Important Notes
334
+
335
+ - CLI works from anywhere in project directory
336
+ - Automatically finds nearest `src/` directory
337
+ - Properties are added with proper TypeScript typing
338
+ - ObjectId properties become Reference/ReferenceInput in generated code
339
+ - The CLI prompts for lint fix after generation (use `--skipLint` to skip)
340
+ - Manual imports may be needed for references and schemas
341
+ - **Enum files must be created manually**: When using `--prop-enum-X`, the CLI generates the reference in your code, but you must create the actual enum file yourself afterwards in `src/server/common/enums/<enum-name>.enum.ts`
@@ -0,0 +1,312 @@
1
+ # LT CLI Examples
2
+
3
+ ## Real-World Use Cases
4
+
5
+ ### 1. Blog System
6
+
7
+ #### Step 1: Create User Module
8
+ ```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
15
+ ```
16
+
17
+ #### Step 2: Create Category Module
18
+ ```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
23
+ ```
24
+
25
+ #### Step 3: Create Post Module with References
26
+ ```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
37
+ ```
38
+
39
+ #### Step 4: Create Comment Module
40
+ ```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
46
+ ```
47
+
48
+ ---
49
+
50
+ ### 2. E-Commerce Platform
51
+
52
+ #### Step 1: Create Address Object
53
+ ```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
60
+ ```
61
+
62
+ #### Step 2: Create Customer Module
63
+ ```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
71
+ ```
72
+
73
+ #### Step 3: Create Product Module
74
+ ```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
85
+ ```
86
+
87
+ #### Step 4: Create Order Module
88
+ ```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
98
+ ```
99
+
100
+ ---
101
+
102
+ ### 3. Project Management System
103
+
104
+ #### Step 1: Create Team Module
105
+ ```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
110
+ ```
111
+
112
+ #### Step 2: Create Project Module
113
+ ```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
122
+ ```
123
+
124
+ #### Step 3: Create Task Module
125
+ ```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
135
+ ```
136
+
137
+ ---
138
+
139
+ ### 4. Social Media Platform
140
+
141
+ #### Step 1: Create Profile Object
142
+ ```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
159
+ ```
160
+
161
+ #### Step 3: Create Post Module
162
+ ```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
170
+ ```
171
+
172
+ #### Step 4: Add Features to User
173
+ ```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
177
+ ```
178
+
179
+ ---
180
+
181
+ ### 5. Learning Management System
182
+
183
+ #### Step 1: Create Course Module
184
+ ```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
195
+ ```
196
+
197
+ #### Step 2: Create Lesson Module
198
+ ```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
207
+ ```
208
+
209
+ #### Step 3: Create Enrollment Module
210
+ ```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
218
+ ```
219
+
220
+ ---
221
+
222
+ ## Adding Properties to Existing Modules
223
+
224
+ ### Add metadata to Product
225
+ ```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
229
+ ```
230
+
231
+ ### Add timestamps to custom module
232
+ ```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
236
+ ```
237
+
238
+ ### Add social features
239
+ ```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
244
+ ```
245
+
246
+ ---
247
+
248
+ ## Common Object Patterns
249
+
250
+ ### Contact Information
251
+ ```bash
252
+ lt server object --name ContactInfo \
253
+ --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
257
+ ```
258
+
259
+ ### Price Range
260
+ ```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
265
+ ```
266
+
267
+ ### Geo Location
268
+ ```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
273
+ ```
274
+
275
+ ### Media File
276
+ ```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
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Fullstack Project Initialization
287
+
288
+ ### Angular Project
289
+ ```bash
290
+ lt fullstack init \
291
+ --name MyAngularApp \
292
+ --frontend angular \
293
+ --git true \
294
+ --git-link https://github.com/myorg/my-angular-app.git
295
+ ```
296
+
297
+ ### Nuxt Project
298
+ ```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
304
+ ```
305
+
306
+ ### Local Development (No Git)
307
+ ```bash
308
+ lt fullstack init \
309
+ --name LocalDevProject \
310
+ --frontend angular \
311
+ --git false
312
+ ```