rapidkit 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 RapidKit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,508 @@
1
+ # rapidkit
2
+
3
+ [![npm version](https://img.shields.io/npm/v/rapidkit.svg?style=flat-square)](https://www.npmjs.com/package/rapidkit)
4
+ [![npm downloads](https://img.shields.io/npm/dm/rapidkit.svg?style=flat-square)](https://www.npmjs.com/package/rapidkit)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
6
+ [![GitHub Stars](https://img.shields.io/github/stars/getrapidkit/rapidkit-npm.svg?style=flat-square)](https://github.com/getrapidkit/rapidkit-npm/stargazers)
7
+
8
+ > ⚠️ **BETA VERSION** - This is a companion tool for RapidKit Python framework.
9
+ > The stable production version of RapidKit will be released soon on PyPI.
10
+ > Until then, use `--demo` mode to create demo workspaces with bundled templates, or `--test-mode` to try the full RapidKit installation locally.
11
+
12
+ 🚀 The easiest way to get started with RapidKit! This CLI tool creates development workspaces with two modes:
13
+
14
+ 1. **Demo Mode** (`--demo`) - Create a workspace with bundled FastAPI templates (no Python RapidKit required)
15
+ 2. **Full Mode** - Set up a Python environment with RapidKit installed (requires RapidKit on PyPI - coming soon!)
16
+
17
+ **💡 Tip:** Use the [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) for a visual interface to create workspaces and projects!
18
+
19
+ ## Quick Start
20
+
21
+ ### 🎨 Demo Mode (Available Now!)
22
+
23
+ Create a demo workspace and generate multiple FastAPI projects instantly:
24
+
25
+ ```bash
26
+ # Create demo workspace
27
+ npx rapidkit my-workspace --demo
28
+ cd my-workspace
29
+
30
+ # Generate your first project
31
+ node generate-demo.js api-project
32
+ cd api-project
33
+ poetry install
34
+ poetry run dev
35
+
36
+ # Go back and create more projects
37
+ cd ..
38
+ node generate-demo.js auth-service
39
+ node generate-demo.js data-service
40
+ ```
41
+
42
+ **Perfect for:**
43
+ - Quick prototyping and demos
44
+ - Learning FastAPI and RapidKit project structure
45
+ - Testing multiple microservices in one workspace
46
+ - No Python RapidKit dependency required
47
+ - **Try now while waiting for stable RapidKit release!**
48
+
49
+ ### 🚀 Full Mode (Coming Soon with Stable Release)
50
+
51
+ Once RapidKit is published on PyPI, install for full features and modules:
52
+
53
+ ```bash
54
+ npx rapidkit my-workspace
55
+ cd my-workspace
56
+ source $(poetry env info --path)/bin/activate
57
+ rapidkit create my-project
58
+ ```
59
+
60
+ **Note:** Full mode requires RapidKit Python package on PyPI.
61
+ For now, use `--test-mode` flag if you have local RapidKit installation, or use `--demo` for workspace with bundled templates.
62
+
63
+ ## Understanding Workspaces
64
+
65
+ **create-rapidkit** follows a workspace-based architecture:
66
+
67
+ - **Workspace** = Container directory with development environment
68
+ - **Projects** = Individual FastAPI/NestJS applications inside workspace
69
+
70
+ ### Demo Workspace Structure
71
+ ```
72
+ my-workspace/ # Workspace (container)
73
+ ├── generate-demo.js # Project generator script
74
+ ├── package.json # npm configuration
75
+ ├── README.md # Workspace instructions
76
+ ├── api-project/ # Project 1
77
+ │ ├── src/
78
+ │ ├── tests/
79
+ │ └── pyproject.toml
80
+ ├── auth-service/ # Project 2
81
+ │ ├── src/
82
+ │ ├── tests/
83
+ │ └── pyproject.toml
84
+ └── data-service/ # Project 3
85
+ ├── src/
86
+ ├── tests/
87
+ └── pyproject.toml
88
+ ```
89
+
90
+ ### Full Workspace Structure
91
+ ```
92
+ my-workspace/ # Workspace (container)
93
+ ├── .venv/ # Virtual environment
94
+ ├── pyproject.toml # Poetry config
95
+ ├── README.md # Workspace instructions
96
+ ├── api-project/ # Project 1
97
+ ├── auth-service/ # Project 2
98
+ └── data-service/ # Project 3
99
+ ```
100
+
101
+ **Benefits:**
102
+ - Multiple projects share same environment
103
+ - Easy microservices development
104
+ - Organized monorepo structure
105
+ - Isolated from system Python
106
+
107
+ ## Installation Methods
108
+
109
+ ### 🎯 Poetry (Recommended)
110
+ ```bash
111
+ npx rapidkit my-workspace
112
+ # Choose: Poetry
113
+ cd my-workspace
114
+ source $(poetry env info --path)/bin/activate
115
+ rapidkit create my-project
116
+ ```
117
+
118
+ ### 📦 Python venv + pip
119
+ ```bash
120
+ npx rapidkit my-workspace
121
+ # Select "venv + pip" when prompted
122
+ cd my-workspace
123
+ source .venv/bin/activate
124
+ rapidkit create my-project
125
+ ```
126
+
127
+ ### 🔧 pipx (Global)
128
+ ```bash
129
+ npx rapidkit my-workspace
130
+ # Select "pipx (global install)" when prompted
131
+ cd my-workspace
132
+ rapidkit create my-project
133
+ ```
134
+
135
+ ## What Gets Installed?
136
+
137
+ `rapidkit` creates a directory with:
138
+ - Python virtual environment (Poetry or venv)
139
+ - RapidKit package installed
140
+ - README with usage instructions
141
+ - Git repository (optional)
142
+
143
+ ## Using RapidKit Commands
144
+
145
+ Once your environment is activated, you can use all native RapidKit commands:
146
+
147
+ ```bash
148
+ # Create a new project (interactive)
149
+ rapidkit create
150
+
151
+ # Or create non-interactively:
152
+ rapidkit create project fastapi.standard my-api
153
+
154
+ # Add modules to existing project
155
+ cd my-api
156
+ rapidkit add settings
157
+ rapidkit add auth
158
+ rapidkit add database
159
+ rapidkit add caching
160
+
161
+ # List available kits and modules
162
+ rapidkit list
163
+ rapidkit modules
164
+
165
+ # Check system requirements
166
+ rapidkit doctor
167
+
168
+ # Upgrade RapidKit
169
+ rapidkit upgrade
170
+
171
+ # Get help
172
+ rapidkit --help
173
+ ```
174
+
175
+ ## Available Kits
176
+
177
+ RapidKit supports multiple project templates:
178
+ - `fastapi.standard` - FastAPI with basic features
179
+ - `fastapi.advanced` - FastAPI with advanced features
180
+ - `nestjs.standard` - NestJS with basic features
181
+ - `nestjs.advanced` - NestJS with advanced features
182
+
183
+ ## CLI Options
184
+
185
+ ```bash
186
+ npx rapidkit [workspace-name] [options]
187
+ ```
188
+
189
+ ### Arguments
190
+ - `workspace-name` - Name of workspace directory to create (default: `rapidkit-workspace`)
191
+
192
+ ### Options
193
+ - `--demo` - **[Available Now]** Create workspace with bundled FastAPI templates (no Python RapidKit required)
194
+ - `--demo-only` - **[Internal]** Generate a single project in current directory (used by demo workspace script)
195
+ - `--skip-git` - Skip git initialization
196
+ - `--test-mode` - **[Beta Testing]** Install from local RapidKit path (for development/testing only)
197
+ - `--debug` - Enable verbose debug logging
198
+ - `--dry-run` - Preview what would be created without creating it
199
+ - `--no-update-check` - Skip checking for newer versions
200
+ - `--help` - Display help information
201
+ - `--version` - Show version number
202
+
203
+ > **Note:** Full installation mode (without `--demo`) will be available once RapidKit is published on PyPI.
204
+
205
+ ## Examples
206
+
207
+ ### Demo Workspace
208
+ ```bash
209
+ # Create demo workspace
210
+ npx rapidkit my-workspace --demo
211
+ cd my-workspace
212
+
213
+ # Generate projects inside
214
+ node generate-demo.js api-service
215
+ node generate-demo.js auth-service
216
+ ```
217
+
218
+ ### Full RapidKit Workspace
219
+ ```bash
220
+ # Create workspace with RapidKit installed
221
+ npx rapidkit my-workspace
222
+ cd my-workspace
223
+
224
+ # Create projects using RapidKit CLI
225
+ rapidkit create api-service
226
+ rapidkit create auth-service
227
+ ```
228
+
229
+ ### Default workspace
230
+ ```bash
231
+ npx rapidkit --demo
232
+ # Creates ./rapidkit-workspace/ directory
233
+ ```
234
+
235
+ ### Skip git initialization
236
+ ```bash
237
+ npx rapidkit my-workspace --demo --skip-git
238
+ ```
239
+
240
+ ### Debug mode
241
+ ```bash
242
+ npx rapidkit my-workspace --debug
243
+ ```
244
+
245
+ ### Dry-run (preview without creating)
246
+ ```bash
247
+ npx rapidkit my-workspace --dry-run
248
+ npx rapidkit my-workspace --demo --dry-run
249
+ ```
250
+
251
+ ## Configuration
252
+
253
+ ### User Configuration File
254
+
255
+ Create `~/.rapidkitrc.json` in your home directory to set default values:
256
+
257
+ ```json
258
+ {
259
+ "defaultKit": "fastapi.standard",
260
+ "defaultInstallMethod": "poetry",
261
+ "pythonVersion": "3.11",
262
+ "author": "Your Name",
263
+ "license": "MIT",
264
+ "skipGit": false
265
+ }
266
+ ```
267
+
268
+ ### Environment Variables
269
+
270
+ For test mode with local RapidKit installation:
271
+
272
+ ```bash
273
+ export RAPIDKIT_DEV_PATH=/path/to/local/rapidkit
274
+ npx rapidkit my-workspace --test-mode
275
+ ```
276
+
277
+ **Priority:** CLI options > Environment variables > Config file > Defaults
278
+
279
+ ## Requirements
280
+
281
+ - **Node.js**: 18+ (for running npx)
282
+ - **Python**: 3.10+ (required by RapidKit)
283
+ - **Optional**: Poetry or pipx (depending on installation method)
284
+
285
+ ## Typical Workflow
286
+
287
+ ### Demo Mode
288
+ 1. **Create demo workspace**:
289
+ ```bash
290
+ npx rapidkit my-workspace --demo
291
+ cd my-workspace
292
+ ```
293
+
294
+ 2. **Generate your first project**:
295
+ ```bash
296
+ node generate-demo.js api-service
297
+ cd api-service
298
+ ```
299
+
300
+ 3. **Install dependencies and run**:
301
+ ```bash
302
+ poetry install
303
+ poetry run dev
304
+ ```
305
+
306
+ 4. **Create more projects** (go back to workspace):
307
+ ```bash
308
+ cd ..
309
+ node generate-demo.js auth-service
310
+ node generate-demo.js data-service
311
+ ```
312
+
313
+ ### Full Mode (After RapidKit PyPI Release)
314
+ 1. **Create RapidKit workspace**:
315
+ ```bash
316
+ npx rapidkit my-workspace
317
+ cd my-workspace
318
+ ```
319
+
320
+ 2. **Activate environment**:
321
+ ```bash
322
+ source $(poetry env info --path)/bin/activate
323
+ # Or: poetry shell
324
+ ```
325
+
326
+ 3. **Create your first project**:
327
+ ```bash
328
+ # Interactive mode (recommended)
329
+ rapidkit create
330
+
331
+ # Or specify directly:
332
+ rapidkit create project fastapi.standard api-service
333
+ ```
334
+
335
+ 4. **Navigate and run**:
336
+ ```bash
337
+ cd api-service
338
+ rapidkit run dev
339
+ ```
340
+
341
+ 5. **Create more projects** (from workspace root):
342
+ ```bash
343
+ cd ..
344
+ rapidkit create project fastapi.standard auth-service
345
+ rapidkit create project nestjs.standard data-service
346
+ ```
347
+
348
+ ## Troubleshooting
349
+
350
+ ### Python not found
351
+ ```bash
352
+ # Check Python version
353
+ python3 --version
354
+
355
+ # Install Python 3.10+
356
+ # Visit: https://www.python.org/downloads/
357
+ ```
358
+
359
+ ### Poetry not found
360
+ ```bash
361
+ # Install Poetry
362
+ curl -sSL https://install.python-poetry.org | python3 -
363
+
364
+ # Or visit: https://python-poetry.org/docs/#installation
365
+ ```
366
+
367
+ ### pipx not found
368
+ ```bash
369
+ # Install pipx
370
+ python3 -m pip install --user pipx
371
+ python3 -m pipx ensurepath
372
+
373
+ # Or visit: https://pypa.github.io/pipx/installation/
374
+ ```
375
+
376
+ ### Check RapidKit installation
377
+ ```bash
378
+ # Activate environment first
379
+ poetry shell # or: source .venv/bin/activate
380
+
381
+ # Verify RapidKit
382
+ rapidkit --version
383
+ rapidkit doctor
384
+ ```
385
+
386
+ ## What's Next?
387
+
388
+ After setting up your RapidKit environment:
389
+
390
+ ## What's Next?
391
+
392
+ After setting up your demo project:
393
+
394
+ 1. Explore the generated FastAPI structure
395
+ 2. Customize routes and add your business logic
396
+ 3. **Stay tuned for RapidKit stable release on PyPI**
397
+ 4. Upgrade to full RapidKit for modules and advanced features
398
+
399
+ ## Roadmap
400
+
401
+ ### ✅ Current (Beta)
402
+ - ✅ Demo workspace with bundled FastAPI templates
403
+ - ✅ Multiple projects per workspace
404
+ - ✅ Interactive project generation
405
+ - ✅ Full FastAPI project structure
406
+
407
+ ### 🚧 Coming Soon
408
+ - **RapidKit Python package on PyPI** (main blocker)
409
+ - Full installation mode with all kits
410
+ - Module ecosystem integration (`rapidkit add module`)
411
+ - NestJS standard kit demos
412
+ - Advanced kit templates
413
+ - Workspace sharing and templates
414
+
415
+ ### 🔮 Future
416
+ - More framework support
417
+ - Custom kit marketplace
418
+ - Cloud deployment integrations
419
+ - CI/CD templates
420
+
421
+ ## Related Projects
422
+
423
+ - **RapidKit Python** - The core framework (coming soon to PyPI)
424
+ - **RapidKit Marketplace** - Browse and share modules (https://rapidkit.dev)
425
+ - **GitHub**: https://github.com/getrapidkit
426
+
427
+ ## Contributing
428
+
429
+ Contributions welcome! This NPM package is a companion tool for RapidKit.
430
+
431
+ To contribute:
432
+ 1. Fork the repository
433
+ 2. Create a feature branch
434
+ 3. Submit a pull request
435
+
436
+ ### Development
437
+
438
+ ```bash
439
+ # Clone the repository
440
+ git clone https://github.com/getrapidkit/rapidkit-npm.git
441
+ cd rapidkit-npm
442
+
443
+ # Install dependencies
444
+ npm install
445
+
446
+ # Build the project (optimized with tsup)
447
+ npm run build
448
+
449
+ # Run in watch mode during development
450
+ npm run dev
451
+
452
+ # Run tests
453
+ npm test
454
+
455
+ # Type checking
456
+ npm run typecheck
457
+
458
+ # Linting
459
+ npm run lint
460
+
461
+ # Format code
462
+ npm run format
463
+
464
+ # Full validation (typecheck + lint + format + test)
465
+ npm run validate
466
+
467
+ # Check bundle size
468
+ npm run bundle-size
469
+ ```
470
+
471
+ **Bundle Optimization:**
472
+ - Built with [tsup](https://github.com/egoist/tsup) for optimal performance
473
+ - Minified and tree-shaked for smallest bundle size
474
+ - ~40KB total bundle size (80% reduction from unoptimized)
475
+ - No source maps in production
476
+
477
+ ## License
478
+
479
+ MIT
480
+
481
+ ## Support
482
+
483
+ - 🐛 Report issues: [GitHub Issues](https://github.com/getrapidkit/rapidkit-npm/issues)
484
+ - 📚 Docs: https://rapidkit.dev
485
+ - 💬 Community: Coming soon
486
+
487
+ ---
488
+
489
+ ### About This Beta
490
+
491
+ **rapidkit** (npm package) is currently in beta version 1.0.0-beta.9. The `--demo` mode is fully functional for creating workspaces with bundled FastAPI templates. You can generate multiple projects within the same workspace without needing Python RapidKit installed.
492
+
493
+ **New in beta.9:**
494
+ - ✅ E2E integration tests for reliability
495
+ - ✅ CI/CD pipeline with GitHub Actions
496
+ - ✅ Enhanced error messages with troubleshooting steps
497
+ - ✅ Security audit automation
498
+ - ✅ Bundle size monitoring
499
+ - ✅ Multi-platform testing (Ubuntu, macOS, Windows)
500
+
501
+ Install with:
502
+ ```bash
503
+ npx rapidkit my-workspace --demo
504
+ ```
505
+
506
+ **Full RapidKit integration** (with `rapidkit create` and `rapidkit add module` commands) will be available once the Python package is published on PyPI.
507
+
508
+ **Timeline**: RapidKit stable release expected soon. Follow [@getrapidkit](https://github.com/getrapidkit) for updates!
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node