@diagramers/cli 4.0.15 β 4.0.17
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 +635 -451
- package/dist/commands/admin.d.ts +1 -1
- package/dist/commands/admin.d.ts.map +1 -1
- package/dist/commands/admin.js +6 -53
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/api.d.ts +1 -1
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +133 -582
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/deploy.d.ts +15 -0
- package/dist/commands/extend.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +24 -153
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +11 -40
- package/dist/commands/update.js.map +1 -1
- package/dist/config/template-config.d.ts +21 -0
- package/dist/index.js +218 -35
- package/dist/index.js.map +1 -1
- package/dist/services/api-generator.d.ts +3 -0
- package/dist/services/naming-utils.d.ts +37 -0
- package/dist/services/project-extender.d.ts +50 -0
- package/dist/services/project-initializer.d.ts +21 -0
- package/dist/services/project-initializer.d.ts.map +1 -1
- package/dist/services/project-initializer.js +11 -12
- package/dist/services/project-initializer.js.map +1 -1
- package/dist/services/project-updater.d.ts +18 -0
- package/dist/services/relation-generator.d.ts +3 -0
- package/dist/services/table-generator.d.ts +2 -0
- package/dist/services/template-processor.d.ts +2 -0
- package/dist/services/template-updater.d.ts +24 -0
- package/package.json +3 -3
package/README.md
CHANGED
@@ -1,653 +1,837 @@
|
|
1
1
|
# Diagramers CLI
|
2
2
|
|
3
|
-
|
3
|
+
A powerful command-line interface for managing Diagramers projects, generating modules, and extending functionality with a comprehensive template system.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
```
|
8
|
-
diagramers version
|
9
|
-
diagramers -V
|
10
|
-
diagramers api version
|
11
|
-
diagramers admin version
|
12
|
-
```
|
5
|
+
## π Features
|
13
6
|
|
14
|
-
|
7
|
+
### Core Capabilities
|
8
|
+
- **Project Initialization** - Create new projects from templates
|
9
|
+
- **Module Generation** - Generate complete modules with CRUD operations
|
10
|
+
- **Table Generation** - Add database tables to existing modules
|
11
|
+
- **Endpoint Generation** - Add custom endpoints to existing modules
|
12
|
+
- **Relation Management** - Generate database relations within modules
|
13
|
+
- **Feature Extension** - Add features to existing projects
|
14
|
+
- **Template Management** - Download and update project templates
|
15
|
+
|
16
|
+
### Supported Templates
|
17
|
+
- **API Projects** - Full-featured Node.js API with TypeScript
|
18
|
+
- **Admin Projects** - Modern admin dashboard with React/Vue/Angular support
|
19
|
+
- **Custom Templates** - Extensible template system
|
20
|
+
|
21
|
+
### Database Support
|
22
|
+
- **MongoDB** - Primary database with Mongoose schemas
|
23
|
+
- **SQL Databases** - MySQL, PostgreSQL, SQLite support
|
24
|
+
- **Schema Generation** - Automatic schema and relation creation
|
15
25
|
|
16
|
-
|
26
|
+
## π¦ Installation
|
17
27
|
|
28
|
+
### Global Installation
|
29
|
+
```bash
|
30
|
+
npm install -g @diagramers/cli
|
18
31
|
```
|
19
|
-
|
20
|
-
|
21
|
-
|
32
|
+
|
33
|
+
### Local Installation
|
34
|
+
```bash
|
35
|
+
npm install @diagramers/cli
|
36
|
+
npx diagramers --help
|
22
37
|
```
|
23
38
|
|
24
|
-
|
25
|
-
- For new projects, only modules are updated/added.
|
39
|
+
## π Quick Start
|
26
40
|
|
27
|
-
|
41
|
+
```bash
|
42
|
+
# Install the CLI globally
|
43
|
+
npm install -g @diagramers/cli
|
44
|
+
|
45
|
+
# Create a new API project
|
46
|
+
diagramers init api my-new-api
|
47
|
+
|
48
|
+
# Navigate to the project
|
49
|
+
cd my-new-api
|
28
50
|
|
29
|
-
|
51
|
+
# Set up environment variables
|
52
|
+
cp .env.example .env
|
30
53
|
|
31
|
-
|
54
|
+
# Install dependencies
|
55
|
+
npm install
|
32
56
|
|
57
|
+
# Start development
|
58
|
+
npm start
|
33
59
|
```
|
34
|
-
# Show CLI version
|
35
|
-
$ diagramers version
|
36
|
-
$ diagramers api version
|
37
|
-
$ diagramers admin version
|
38
60
|
|
39
|
-
|
40
|
-
$ diagramers admin update
|
61
|
+
## π Commands
|
41
62
|
|
42
|
-
|
43
|
-
|
63
|
+
### Project Management
|
64
|
+
|
65
|
+
#### Initialize New Project
|
66
|
+
```bash
|
67
|
+
diagramers init <template-type> <project-name> [options]
|
44
68
|
```
|
45
69
|
|
46
|
-
|
70
|
+
**Options:**
|
71
|
+
- `-v, --version <version>` - Specific version of the template to use (e.g., 1.1.17, latest)
|
72
|
+
- `-t, --template <template>` - Template version to use (deprecated, use --version)
|
73
|
+
- `-y, --yes` - Skip prompts and use defaults
|
47
74
|
|
48
|
-
|
75
|
+
**Examples:**
|
76
|
+
```bash
|
77
|
+
# Create API project with latest version
|
78
|
+
diagramers init api my-api-project
|
49
79
|
|
50
|
-
|
80
|
+
# Create API project with specific version
|
81
|
+
diagramers init api my-api-project -v 1.1.17
|
51
82
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
- **Project Initialization** - Automated project setup and configuration
|
56
|
-
- **Environment Setup** - Automatic environment variable configuration
|
57
|
-
- **Git Integration** - Automatic Git repository initialization
|
58
|
-
|
59
|
-
### Module & Feature Generation
|
60
|
-
- **Module Generation** - Create complete modules with CRUD operations
|
61
|
-
- **Table Generation** - Generate database tables with relationships
|
62
|
-
- **Endpoint Generation** - Create custom API endpoints
|
63
|
-
- **Relation Generation** - Set up database relationships (one-to-one, one-to-many, many-to-many)
|
64
|
-
- **Feature Extension** - Extend existing modules with new functionality
|
65
|
-
|
66
|
-
### Database Management
|
67
|
-
- **Database Seeding** - Generate and run database seeders
|
68
|
-
- **Migration Support** - Create and manage database migrations
|
69
|
-
- **Schema Generation** - Auto-generate database schemas
|
70
|
-
- **Relationship Management** - Handle complex database relationships
|
71
|
-
- **Data Validation** - Generate validation rules and schemas
|
72
|
-
|
73
|
-
### Development Tools
|
74
|
-
- **Code Generation** - Generate TypeScript interfaces, services, and controllers
|
75
|
-
- **API Documentation** - Auto-generate Swagger/OpenAPI documentation
|
76
|
-
- **Testing Setup** - Generate test files and testing configurations
|
77
|
-
- **Linting & Formatting** - Set up code quality tools
|
78
|
-
- **Build Configuration** - Generate build and deployment configurations
|
79
|
-
|
80
|
-
### Authentication & Security
|
81
|
-
- **Auth Module Generation** - Generate authentication modules
|
82
|
-
- **Provider Integration** - Set up OAuth, SMS, and email providers
|
83
|
-
- **Security Configuration** - Configure JWT, CORS, and security headers
|
84
|
-
- **Role & Permission System** - Generate role-based access control
|
85
|
-
- **Multi-factor Authentication** - Set up MFA providers
|
86
|
-
|
87
|
-
### Communication Services
|
88
|
-
- **Email System Setup** - Configure email providers and templates
|
89
|
-
- **SMS Integration** - Set up SMS providers for notifications
|
90
|
-
- **Push Notifications** - Configure push notification services
|
91
|
-
- **Webhook Management** - Set up webhook endpoints and handlers
|
92
|
-
|
93
|
-
### Deployment & DevOps
|
94
|
-
- **Docker Configuration** - Generate Docker and Docker Compose files
|
95
|
-
- **CI/CD Setup** - Create GitHub Actions and other CI/CD configurations
|
96
|
-
- **Environment Management** - Manage multiple environment configurations
|
97
|
-
- **Monitoring Setup** - Configure logging and monitoring tools
|
98
|
-
- **Backup Configuration** - Set up automated backup systems
|
83
|
+
# Create admin project with specific version
|
84
|
+
diagramers admin init react-typescript my-admin-dashboard -v 1.0.0
|
85
|
+
```
|
99
86
|
|
100
|
-
|
87
|
+
#### Update Project
|
88
|
+
|
89
|
+
Update an existing project with the latest template features:
|
101
90
|
|
102
|
-
### Global Installation (Recommended)
|
103
91
|
```bash
|
104
|
-
|
92
|
+
diagramers update [options]
|
105
93
|
```
|
106
94
|
|
107
|
-
|
95
|
+
**Options:**
|
96
|
+
- `-v, --version <version>` - Specific version to update to (e.g., 1.1.27, latest)
|
97
|
+
- `-f, --force` - Force update even if conflicts detected
|
98
|
+
- `-b, --backup` - Create backup before updating
|
99
|
+
|
100
|
+
**Examples:**
|
108
101
|
```bash
|
109
|
-
|
110
|
-
|
102
|
+
# Update to latest version
|
103
|
+
diagramers update
|
104
|
+
|
105
|
+
# Update to specific version
|
106
|
+
diagramers update -v 1.1.27
|
107
|
+
|
108
|
+
# Force update (overwrite conflicts)
|
109
|
+
diagramers update --force
|
110
|
+
|
111
|
+
# Create backup before updating
|
112
|
+
diagramers update --backup
|
113
|
+
|
114
|
+
# Combine options
|
115
|
+
diagramers update -v 1.1.27 --backup --force
|
111
116
|
```
|
112
117
|
|
113
|
-
|
118
|
+
#### What Gets Updated
|
119
|
+
|
120
|
+
The update command intelligently updates the following:
|
121
|
+
|
122
|
+
- **Core Files**: `src/core/`, `src/shared/`, `src/plugins/`
|
123
|
+
- **Configuration**: `config/` folder, `webpack.config.js`, `tsconfig.json`
|
124
|
+
- **Scripts**: `scripts/` folder with utility scripts
|
125
|
+
- **Documentation**: `README.md`, `DEVELOPER_GUIDE.md`
|
126
|
+
- **Environment**: `.env.example` template
|
127
|
+
- **Package.json**: Updates dependencies and scripts while preserving project-specific fields
|
128
|
+
|
129
|
+
#### Version Management
|
130
|
+
|
131
|
+
- **Automatic Version Sync**: Project version is updated to match template version
|
132
|
+
- **Project Preservation**: Project-specific fields (name, description, repository, etc.) are preserved
|
133
|
+
- **Conflict Detection**: Detects conflicts and allows force overwrite
|
134
|
+
- **Backup Support**: Creates timestamped backups before updating
|
135
|
+
|
136
|
+
#### Update Process
|
137
|
+
|
138
|
+
1. **Validation**: Checks if current directory is a valid project
|
139
|
+
2. **Version Check**: Shows current project version vs target version
|
140
|
+
3. **Backup**: Creates backup if requested
|
141
|
+
4. **Download**: Downloads latest template from npm
|
142
|
+
5. **Conflict Check**: Identifies files with conflicts
|
143
|
+
6. **Update**: Updates files while preserving project-specific settings
|
144
|
+
7. **Cleanup**: Removes temporary files
|
145
|
+
|
146
|
+
#### Example Output
|
147
|
+
|
114
148
|
```bash
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
149
|
+
π Checking for template updates...
|
150
|
+
π¦ Current project version: 1.1.26
|
151
|
+
π Updating to latest version
|
152
|
+
π¦ Downloading latest template: @diagramers/api
|
153
|
+
β
Template downloaded from npm: @diagramers/api
|
154
|
+
π Updating project files...
|
155
|
+
β
Updated: src/core/config/index.ts
|
156
|
+
β
Updated: scripts/env-debug.js
|
157
|
+
β
Updated: package.json (version: 1.1.27)
|
158
|
+
β
Project updated successfully!
|
159
|
+
π¦ Template version: 1.1.27
|
160
|
+
π Review the changes and test your application
|
161
|
+
π‘ Run "npm install" to update dependencies if needed
|
162
|
+
```
|
163
|
+
|
164
|
+
#### List Available Versions
|
165
|
+
```bash
|
166
|
+
diagramers versions [options]
|
119
167
|
```
|
120
168
|
|
121
|
-
|
169
|
+
**Options:**
|
170
|
+
- `-a, --all` - Show all versions (default: show last 10)
|
122
171
|
|
123
|
-
|
172
|
+
**Examples:**
|
124
173
|
```bash
|
125
|
-
#
|
126
|
-
diagramers
|
174
|
+
# Show last 10 versions
|
175
|
+
diagramers versions
|
127
176
|
|
128
|
-
#
|
129
|
-
|
177
|
+
# Show all available versions
|
178
|
+
diagramers versions --all
|
179
|
+
```
|
130
180
|
|
131
|
-
|
132
|
-
npm install --legacy-peer-deps
|
181
|
+
### Module Management
|
133
182
|
|
134
|
-
|
135
|
-
|
183
|
+
#### Generate Module
|
184
|
+
```bash
|
185
|
+
diagramers extend --module <module-name> [options]
|
136
186
|
```
|
137
187
|
|
138
|
-
|
188
|
+
**Examples:**
|
139
189
|
```bash
|
140
|
-
#
|
141
|
-
diagramers
|
142
|
-
|
143
|
-
# Navigate to the project
|
144
|
-
cd my-admin-dashboard
|
190
|
+
# Generate basic module
|
191
|
+
diagramers extend --module products
|
145
192
|
|
146
|
-
#
|
147
|
-
|
193
|
+
# Generate module with CRUD operations
|
194
|
+
diagramers extend --module products --crud
|
148
195
|
|
149
|
-
#
|
150
|
-
|
196
|
+
# Generate module with custom fields
|
197
|
+
diagramers extend --module products --fields name,price,description --crud
|
151
198
|
```
|
152
199
|
|
153
|
-
###
|
200
|
+
### Table Management
|
201
|
+
|
202
|
+
#### Add Table to Module
|
154
203
|
```bash
|
155
|
-
|
156
|
-
|
204
|
+
diagramers extend --table <module:table> --fields <field1,field2,...>
|
205
|
+
```
|
157
206
|
|
207
|
+
**Examples:**
|
208
|
+
```bash
|
158
209
|
# Add categories table to products module
|
159
210
|
diagramers extend --table products:categories --fields name,description,slug
|
160
211
|
|
161
212
|
# Add products table to products module
|
162
|
-
diagramers extend --table products:products --fields name,price,
|
213
|
+
diagramers extend --table products:products --fields name,price,category_id
|
163
214
|
|
164
|
-
#
|
165
|
-
diagramers extend --
|
215
|
+
# Add user profiles table to users module
|
216
|
+
diagramers extend --table users:profiles --fields bio,avatar,social_links
|
166
217
|
```
|
167
218
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
219
|
+
**Field Types (Auto-detected):**
|
220
|
+
- `name`, `title`, `description` β String
|
221
|
+
- `email`, `phone` β String
|
222
|
+
- `price`, `count`, `age` β Number
|
223
|
+
- `created_at`, `updated_at` β Date
|
224
|
+
- `is_active`, `verified` β Boolean
|
225
|
+
- `*_id` β ObjectId
|
226
|
+
- `status` β Number
|
227
|
+
|
228
|
+
### Endpoint Management
|
172
229
|
|
173
|
-
|
174
|
-
|
230
|
+
#### Add Endpoint to Module
|
231
|
+
```bash
|
232
|
+
diagramers extend --endpoint <module:endpoint> [options]
|
175
233
|
```
|
176
234
|
|
177
|
-
|
235
|
+
**Examples:**
|
236
|
+
```bash
|
237
|
+
# Add GET endpoint
|
238
|
+
diagramers extend --endpoint products:search --method GET
|
178
239
|
|
179
|
-
|
240
|
+
# Add POST endpoint
|
241
|
+
diagramers extend --endpoint users:reset-password --method POST
|
180
242
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
diagramers init api <project-name> [options]
|
243
|
+
# Add endpoint with custom path
|
244
|
+
diagramers extend --endpoint products:featured --method GET --path /featured --description "Get featured products"
|
245
|
+
```
|
185
246
|
|
186
|
-
|
187
|
-
|
247
|
+
**Supported Methods:**
|
248
|
+
- `GET` - Retrieve data
|
249
|
+
- `POST` - Create data
|
250
|
+
- `PUT` - Update data
|
251
|
+
- `DELETE` - Delete data
|
188
252
|
|
189
|
-
|
190
|
-
diagramers init <project-name> --api --admin
|
253
|
+
### Relation Management
|
191
254
|
|
192
|
-
|
193
|
-
|
255
|
+
#### Create Relations Within Module
|
256
|
+
```bash
|
257
|
+
diagramers extend --relation <module:table1-table2[:type]>
|
194
258
|
```
|
195
259
|
|
196
|
-
|
260
|
+
**Examples:**
|
197
261
|
```bash
|
198
|
-
#
|
199
|
-
diagramers
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
--deploy firebase
|
262
|
+
# One-to-many relation (default)
|
263
|
+
diagramers extend --relation products:category-product
|
264
|
+
|
265
|
+
# One-to-one relation
|
266
|
+
diagramers extend --relation users:user-profile:one-to-one
|
204
267
|
|
205
|
-
#
|
206
|
-
diagramers
|
207
|
-
--features auth,email,sms,notifications,file-upload \
|
208
|
-
--providers google,github,twilio,sendgrid
|
268
|
+
# Many-to-many relation
|
269
|
+
diagramers extend --relation products:product-tag:many-to-many
|
209
270
|
```
|
210
271
|
|
211
|
-
|
272
|
+
**Relation Types:**
|
273
|
+
- `one-to-one` - Single record relations
|
274
|
+
- `one-to-many` - Parent-child relations (default)
|
275
|
+
- `many-to-many` - Junction table relations
|
212
276
|
|
213
|
-
|
277
|
+
### Feature Management
|
278
|
+
|
279
|
+
#### List Available Features
|
214
280
|
```bash
|
215
|
-
|
216
|
-
|
281
|
+
diagramers extend --list
|
282
|
+
```
|
217
283
|
|
218
|
-
|
219
|
-
|
284
|
+
#### Add Feature
|
285
|
+
```bash
|
286
|
+
diagramers extend --feature <feature-name>
|
287
|
+
```
|
220
288
|
|
221
|
-
|
222
|
-
diagramers extend --module users --fields email,username,role,is_active --crud
|
289
|
+
## π¨ Admin Dashboard Management
|
223
290
|
|
224
|
-
|
225
|
-
diagramers extend --module auth --auth --providers internal,oauth,sms
|
291
|
+
The CLI provides comprehensive support for managing admin dashboard projects with modern frameworks and features.
|
226
292
|
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
--tests \
|
233
|
-
--docs
|
293
|
+
### Admin Project Initialization
|
294
|
+
|
295
|
+
#### Initialize New Admin Project
|
296
|
+
```bash
|
297
|
+
diagramers admin init <template-type> <project-name> [options]
|
234
298
|
```
|
235
299
|
|
236
|
-
|
300
|
+
**Template Types:**
|
301
|
+
- `react-typescript` - React 18 + TypeScript + Tailwind CSS
|
302
|
+
- `vue-typescript` - Vue 3 + TypeScript + Tailwind CSS
|
303
|
+
- `angular` - Angular 17 + TypeScript + Tailwind CSS
|
304
|
+
|
305
|
+
**Options:**
|
306
|
+
- `-f, --framework <framework>` - Framework to use (react, vue, angular)
|
307
|
+
- `-t, --template <template>` - Template package name
|
308
|
+
- `-v, --version <version>` - Template version to use
|
309
|
+
- `-y, --yes` - Skip prompts and use defaults
|
310
|
+
- `--typescript` - Use TypeScript (default: true)
|
311
|
+
- `--tailwind` - Use Tailwind CSS (default: true)
|
312
|
+
- `--api-url <url>` - API URL for the backend
|
313
|
+
- `--socket-url <url>` - Socket.IO URL for real-time features
|
314
|
+
|
315
|
+
**Examples:**
|
237
316
|
```bash
|
238
|
-
#
|
239
|
-
diagramers
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
--docs \
|
244
|
-
--migrations \
|
245
|
-
--seeders
|
317
|
+
# Create React admin project
|
318
|
+
diagramers admin init react-typescript my-admin-app
|
319
|
+
|
320
|
+
# Create Vue admin project with specific version
|
321
|
+
diagramers admin init vue-typescript my-vue-admin --version 1.0.0
|
246
322
|
|
247
|
-
#
|
248
|
-
diagramers
|
249
|
-
|
250
|
-
|
323
|
+
# Create Angular admin project with custom API URL
|
324
|
+
diagramers admin init angular my-angular-admin --api-url http://localhost:3000
|
325
|
+
|
326
|
+
# Create with all options
|
327
|
+
diagramers admin init react-typescript my-admin-app \
|
328
|
+
--framework react \
|
329
|
+
--typescript \
|
330
|
+
--tailwind \
|
331
|
+
--api-url http://localhost:3000 \
|
332
|
+
--socket-url http://localhost:3000
|
251
333
|
```
|
252
334
|
|
253
|
-
###
|
335
|
+
### Admin Project Extension
|
254
336
|
|
255
|
-
####
|
337
|
+
#### Extend Admin Project
|
338
|
+
```bash
|
339
|
+
diagramers admin extend [options]
|
340
|
+
```
|
341
|
+
|
342
|
+
**Options:**
|
343
|
+
- `-p, --page <name>` - Generate a new page
|
344
|
+
- `-c, --component <name>` - Generate a new component
|
345
|
+
- `-s, --service <name>` - Generate a new service
|
346
|
+
- `-h, --hook <name>` - Generate a new custom hook
|
347
|
+
- `-m, --module <name>` - Generate a complete module with CRUD
|
348
|
+
- `--crud` - Include CRUD operations for module
|
349
|
+
- `--api` - Include API integration for module
|
350
|
+
- `--socket` - Include Socket.IO integration for module
|
351
|
+
- `--table` - Include data table for module
|
352
|
+
- `--form` - Include form components for module
|
353
|
+
- `--chart` - Include chart components for module
|
354
|
+
- `--auth` - Include authentication for module
|
355
|
+
- `--path <path>` - Custom path for generated files
|
356
|
+
|
357
|
+
**Examples:**
|
256
358
|
```bash
|
257
|
-
#
|
258
|
-
diagramers extend --
|
359
|
+
# Generate a new module with CRUD operations
|
360
|
+
diagramers admin extend --module products --crud --api --table
|
361
|
+
|
362
|
+
# Generate a new page
|
363
|
+
diagramers admin extend --page analytics
|
259
364
|
|
260
|
-
# Generate
|
261
|
-
diagramers extend --
|
262
|
-
--fields bio,avatar,birth_date,is_verified,preferences
|
365
|
+
# Generate a new component
|
366
|
+
diagramers admin extend --component ProductCard
|
263
367
|
|
264
|
-
# Generate
|
265
|
-
diagramers extend --
|
266
|
-
--fields name,description,slug,parent_id \
|
267
|
-
--relations parent:categories:one-to-many
|
368
|
+
# Generate a new service
|
369
|
+
diagramers admin extend --service orderService
|
268
370
|
|
269
|
-
# Generate
|
270
|
-
diagramers extend --
|
271
|
-
|
272
|
-
|
371
|
+
# Generate a new custom hook
|
372
|
+
diagramers admin extend --hook useOrders
|
373
|
+
|
374
|
+
# Generate complete module with all features
|
375
|
+
diagramers admin extend --module orders --crud --api --socket --table --form --chart --auth
|
273
376
|
```
|
274
377
|
|
275
|
-
|
378
|
+
### Admin Project Updates
|
379
|
+
|
380
|
+
#### Update Admin Project
|
276
381
|
```bash
|
277
|
-
|
278
|
-
|
279
|
-
--fields name:string,email:string,phone:string
|
382
|
+
diagramers admin update [options]
|
383
|
+
```
|
280
384
|
|
281
|
-
|
282
|
-
|
283
|
-
|
385
|
+
**Options:**
|
386
|
+
- `-t, --template <template>` - Template to update
|
387
|
+
- `-v, --version <version>` - Version to update to
|
388
|
+
- `--force` - Force update even if conflicts exist
|
389
|
+
- `--backup` - Create backup before updating
|
284
390
|
|
285
|
-
|
286
|
-
|
287
|
-
|
391
|
+
**Examples:**
|
392
|
+
```bash
|
393
|
+
# Update to latest version
|
394
|
+
diagramers admin update
|
395
|
+
|
396
|
+
# Update to specific version
|
397
|
+
diagramers admin update --version 1.0.0
|
288
398
|
|
289
|
-
#
|
290
|
-
diagramers
|
291
|
-
|
399
|
+
# Force update with backup
|
400
|
+
diagramers admin update --force --backup
|
401
|
+
```
|
292
402
|
|
293
|
-
|
294
|
-
diagramers extend --table users:profiles \
|
295
|
-
--fields preferences:object,metadata:json
|
403
|
+
### Admin Version Management
|
296
404
|
|
297
|
-
|
298
|
-
|
299
|
-
|
405
|
+
#### Check Admin Version
|
406
|
+
```bash
|
407
|
+
diagramers admin version [options]
|
300
408
|
```
|
301
409
|
|
302
|
-
|
410
|
+
**Options:**
|
411
|
+
- `-c, --check <version>` - Check if specific version exists
|
303
412
|
|
304
|
-
|
413
|
+
**Examples:**
|
305
414
|
```bash
|
306
|
-
#
|
307
|
-
diagramers
|
415
|
+
# Show current version info
|
416
|
+
diagramers admin version
|
308
417
|
|
309
|
-
#
|
310
|
-
diagramers
|
418
|
+
# Check specific version
|
419
|
+
diagramers admin version --check 1.0.0
|
420
|
+
```
|
311
421
|
|
312
|
-
|
313
|
-
|
314
|
-
|
422
|
+
#### List Available Admin Versions
|
423
|
+
```bash
|
424
|
+
diagramers admin versions [options]
|
425
|
+
```
|
315
426
|
|
316
|
-
|
317
|
-
|
318
|
-
--auth required --roles user,admin
|
427
|
+
**Options:**
|
428
|
+
- `-a, --all` - Show all versions (default: show last 10)
|
319
429
|
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
430
|
+
**Examples:**
|
431
|
+
```bash
|
432
|
+
# Show last 10 versions
|
433
|
+
diagramers admin versions
|
434
|
+
|
435
|
+
# Show all available versions
|
436
|
+
diagramers admin versions --all
|
437
|
+
```
|
438
|
+
|
439
|
+
### Admin Project Features
|
440
|
+
|
441
|
+
#### Available Templates
|
442
|
+
- **React TypeScript Admin** - React 18 + TypeScript + Tailwind CSS
|
443
|
+
- **Vue TypeScript Admin** - Vue 3 + TypeScript + Tailwind CSS
|
444
|
+
- **Angular Admin** - Angular 17 + TypeScript + Tailwind CSS
|
445
|
+
|
446
|
+
#### Built-in Features
|
447
|
+
- **Authentication System** - Login, register, password reset, JWT management
|
448
|
+
- **Dashboard** - Analytics overview, metric cards, chart widgets
|
449
|
+
- **User Management** - User CRUD, profiles, role management, activity tracking
|
450
|
+
- **Real-time Updates** - Socket.IO integration, live notifications
|
451
|
+
- **Data Tables** - Advanced filtering, sorting, pagination, bulk actions
|
452
|
+
- **Charts & Analytics** - Line, bar, pie, area charts with real-time data
|
453
|
+
- **Form Builder** - Dynamic forms, validation, file uploads, multi-step forms
|
454
|
+
- **File Upload** - Drag & drop, progress tracking, file preview
|
455
|
+
- **Notifications** - Toast notifications, notification center, push notifications
|
456
|
+
- **Settings Panel** - Application settings, user preferences, theme customization
|
457
|
+
|
458
|
+
#### Project Structure
|
459
|
+
```
|
460
|
+
my-admin-app/
|
461
|
+
βββ src/
|
462
|
+
β βββ components/ # Reusable UI components
|
463
|
+
β β βββ ui/ # Base UI components
|
464
|
+
β β βββ layout/ # Layout components
|
465
|
+
β βββ features/ # Feature modules
|
466
|
+
β β βββ auth/ # Authentication
|
467
|
+
β β βββ dashboard/ # Dashboard
|
468
|
+
β β βββ users/ # User management
|
469
|
+
β β βββ [modules]/ # Generated modules
|
470
|
+
β βββ hooks/ # Custom React hooks
|
471
|
+
β βββ services/ # API services
|
472
|
+
β βββ lib/ # Utilities and configurations
|
473
|
+
β βββ types/ # TypeScript type definitions
|
474
|
+
β βββ styles/ # Global styles
|
475
|
+
β βββ assets/ # Static assets
|
476
|
+
βββ public/ # Public assets
|
477
|
+
βββ package.json # Dependencies and scripts
|
478
|
+
βββ tsconfig.json # TypeScript configuration
|
479
|
+
βββ tailwind.config.js # Tailwind CSS configuration
|
480
|
+
βββ vite.config.ts # Vite configuration
|
481
|
+
βββ .env # Environment variables
|
482
|
+
```
|
483
|
+
|
484
|
+
### Email System Management
|
485
|
+
|
486
|
+
#### Generate Email Module
|
487
|
+
```bash
|
488
|
+
diagramers extend --module email --crud
|
324
489
|
```
|
325
490
|
|
326
|
-
####
|
491
|
+
#### Add Email Configuration Table
|
327
492
|
```bash
|
328
|
-
|
329
|
-
|
330
|
-
--method GET \
|
331
|
-
--auth required \
|
332
|
-
--roles admin \
|
333
|
-
--validation \
|
334
|
-
--tests \
|
335
|
-
--docs \
|
336
|
-
--rate-limit 100:1m
|
493
|
+
diagramers extend --table email:configs --fields provider,code,credentials,fromName,fromEmail,default
|
494
|
+
```
|
337
495
|
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
--response "Product[]" \
|
342
|
-
--description "Get featured products"
|
496
|
+
#### Add Email Templates Table
|
497
|
+
```bash
|
498
|
+
diagramers extend --table email:templates --fields name,subject,body,isActive,createdAt
|
343
499
|
```
|
344
500
|
|
345
|
-
|
501
|
+
#### Add Email Logs Table
|
502
|
+
```bash
|
503
|
+
diagramers extend --table email:logs --fields to,subject,status,provider,error,createdAt
|
504
|
+
```
|
346
505
|
|
347
|
-
####
|
506
|
+
#### Create Email Relations
|
348
507
|
```bash
|
349
|
-
# One-to-many
|
350
|
-
diagramers extend --relation
|
508
|
+
# One-to-many: User to Email Configs
|
509
|
+
diagramers extend --relation email:user-config:one-to-many
|
351
510
|
|
352
|
-
# One-to-
|
353
|
-
diagramers extend --relation
|
511
|
+
# One-to-many: Email Config to Email Logs
|
512
|
+
diagramers extend --relation email:config-log:one-to-many
|
513
|
+
```
|
354
514
|
|
355
|
-
|
356
|
-
|
515
|
+
#### Add Email Endpoints
|
516
|
+
```bash
|
517
|
+
# Send email endpoint
|
518
|
+
diagramers extend --endpoint email:send --method POST --description "Send email using configured provider"
|
357
519
|
|
358
|
-
#
|
359
|
-
diagramers extend --
|
360
|
-
--through products \
|
361
|
-
--fields quantity,price
|
520
|
+
# Test email endpoint
|
521
|
+
diagramers extend --endpoint email:test --method POST --description "Test email configuration"
|
362
522
|
|
363
|
-
#
|
364
|
-
diagramers extend --
|
365
|
-
--self-referencing
|
523
|
+
# Get email statistics
|
524
|
+
diagramers extend --endpoint email:stats --method GET --description "Get email sending statistics"
|
366
525
|
```
|
367
526
|
|
368
|
-
|
369
|
-
|
370
|
-
#### Generate Auth Modules
|
527
|
+
#### Email Provider Setup Commands
|
371
528
|
```bash
|
372
|
-
#
|
373
|
-
diagramers extend --
|
529
|
+
# Add Gmail SMTP configuration
|
530
|
+
diagramers extend --endpoint email:setup-gmail --method POST --description "Setup Gmail SMTP configuration"
|
374
531
|
|
375
|
-
#
|
376
|
-
diagramers extend --
|
532
|
+
# Add SendGrid configuration
|
533
|
+
diagramers extend --endpoint email:setup-sendgrid --method POST --description "Setup SendGrid configuration"
|
377
534
|
|
378
|
-
#
|
379
|
-
diagramers extend --
|
380
|
-
|
535
|
+
# Add AWS SES configuration
|
536
|
+
diagramers extend --endpoint email:setup-ses --method POST --description "Setup AWS SES configuration"
|
537
|
+
```
|
381
538
|
|
382
|
-
|
383
|
-
diagramers extend --auth --providers sms \
|
384
|
-
--sms twilio,aws-sns,vonage
|
539
|
+
### User Management System
|
385
540
|
|
386
|
-
|
387
|
-
|
388
|
-
|
541
|
+
#### Generate User Module
|
542
|
+
```bash
|
543
|
+
diagramers extend --module users --crud
|
389
544
|
```
|
390
545
|
|
391
|
-
####
|
546
|
+
#### Add User Profile Table
|
392
547
|
```bash
|
393
|
-
|
394
|
-
diagramers extend --auth \
|
395
|
-
--providers internal,oauth,sms \
|
396
|
-
--features registration,login,logout,password-reset,email-verification \
|
397
|
-
--oauth google,github \
|
398
|
-
--sms twilio \
|
399
|
-
--jwt \
|
400
|
-
--refresh-tokens \
|
401
|
-
--rate-limiting
|
548
|
+
diagramers extend --table users:profiles --fields bio,avatar,socialLinks,location,website,birthDate,preferences
|
402
549
|
```
|
403
550
|
|
404
|
-
|
551
|
+
#### Add User Sessions Table
|
552
|
+
```bash
|
553
|
+
diagramers extend --table users:sessions --fields userId,deviceInfo,ipAddress,userAgent,isActive,lastActivity
|
554
|
+
```
|
405
555
|
|
406
|
-
####
|
556
|
+
#### Add User Activity Table
|
407
557
|
```bash
|
408
|
-
|
409
|
-
|
558
|
+
diagramers extend --table users:activities --fields userId,action,details,ipAddress,userAgent,timestamp
|
559
|
+
```
|
410
560
|
|
411
|
-
|
412
|
-
|
413
|
-
|
561
|
+
#### Create User Relations
|
562
|
+
```bash
|
563
|
+
# One-to-one: User to Profile
|
564
|
+
diagramers extend --relation users:user-profile:one-to-one
|
414
565
|
|
415
|
-
#
|
416
|
-
diagramers extend --
|
417
|
-
|
418
|
-
|
566
|
+
# One-to-many: User to Sessions
|
567
|
+
diagramers extend --relation users:user-session:one-to-many
|
568
|
+
|
569
|
+
# One-to-many: User to Activities
|
570
|
+
diagramers extend --relation users:user-activity:one-to-many
|
419
571
|
```
|
420
572
|
|
421
|
-
####
|
573
|
+
#### Add User Endpoints
|
422
574
|
```bash
|
423
|
-
#
|
424
|
-
diagramers extend --
|
575
|
+
# User profile management
|
576
|
+
diagramers extend --endpoint users:profile --method GET --description "Get user profile"
|
577
|
+
diagramers extend --endpoint users:update-profile --method PUT --description "Update user profile"
|
578
|
+
diagramers extend --endpoint users:upload-avatar --method POST --description "Upload user avatar"
|
425
579
|
|
426
|
-
#
|
427
|
-
diagramers extend --
|
428
|
-
|
580
|
+
# User administration
|
581
|
+
diagramers extend --endpoint users:list --method GET --description "List all users (admin)"
|
582
|
+
diagramers extend --endpoint users:create --method POST --description "Create user (admin)"
|
583
|
+
diagramers extend --endpoint users:update --method PUT --description "Update user (admin)"
|
584
|
+
diagramers extend --endpoint users:delete --method DELETE --description "Delete user (admin)"
|
429
585
|
|
430
|
-
#
|
431
|
-
diagramers extend --
|
432
|
-
|
433
|
-
--features verification,notifications
|
586
|
+
# User statistics
|
587
|
+
diagramers extend --endpoint users:stats --method GET --description "Get user statistics"
|
588
|
+
diagramers extend --endpoint users:activity --method GET --description "Get user activity"
|
434
589
|
```
|
435
590
|
|
436
|
-
|
591
|
+
## π§ Workflow Examples
|
592
|
+
|
593
|
+
### Complete Product Management System
|
437
594
|
|
438
|
-
#### Database Operations
|
439
595
|
```bash
|
440
|
-
#
|
441
|
-
diagramers
|
596
|
+
# 1. Create new API project
|
597
|
+
diagramers init api ecommerce-api
|
598
|
+
cd ecommerce-api
|
442
599
|
|
443
|
-
#
|
444
|
-
diagramers
|
600
|
+
# 2. Generate products module
|
601
|
+
diagramers extend --module products --crud
|
445
602
|
|
446
|
-
#
|
447
|
-
diagramers
|
603
|
+
# 3. Add categories table
|
604
|
+
diagramers extend --table products:categories --fields name,description,slug
|
448
605
|
|
449
|
-
#
|
450
|
-
diagramers
|
606
|
+
# 4. Add products table
|
607
|
+
diagramers extend --table products:products --fields name,price,description,category_id
|
451
608
|
|
452
|
-
#
|
453
|
-
diagramers
|
609
|
+
# 5. Create category-product relation
|
610
|
+
diagramers extend --relation products:category-product:one-to-many
|
454
611
|
|
455
|
-
#
|
456
|
-
diagramers
|
612
|
+
# 6. Add custom search endpoint
|
613
|
+
diagramers extend --endpoint products:search --method GET --description "Search products"
|
614
|
+
|
615
|
+
# 7. Install dependencies and start
|
616
|
+
npm install
|
617
|
+
npm start
|
457
618
|
```
|
458
619
|
|
459
|
-
|
620
|
+
### User Management with Profiles
|
621
|
+
|
460
622
|
```bash
|
461
|
-
# Generate
|
462
|
-
diagramers
|
623
|
+
# 1. Generate users module (if not exists)
|
624
|
+
diagramers extend --module users --crud
|
625
|
+
|
626
|
+
# 2. Add user profiles table
|
627
|
+
diagramers extend --table users:profiles --fields bio,avatar,social_links,birth_date
|
463
628
|
|
464
|
-
#
|
465
|
-
diagramers
|
629
|
+
# 3. Create user-profile relation
|
630
|
+
diagramers extend --relation users:user-profile:one-to-one
|
466
631
|
|
467
|
-
#
|
468
|
-
diagramers
|
632
|
+
# 4. Add profile endpoints
|
633
|
+
diagramers extend --endpoint users:update-profile --method PUT
|
634
|
+
diagramers extend --endpoint users:get-profile --method GET
|
469
635
|
```
|
470
636
|
|
471
|
-
###
|
637
|
+
### Complete Email System Setup
|
472
638
|
|
473
|
-
#### Generate Tests
|
474
639
|
```bash
|
475
|
-
# Generate
|
476
|
-
diagramers
|
477
|
-
|
478
|
-
# Generate integration tests
|
479
|
-
diagramers test --integration --modules products
|
640
|
+
# 1. Generate email module with CRUD operations
|
641
|
+
diagramers extend --module email --crud
|
480
642
|
|
481
|
-
#
|
482
|
-
diagramers
|
643
|
+
# 2. Add email configurations table
|
644
|
+
diagramers extend --table email:configs --fields provider,code,credentials,fromName,fromEmail,default
|
483
645
|
|
484
|
-
#
|
485
|
-
diagramers
|
486
|
-
```
|
646
|
+
# 3. Add email templates table
|
647
|
+
diagramers extend --table email:templates --fields name,subject,body,isActive,createdAt
|
487
648
|
|
488
|
-
|
649
|
+
# 4. Add email logs table for tracking
|
650
|
+
diagramers extend --table email:logs --fields to,subject,status,provider,error,createdAt
|
489
651
|
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
diagramers docs api --format swagger --output docs/api
|
652
|
+
# 5. Create relationships
|
653
|
+
diagramers extend --relation email:user-config:one-to-many
|
654
|
+
diagramers extend --relation email:config-log:one-to-many
|
494
655
|
|
495
|
-
#
|
496
|
-
diagramers
|
656
|
+
# 6. Add email-specific endpoints
|
657
|
+
diagramers extend --endpoint email:send --method POST --description "Send email using configured provider"
|
658
|
+
diagramers extend --endpoint email:test --method POST --description "Test email configuration"
|
659
|
+
diagramers extend --endpoint email:stats --method GET --description "Get email sending statistics"
|
497
660
|
|
498
|
-
#
|
499
|
-
diagramers
|
661
|
+
# 7. Add provider setup endpoints
|
662
|
+
diagramers extend --endpoint email:setup-gmail --method POST --description "Setup Gmail SMTP configuration"
|
663
|
+
diagramers extend --endpoint email:setup-sendgrid --method POST --description "Setup SendGrid configuration"
|
500
664
|
|
501
|
-
#
|
502
|
-
|
665
|
+
# 8. Install dependencies and start
|
666
|
+
npm install
|
667
|
+
npm start
|
503
668
|
```
|
504
669
|
|
505
|
-
###
|
670
|
+
### Complete User Management System Setup
|
671
|
+
|
506
672
|
```bash
|
507
|
-
#
|
508
|
-
diagramers
|
673
|
+
# 1. Generate users module with CRUD operations
|
674
|
+
diagramers extend --module users --crud
|
509
675
|
|
510
|
-
#
|
511
|
-
diagramers
|
512
|
-
```
|
676
|
+
# 2. Add user profiles table
|
677
|
+
diagramers extend --table users:profiles --fields bio,avatar,socialLinks,location,website,birthDate,preferences
|
513
678
|
|
514
|
-
|
679
|
+
# 3. Add user sessions table for tracking
|
680
|
+
diagramers extend --table users:sessions --fields userId,deviceInfo,ipAddress,userAgent,isActive,lastActivity
|
515
681
|
|
516
|
-
|
682
|
+
# 4. Add user activity table for audit
|
683
|
+
diagramers extend --table users:activities --fields userId,action,details,ipAddress,userAgent,timestamp
|
517
684
|
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
diagramers
|
685
|
+
# 5. Create user relationships
|
686
|
+
diagramers extend --relation users:user-profile:one-to-one
|
687
|
+
diagramers extend --relation users:user-session:one-to-many
|
688
|
+
diagramers extend --relation users:user-activity:one-to-many
|
522
689
|
|
523
|
-
#
|
524
|
-
|
690
|
+
# 6. Add user profile endpoints
|
691
|
+
diagramers extend --endpoint users:profile --method GET --description "Get user profile"
|
692
|
+
diagramers extend --endpoint users:update-profile --method PUT --description "Update user profile"
|
693
|
+
diagramers extend --endpoint users:upload-avatar --method POST --description "Upload user avatar"
|
525
694
|
|
526
|
-
#
|
527
|
-
diagramers
|
695
|
+
# 7. Add user administration endpoints
|
696
|
+
diagramers extend --endpoint users:list --method GET --description "List all users (admin)"
|
697
|
+
diagramers extend --endpoint users:create --method POST --description "Create user (admin)"
|
698
|
+
diagramers extend --endpoint users:update --method PUT --description "Update user (admin)"
|
699
|
+
diagramers extend --endpoint users:delete --method DELETE --description "Delete user (admin)"
|
700
|
+
|
701
|
+
# 8. Add user analytics endpoints
|
702
|
+
diagramers extend --endpoint users:stats --method GET --description "Get user statistics"
|
703
|
+
diagramers extend --endpoint users:activity --method GET --description "Get user activity"
|
704
|
+
|
705
|
+
# 9. Install dependencies and start
|
706
|
+
npm install
|
707
|
+
npm start
|
528
708
|
```
|
529
709
|
|
530
|
-
|
531
|
-
```bash
|
532
|
-
# Validate module configuration
|
533
|
-
diagramers validate --module products
|
710
|
+
## π οΈ Advanced Usage
|
534
711
|
|
535
|
-
|
536
|
-
diagramers validate --fields name:string,price:number
|
712
|
+
### Database Seeding
|
537
713
|
|
538
|
-
|
539
|
-
|
540
|
-
|
714
|
+
All generated tables automatically include:
|
715
|
+
- **Sample data** - 3 sample records per table
|
716
|
+
- **Seeder integration** - Automatic database seeding
|
717
|
+
- **Development data** - Realistic test data
|
541
718
|
|
542
|
-
#### Database Issues
|
543
719
|
```bash
|
544
|
-
#
|
545
|
-
|
546
|
-
|
547
|
-
# Validate database schema
|
548
|
-
diagramers db validate --schema
|
720
|
+
# Run database seeding
|
721
|
+
npm run seed
|
549
722
|
|
550
|
-
#
|
551
|
-
|
723
|
+
# Reset and reseed database
|
724
|
+
npm run seed --reset
|
552
725
|
```
|
553
726
|
|
554
|
-
###
|
555
|
-
```bash
|
556
|
-
# Enable debug logging
|
557
|
-
diagramers --debug init api my-project
|
727
|
+
### Template Updates
|
558
728
|
|
559
|
-
|
560
|
-
|
729
|
+
```bash
|
730
|
+
# Update project with latest template
|
731
|
+
diagramers update
|
561
732
|
|
562
|
-
#
|
563
|
-
diagramers --
|
733
|
+
# Force update with backup
|
734
|
+
diagramers update --force --backup
|
564
735
|
```
|
565
736
|
|
566
|
-
|
737
|
+
### Custom Field Types
|
567
738
|
|
568
|
-
|
569
|
-
```bash
|
570
|
-
# Clone repository
|
571
|
-
git clone https://github.com/diagramers/diagramers-cli.git
|
572
|
-
cd diagramers-cli
|
739
|
+
The CLI automatically detects field types based on naming conventions:
|
573
740
|
|
574
|
-
|
575
|
-
|
741
|
+
```bash
|
742
|
+
# These fields will be auto-typed:
|
743
|
+
diagramers extend --table products:products --fields \
|
744
|
+
name,description,price,stock_count,created_at,is_active,category_id
|
745
|
+
```
|
746
|
+
|
747
|
+
**Auto-detection:**
|
748
|
+
- `name`, `title`, `description` β String
|
749
|
+
- `price`, `count`, `stock_count` β Number
|
750
|
+
- `created_at`, `updated_at` β Date
|
751
|
+
- `is_active`, `verified` β Boolean
|
752
|
+
- `category_id`, `user_id` β ObjectId
|
753
|
+
|
754
|
+
## π Project Structure
|
755
|
+
|
756
|
+
Generated projects follow this structure:
|
757
|
+
|
758
|
+
```
|
759
|
+
my-project/
|
760
|
+
βββ src/
|
761
|
+
β βββ modules/
|
762
|
+
β β βββ products/
|
763
|
+
β β β βββ controllers/
|
764
|
+
β β β βββ entities/
|
765
|
+
β β β βββ schemas/
|
766
|
+
β β β βββ services/
|
767
|
+
β β β βββ routes/
|
768
|
+
β β βββ users/
|
769
|
+
β βββ core/
|
770
|
+
β β βββ database/
|
771
|
+
β β βββ config/
|
772
|
+
β β βββ server/
|
773
|
+
β βββ shared/
|
774
|
+
βββ scripts/
|
775
|
+
βββ package.json
|
776
|
+
```
|
576
777
|
|
577
|
-
|
578
|
-
npm link
|
778
|
+
## π Troubleshooting
|
579
779
|
|
580
|
-
|
581
|
-
npm test
|
780
|
+
### Common Issues
|
582
781
|
|
583
|
-
|
584
|
-
|
782
|
+
#### Module Not Found
|
783
|
+
```bash
|
784
|
+
β Module 'inventory' does not exist
|
785
|
+
```
|
786
|
+
**Solution:** Create the module first:
|
787
|
+
```bash
|
788
|
+
diagramers extend --module inventory
|
585
789
|
```
|
586
790
|
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
5. Ensure all tests pass
|
593
|
-
6. Submit a pull request
|
791
|
+
#### Table Already Exists
|
792
|
+
```bash
|
793
|
+
β Table 'products' already exists in module 'products'
|
794
|
+
```
|
795
|
+
**Solution:** Use a different table name or check existing tables
|
594
796
|
|
595
|
-
|
797
|
+
#### Invalid Relation
|
798
|
+
```bash
|
799
|
+
β Table 'categories' does not exist in module 'products'
|
800
|
+
```
|
801
|
+
**Solution:** Create both tables before creating relations:
|
596
802
|
```bash
|
597
|
-
|
598
|
-
|
803
|
+
diagramers extend --table products:categories --fields name,description
|
804
|
+
diagramers extend --table products:products --fields name,price
|
805
|
+
diagramers extend --relation products:category-product
|
806
|
+
```
|
599
807
|
|
600
|
-
|
601
|
-
npm run lint:fix
|
808
|
+
### Getting Help
|
602
809
|
|
603
|
-
|
604
|
-
|
810
|
+
```bash
|
811
|
+
# General help
|
812
|
+
diagramers --help
|
605
813
|
|
606
|
-
#
|
607
|
-
|
814
|
+
# Command-specific help
|
815
|
+
diagramers init --help
|
816
|
+
diagramers extend --help
|
817
|
+
diagramers update --help
|
608
818
|
```
|
609
819
|
|
820
|
+
## π€ Contributing
|
821
|
+
|
822
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
823
|
+
|
610
824
|
## π License
|
611
825
|
|
612
|
-
MIT License - see LICENSE file for details
|
826
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
613
827
|
|
614
828
|
## π Related Packages
|
615
829
|
|
616
|
-
- [@diagramers/api](
|
617
|
-
- [@diagramers/admin](
|
830
|
+
- [@diagramers/api](https://npmjs.com/package/@diagramers/api) - API template package
|
831
|
+
- [@diagramers/admin](https://npmjs.com/package/@diagramers/admin) - Admin template package
|
618
832
|
|
619
833
|
## π Support
|
620
834
|
|
621
|
-
|
622
|
-
-
|
623
|
-
-
|
624
|
-
- Review the examples in the codebase
|
625
|
-
- Join our community discussions
|
626
|
-
|
627
|
-
## πΊοΈ Roadmap
|
628
|
-
|
629
|
-
### Upcoming Features
|
630
|
-
- [ ] GraphQL support
|
631
|
-
- [ ] Microservices architecture
|
632
|
-
- [ ] Kubernetes deployment
|
633
|
-
- [ ] Advanced caching strategies
|
634
|
-
- [ ] Real-time analytics
|
635
|
-
- [ ] Advanced security features
|
636
|
-
- [ ] Multi-tenant support
|
637
|
-
- [ ] API versioning
|
638
|
-
- [ ] Advanced rate limiting
|
639
|
-
- [ ] Webhook system
|
640
|
-
|
641
|
-
### Plugin Ecosystem
|
642
|
-
- [ ] Plugin marketplace
|
643
|
-
- [ ] Community plugins
|
644
|
-
- [ ] Plugin development tools
|
645
|
-
- [ ] Plugin testing framework
|
646
|
-
- [ ] Plugin documentation generator
|
647
|
-
|
648
|
-
### Integration Features
|
649
|
-
- [ ] Third-party service integrations
|
650
|
-
- [ ] Payment gateway integrations
|
651
|
-
- [ ] Analytics integrations
|
652
|
-
- [ ] Monitoring integrations
|
653
|
-
- [ ] Backup service integrations
|
835
|
+
- **Issues**: [GitHub Issues](https://github.com/diagramers/diagramers-cli/issues)
|
836
|
+
- **Documentation**: [Official Docs](https://docs.diagramers.com)
|
837
|
+
- **Community**: [Discord Server](https://discord.gg/diagramers)
|