rapidkit 0.14.2 → 0.16.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/README.md +1367 -55
- package/dist/index.d.ts +3 -0
- package/dist/index.js +940 -95
- package/dist/package.json +17 -6
- package/package.json +17 -6
- package/templates/generator.js +0 -175
- package/templates/kits/fastapi-standard/.rapidkit/__init__.py.j2 +0 -1
- package/templates/kits/fastapi-standard/.rapidkit/activate.j2 +0 -24
- package/templates/kits/fastapi-standard/.rapidkit/cli.py.j2 +0 -289
- package/templates/kits/fastapi-standard/.rapidkit/context.json +0 -3
- package/templates/kits/fastapi-standard/.rapidkit/project.json.j2 +0 -7
- package/templates/kits/fastapi-standard/.rapidkit/rapidkit.j2 +0 -107
- package/templates/kits/fastapi-standard/Makefile.j2 +0 -41
- package/templates/kits/fastapi-standard/README.md.j2 +0 -38
- package/templates/kits/fastapi-standard/kit.json +0 -70
- package/templates/kits/fastapi-standard/kit.yaml +0 -120
- package/templates/kits/fastapi-standard/pyproject.toml.j2 +0 -42
- package/templates/kits/fastapi-standard/rapidkit.cmd.j2 +0 -72
- package/templates/kits/fastapi-standard/rapidkit.j2 +0 -50
- package/templates/kits/fastapi-standard/src/__init__.py.j2 +0 -3
- package/templates/kits/fastapi-standard/src/cli.py.j2 +0 -335
- package/templates/kits/fastapi-standard/src/main.py.j2 +0 -44
- package/templates/kits/fastapi-standard/src/modules/__init__.py.j2 +0 -3
- package/templates/kits/fastapi-standard/src/routing/__init__.py.j2 +0 -13
- package/templates/kits/fastapi-standard/src/routing/health.py.j2 +0 -32
- package/templates/kits/fastapi-standard/tests/__init__.py.j2 +0 -1
- package/templates/kits/nestjs-standard/.env.example.j2 +0 -16
- package/templates/kits/nestjs-standard/.eslintrc.js.j2 +0 -25
- package/templates/kits/nestjs-standard/.gitignore.j2 +0 -26
- package/templates/kits/nestjs-standard/.node-version.j2 +0 -1
- package/templates/kits/nestjs-standard/.nvmrc.j2 +0 -1
- package/templates/kits/nestjs-standard/.prettierrc.j2 +0 -7
- package/templates/kits/nestjs-standard/.rapidkit/activate.j2 +0 -25
- package/templates/kits/nestjs-standard/.rapidkit/context.json +0 -3
- package/templates/kits/nestjs-standard/.rapidkit/project.json.j2 +0 -7
- package/templates/kits/nestjs-standard/.rapidkit/rapidkit.cmd.j2 +0 -166
- package/templates/kits/nestjs-standard/.rapidkit/rapidkit.j2 +0 -227
- package/templates/kits/nestjs-standard/README.md.j2 +0 -110
- package/templates/kits/nestjs-standard/jest.config.ts.j2 +0 -21
- package/templates/kits/nestjs-standard/nest-cli.json.j2 +0 -10
- package/templates/kits/nestjs-standard/package.json.j2 +0 -75
- package/templates/kits/nestjs-standard/rapidkit.cmd.j2 +0 -5
- package/templates/kits/nestjs-standard/rapidkit.j2 +0 -5
- package/templates/kits/nestjs-standard/src/app.controller.ts.j2 +0 -12
- package/templates/kits/nestjs-standard/src/app.module.ts.j2 +0 -23
- package/templates/kits/nestjs-standard/src/app.service.ts.j2 +0 -11
- package/templates/kits/nestjs-standard/src/config/configuration.ts.j2 +0 -9
- package/templates/kits/nestjs-standard/src/config/index.ts.j2 +0 -2
- package/templates/kits/nestjs-standard/src/config/validation.ts.j2 +0 -11
- package/templates/kits/nestjs-standard/src/examples/dto/create-note.dto.ts.j2 +0 -11
- package/templates/kits/nestjs-standard/src/examples/examples.controller.ts.j2 +0 -24
- package/templates/kits/nestjs-standard/src/examples/examples.module.ts.j2 +0 -10
- package/templates/kits/nestjs-standard/src/examples/examples.service.ts.j2 +0 -33
- package/templates/kits/nestjs-standard/src/main.ts.j2 +0 -51
- package/templates/kits/nestjs-standard/src/modules/index.ts.j2 +0 -3
- package/templates/kits/nestjs-standard/test/app.controller.spec.ts.j2 +0 -22
- package/templates/kits/nestjs-standard/test/app.e2e-spec.ts.j2 +0 -48
- package/templates/kits/nestjs-standard/test/examples.controller.spec.ts.j2 +0 -28
- package/templates/kits/nestjs-standard/test/jest-e2e.json.j2 +0 -15
- package/templates/kits/nestjs-standard/tsconfig.build.json.j2 +0 -12
- package/templates/kits/nestjs-standard/tsconfig.json.j2 +0 -26
package/README.md
CHANGED
|
@@ -1,73 +1,1331 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# 🚀 RapidKit CLI
|
|
4
|
+
|
|
5
|
+
**Build Modern Applications at Warp Speed**
|
|
6
|
+
|
|
7
|
+
An open-source framework that helps developers build, scale, and deploy production-ready APIs — faster. Clean architecture, modular design, and automation-first workflows for FastAPI & NestJS.
|
|
2
8
|
|
|
3
9
|
[](https://www.npmjs.com/package/rapidkit)
|
|
4
|
-
[](https://www.npmjs.com/package/rapidkit)
|
|
5
11
|
[](https://opensource.org/licenses/MIT)
|
|
6
12
|
[](https://github.com/getrapidkit/rapidkit-npm/stargazers)
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
[Quick Start](#-quick-start) • [Features](#-features) • [Docs](https://getrapidkit.com) • [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 🎯 What is RapidKit?
|
|
21
|
+
|
|
22
|
+
RapidKit is a professional project scaffolding CLI for FastAPI and NestJS that delivers production-ready applications in seconds. Built on a powerful Python core engine, it provides:
|
|
23
|
+
|
|
24
|
+
- 🏗️ **Instant Scaffolding** - Generate production-ready projects with best practices baked in
|
|
25
|
+
- 🧩 **27+ Free Modules** - Plug-and-play modules for auth, databases, caching, monitoring, and more
|
|
26
|
+
- 🎨 **Consistent Architecture** - Maintain the same structure across all your projects and teams
|
|
27
|
+
- 🔄 **Workspace Management** - Organize multiple microservices in one environment
|
|
28
|
+
- 🤖 **VS Code Integration** - Visual interface for creating projects and managing modules
|
|
29
|
+
|
|
30
|
+
**Perfect for:**
|
|
31
|
+
- Starting new microservices quickly
|
|
32
|
+
- Maintaining architectural consistency across teams
|
|
33
|
+
- Rapid prototyping with production-ready structure
|
|
34
|
+
- Learning best practices for FastAPI/NestJS development
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 📦 Table of Contents
|
|
39
|
+
|
|
40
|
+
- [What is RapidKit?](#-what-is-rapidkit)
|
|
41
|
+
- [Features](#-features)
|
|
42
|
+
- [Quick Start](#-quick-start)
|
|
43
|
+
- [Standalone Project](#standalone-project)
|
|
44
|
+
- [Workspace Mode](#workspace-mode-recommended)
|
|
45
|
+
- [Workspace vs Standalone](#-workspace-vs-standalone)
|
|
46
|
+
- [Available Commands](#-available-commands)
|
|
47
|
+
- [Project Commands](#project-commands)
|
|
48
|
+
- [Global Commands](#global-commands)
|
|
49
|
+
- [Workspace Commands](#workspace-commands)
|
|
50
|
+
- [Module System](#-module-system)
|
|
51
|
+
- [Architecture](#-architecture)
|
|
52
|
+
- [Workspace Management](#-workspace-management)
|
|
53
|
+
- [Project Structure](#-project-structure)
|
|
54
|
+
- [Requirements](#-requirements)
|
|
55
|
+
- [CLI Options](#-cli-options)
|
|
56
|
+
- [Troubleshooting](#-troubleshooting)
|
|
57
|
+
- [FAQs](#-faqs)
|
|
58
|
+
- [Development](#-development)
|
|
59
|
+
- [Contributing](#-contributing)
|
|
60
|
+
- [Related Projects](#-related-projects)
|
|
61
|
+
- [License](#-license)
|
|
62
|
+
- [Support](#-support)
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## ✨ Features
|
|
67
|
+
|
|
68
|
+
<table>
|
|
69
|
+
<tr>
|
|
70
|
+
<td width="50%">
|
|
71
|
+
|
|
72
|
+
### 🚀 **Instant Scaffolding**
|
|
73
|
+
- FastAPI DDD & Standard kits
|
|
74
|
+
- NestJS Standard kit
|
|
75
|
+
- Production-ready project structure
|
|
76
|
+
- Docker & CI/CD configuration included
|
|
77
|
+
- Best practices baked in
|
|
78
|
+
|
|
79
|
+
</td>
|
|
80
|
+
<td width="50%">
|
|
81
|
+
|
|
82
|
+
### 🧩 **Modular Architecture**
|
|
83
|
+
- 27+ free plug-and-play modules
|
|
84
|
+
- Authentication (JWT, OAuth, WebAuthn)
|
|
85
|
+
- Databases (PostgreSQL, MongoDB, Redis)
|
|
86
|
+
- Monitoring, logging, and tracing
|
|
87
|
+
- Caching and message queues
|
|
88
|
+
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<td width="50%">
|
|
93
|
+
|
|
94
|
+
### 🎯 **Workspace Management**
|
|
95
|
+
- Organize multiple projects
|
|
96
|
+
- Shared Python environment
|
|
97
|
+
- Auto-tracking in registry
|
|
98
|
+
- VS Code Extension integration
|
|
99
|
+
- Cross-tool compatibility
|
|
100
|
+
|
|
101
|
+
</td>
|
|
102
|
+
<td width="50%">
|
|
103
|
+
|
|
104
|
+
### 🔧 **Developer Experience**
|
|
105
|
+
- Interactive TUI wizard
|
|
106
|
+
- Hot reload development
|
|
107
|
+
- Built-in testing & linting
|
|
108
|
+
- Comprehensive CLI commands
|
|
109
|
+
- One-command project setup
|
|
110
|
+
|
|
111
|
+
</td>
|
|
112
|
+
</tr>
|
|
113
|
+
</table>
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 🚀 Quick Start
|
|
118
|
+
|
|
119
|
+
### Standalone Project
|
|
120
|
+
|
|
121
|
+
Perfect for single projects or trying out RapidKit:
|
|
122
|
+
|
|
123
|
+
**FastAPI:**
|
|
124
|
+
```bash
|
|
125
|
+
npx rapidkit create project fastapi.standard my-api
|
|
126
|
+
cd my-api
|
|
127
|
+
npx rapidkit init # Install dependencies
|
|
128
|
+
npx rapidkit dev # Start dev server at http://localhost:8000
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**NestJS:**
|
|
132
|
+
```bash
|
|
133
|
+
npx rapidkit create project nestjs.standard my-service
|
|
134
|
+
cd my-service
|
|
135
|
+
npx rapidkit init # Install dependencies
|
|
136
|
+
npx rapidkit dev # Start dev server at http://localhost:3000
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Workspace Mode (Recommended)
|
|
140
|
+
|
|
141
|
+
For teams, microservices, or multiple projects:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# 1. Create workspace
|
|
145
|
+
npx rapidkit my-workspace
|
|
146
|
+
cd my-workspace
|
|
147
|
+
|
|
148
|
+
# 2. Activate environment (choose one method):
|
|
149
|
+
|
|
150
|
+
# Method A: Activate virtualenv (once per terminal session)
|
|
151
|
+
source "$(poetry env info --path)/bin/activate"
|
|
152
|
+
|
|
153
|
+
# Method B: Use poetry run prefix (every command)
|
|
154
|
+
poetry run rapidkit create
|
|
155
|
+
|
|
156
|
+
# Method C: Create alias (recommended - add to ~/.bashrc or ~/.zshrc)
|
|
157
|
+
alias rapidkit="poetry run rapidkit"
|
|
158
|
+
|
|
159
|
+
# 3. Create projects interactively
|
|
160
|
+
rapidkit create # Interactive wizard
|
|
161
|
+
|
|
162
|
+
# Or create directly
|
|
163
|
+
rapidkit create project fastapi.standard api-gateway
|
|
164
|
+
rapidkit create project nestjs.standard user-service
|
|
165
|
+
rapidkit create project fastapi.ddd order-service
|
|
166
|
+
|
|
167
|
+
# 4. View all projects
|
|
168
|
+
rapidkit workspace list
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Why use workspace mode?**
|
|
172
|
+
- ✅ One shared Python environment for all projects
|
|
173
|
+
- ✅ All projects auto-tracked in `~/.rapidkit/workspaces.json`
|
|
174
|
+
- ✅ VS Code Extension auto-discovers your projects
|
|
175
|
+
- ✅ Consistent RapidKit Core version across projects
|
|
176
|
+
- ✅ Easier dependency management
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## 🆚 Workspace vs Standalone
|
|
181
|
+
|
|
182
|
+
Choose the right mode for your use case:
|
|
183
|
+
|
|
184
|
+
<table>
|
|
185
|
+
<thead>
|
|
186
|
+
<tr>
|
|
187
|
+
<th width="25%">Feature</th>
|
|
188
|
+
<th width="37.5%">Workspace Mode</th>
|
|
189
|
+
<th width="37.5%">Standalone</th>
|
|
190
|
+
</tr>
|
|
191
|
+
</thead>
|
|
192
|
+
<tbody>
|
|
193
|
+
<tr>
|
|
194
|
+
<td><strong>Best for</strong></td>
|
|
195
|
+
<td>✅ Teams, microservices, multiple projects</td>
|
|
196
|
+
<td>⚡ Single project, quick prototyping</td>
|
|
197
|
+
</tr>
|
|
198
|
+
<tr>
|
|
199
|
+
<td><strong>Python Environment</strong></td>
|
|
200
|
+
<td>✅ Shared across all projects (~150MB once)</td>
|
|
201
|
+
<td>⚠️ Separate per project (150MB each)</td>
|
|
202
|
+
</tr>
|
|
203
|
+
<tr>
|
|
204
|
+
<td><strong>Project Registry</strong></td>
|
|
205
|
+
<td>✅ Auto-tracked in <code>~/.rapidkit/workspaces.json</code></td>
|
|
206
|
+
<td>❌ Not tracked</td>
|
|
207
|
+
</tr>
|
|
208
|
+
<tr>
|
|
209
|
+
<td><strong>VS Code Extension</strong></td>
|
|
210
|
+
<td>✅ Auto-discovers all projects</td>
|
|
211
|
+
<td>⚠️ Manual discovery</td>
|
|
212
|
+
</tr>
|
|
213
|
+
<tr>
|
|
214
|
+
<td><strong>Setup Time</strong></td>
|
|
215
|
+
<td>⏱️ ~2 minutes (once)</td>
|
|
216
|
+
<td>⏱️ ~30 seconds</td>
|
|
217
|
+
</tr>
|
|
218
|
+
<tr>
|
|
219
|
+
<td><strong>Disk Usage</strong></td>
|
|
220
|
+
<td>✅ Efficient (one venv)</td>
|
|
221
|
+
<td>⚠️ Higher (multiple venvs)</td>
|
|
222
|
+
</tr>
|
|
223
|
+
<tr>
|
|
224
|
+
<td><strong>Dependency Management</strong></td>
|
|
225
|
+
<td>✅ Centralized Core version</td>
|
|
226
|
+
<td>⚠️ Independent per project</td>
|
|
227
|
+
</tr>
|
|
228
|
+
<tr>
|
|
229
|
+
<td><strong>Use Case</strong></td>
|
|
230
|
+
<td>Production teams, long-term projects</td>
|
|
231
|
+
<td>Quick demos, learning, single services</td>
|
|
232
|
+
</tr>
|
|
233
|
+
</tbody>
|
|
234
|
+
</table>
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## 🎯 Architecture
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
┌──────────────────────────────────────────────────────────────┐
|
|
242
|
+
│ RapidKit CLI (npm) │
|
|
243
|
+
│ • Command routing & delegation │
|
|
244
|
+
│ • Workspace management & registry │
|
|
245
|
+
│ • VS Code Extension integration │
|
|
246
|
+
│ • Python Core bridge & bootstrapping │
|
|
247
|
+
└────────────────────────┬─────────────────────────────────────┘
|
|
248
|
+
│
|
|
249
|
+
┌──────────┴──────────┐
|
|
250
|
+
│ │
|
|
251
|
+
▼ ▼
|
|
252
|
+
┌──────────────────────┐ ┌──────────────────────────┐
|
|
253
|
+
│ Project Local CLI │ │ RapidKit Core │
|
|
254
|
+
│ Launcher │ │ (Python Engine) │
|
|
255
|
+
├──────────────────────┤ ├──────────────────────────┤
|
|
256
|
+
│ • init │ │ • create │
|
|
257
|
+
│ • dev │ │ • add module │
|
|
258
|
+
│ • test │ │ • list kits/modules │
|
|
259
|
+
│ • build │ │ • info │
|
|
260
|
+
│ • lint │ │ • doctor │
|
|
261
|
+
│ • format │ │ • upgrade │
|
|
262
|
+
│ • start │ │ • TUI wizard │
|
|
263
|
+
└──────────────────────┘ └──────────────────────────┘
|
|
264
|
+
│ │
|
|
265
|
+
└──────────┬───────────────┘
|
|
266
|
+
▼
|
|
267
|
+
┌────────────────────┐
|
|
268
|
+
│ Generated Project │
|
|
269
|
+
│ (FastAPI/NestJS) │
|
|
270
|
+
└────────────────────┘
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**How it works:**
|
|
274
|
+
|
|
275
|
+
1. **Inside a project:** Commands like `init`, `dev`, `test` are delegated to the project-local launcher
|
|
276
|
+
2. **Outside a project:** Commands like `create`, `list`, `add` are forwarded to RapidKit Core (Python)
|
|
277
|
+
3. **Workspace mode:** Python Core is installed in workspace venv via Poetry/pipx
|
|
278
|
+
4. **Standalone mode:** Each project manages its own environment
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## 💻 Available Commands
|
|
283
|
+
|
|
284
|
+
### Project Commands
|
|
285
|
+
|
|
286
|
+
Run these inside a RapidKit project:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
npx rapidkit init # Install dependencies (auto-activates environment)
|
|
290
|
+
npx rapidkit dev # Start dev server with hot reload
|
|
291
|
+
npx rapidkit start # Start production server
|
|
292
|
+
npx rapidkit build # Build for production
|
|
293
|
+
npx rapidkit test # Run tests with coverage
|
|
294
|
+
npx rapidkit lint # Run linting checks
|
|
295
|
+
npx rapidkit format # Format code automatically
|
|
296
|
+
npx rapidkit --help # Show all commands
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Global Commands
|
|
300
|
+
|
|
301
|
+
Run these anywhere:
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
# Project creation
|
|
305
|
+
npx rapidkit create # Interactive wizard
|
|
306
|
+
npx rapidkit create project <kit> <name> # Direct creation
|
|
307
|
+
|
|
308
|
+
# Information
|
|
309
|
+
npx rapidkit list # List available kits
|
|
310
|
+
npx rapidkit list modules # List available modules
|
|
311
|
+
npx rapidkit info kit <name> # Kit details
|
|
312
|
+
npx rapidkit info module <name> # Module details
|
|
313
|
+
|
|
314
|
+
# System
|
|
315
|
+
npx rapidkit doctor # Diagnose environment
|
|
316
|
+
npx rapidkit --version # Show version
|
|
317
|
+
npx rapidkit --tui # Launch interactive TUI
|
|
318
|
+
|
|
319
|
+
# Workspace management
|
|
320
|
+
npx rapidkit workspace list # List workspaces
|
|
321
|
+
npx rapidkit workspace sync # Sync projects
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Workspace Commands
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
# List all registered workspaces
|
|
328
|
+
rapidkit workspace list
|
|
329
|
+
|
|
330
|
+
# Sync current workspace (scan for new projects)
|
|
331
|
+
rapidkit workspace sync
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## 🧩 Module System
|
|
339
|
+
|
|
340
|
+
RapidKit's modular architecture lets you extend your project with pre-built modules.
|
|
341
|
+
|
|
342
|
+
### Adding Modules
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
# Add single module
|
|
346
|
+
rapidkit add module <module-slug>
|
|
347
|
+
|
|
348
|
+
# Examples
|
|
349
|
+
rapidkit add module auth # Authentication
|
|
350
|
+
rapidkit add module db_postgres # PostgreSQL
|
|
351
|
+
rapidkit add module redis # Redis caching
|
|
352
|
+
rapidkit add module monitoring # Monitoring & metrics
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### List Available Modules
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
rapidkit list modules # Human-readable list
|
|
359
|
+
rapidkit list modules --json # JSON format
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Module Information
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
rapidkit info module auth # View module details
|
|
366
|
+
rapidkit info module db_postgres # Dependencies, config, etc.
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Available Modules (27 Total)
|
|
370
|
+
|
|
371
|
+
#### 🔐 Authentication & Authorization (5)
|
|
372
|
+
|
|
373
|
+
| Module | Slug | Description |
|
|
374
|
+
|--------|------|-------------|
|
|
375
|
+
| **Authentication Core** | `auth` | Opinionated password hashing, token signing, and runtime auth |
|
|
376
|
+
| **API Keys** | `api_keys` | API key issuance, verification, and auditing |
|
|
377
|
+
| **OAuth Providers** | `oauth` | Lightweight OAuth 2.0 scaffolding with provider registry |
|
|
378
|
+
| **Passwordless Authentication** | `passwordless` | Magic link and one-time code authentication helpers |
|
|
379
|
+
| **Session Management** | `session` | Opinionated session management with signed cookies |
|
|
380
|
+
|
|
381
|
+
#### 💳 Billing & E-commerce (3)
|
|
382
|
+
|
|
383
|
+
| Module | Slug | Description |
|
|
384
|
+
|--------|------|-------------|
|
|
385
|
+
| **Cart** | `cart` | Shopping cart service for checkout flows |
|
|
386
|
+
| **Inventory** | `inventory` | Inventory and pricing service backing Cart + Stripe |
|
|
387
|
+
| **Stripe Payment** | `stripe` | Stripe payments and subscriptions |
|
|
388
|
+
|
|
389
|
+
#### 🗄️ Database (3)
|
|
390
|
+
|
|
391
|
+
| Module | Slug | Description |
|
|
392
|
+
|--------|------|-------------|
|
|
393
|
+
| **PostgreSQL** | `db_postgres` | SQLAlchemy async+sync Postgres with clean DI, healthcheck |
|
|
394
|
+
| **MongoDB** | `db_mongo` | MongoDB integration with async driver support, health diagnostics |
|
|
395
|
+
| **SQLite** | `db_sqlite` | SQLite database integration for development |
|
|
396
|
+
|
|
397
|
+
#### 🔒 Security (3)
|
|
398
|
+
|
|
399
|
+
| Module | Slug | Description |
|
|
400
|
+
|--------|------|-------------|
|
|
401
|
+
| **CORS** | `cors` | Cross-Origin Resource Sharing security module |
|
|
402
|
+
| **Rate Limiting** | `rate_limiting` | Production request throttling with configurable rules |
|
|
403
|
+
| **Security Headers** | `security_headers` | Harden HTTP responses with industry-standard security headers |
|
|
404
|
+
|
|
405
|
+
#### 📧 Communication (2)
|
|
406
|
+
|
|
407
|
+
| Module | Slug | Description |
|
|
408
|
+
|--------|------|-------------|
|
|
409
|
+
| **Email** | `email` | Email sending capabilities |
|
|
410
|
+
| **Unified Notifications** | `notifications` | Email-first notification runtime with SMTP delivery |
|
|
411
|
+
|
|
412
|
+
#### 👥 User Management (2)
|
|
413
|
+
|
|
414
|
+
| Module | Slug | Description |
|
|
415
|
+
|--------|------|-------------|
|
|
416
|
+
| **Users Core** | `users` | Opinionated user management backbone with immutable user records |
|
|
417
|
+
| **Users Profiles** | `users_profiles` | Extends Users Core with rich profile modeling |
|
|
418
|
+
|
|
419
|
+
#### ⚙️ Essentials (4)
|
|
420
|
+
|
|
421
|
+
| Module | Slug | Description |
|
|
422
|
+
|--------|------|-------------|
|
|
423
|
+
| **Application Settings** | `settings` | Centralized modular configuration management using Pydantic |
|
|
424
|
+
| **Middleware** | `middleware` | HTTP middleware pipeline with FastAPI and NestJS support |
|
|
425
|
+
| **Structured Logging** | `logging` | Structured logging runtime with correlation IDs, multi-sink output |
|
|
426
|
+
| **Deployment Toolkit** | `deployment` | Portable Docker, Compose, Makefile, and CI assets for RapidKit |
|
|
427
|
+
|
|
428
|
+
#### 📊 Observability (1)
|
|
429
|
+
|
|
430
|
+
| Module | Slug | Description |
|
|
431
|
+
|--------|------|-------------|
|
|
432
|
+
| **Observability Core** | `observability` | Cohesive metrics, tracing, and structured logging foundation |
|
|
433
|
+
|
|
434
|
+
#### 💾 Caching (1)
|
|
435
|
+
|
|
436
|
+
| Module | Slug | Description |
|
|
437
|
+
|--------|------|-------------|
|
|
438
|
+
| **Redis Cache** | `redis` | Production Redis runtime with async and sync client support |
|
|
439
|
+
|
|
440
|
+
#### 🤖 AI (1)
|
|
441
|
+
|
|
442
|
+
| Module | Slug | Description |
|
|
443
|
+
|--------|------|-------------|
|
|
444
|
+
| **AI Assistant** | `ai_assistant` | AI assistant integration capabilities |
|
|
445
|
+
|
|
446
|
+
#### ⚡ Tasks (1)
|
|
447
|
+
|
|
448
|
+
| Module | Slug | Description |
|
|
449
|
+
|--------|------|-------------|
|
|
450
|
+
| **Celery** | `celery` | Production Celery task orchestration for asynchronous workflows |
|
|
451
|
+
|
|
452
|
+
#### 💼 Business (1)
|
|
453
|
+
|
|
454
|
+
| Module | Slug | Description |
|
|
455
|
+
|--------|------|-------------|
|
|
456
|
+
| **Storage** | `storage` | File Storage & Media Management - Upload, store, and retrieve files |
|
|
457
|
+
|
|
458
|
+
> **💡 Tip:** Use `rapidkit modules list` to see all modules with versions and status, or install the [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) to browse and install modules visually!
|
|
459
|
+
|
|
460
|
+
---
|
|
10
461
|
|
|
11
|
-
|
|
462
|
+
## 🗂️ Workspace Management
|
|
12
463
|
|
|
13
|
-
|
|
464
|
+
RapidKit maintains a shared workspace registry at `~/.rapidkit/workspaces.json` for cross-tool compatibility with the VS Code Extension.
|
|
465
|
+
|
|
466
|
+
### List Registered Workspaces
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
rapidkit workspace list
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**Example output:**
|
|
473
|
+
```
|
|
474
|
+
📦 Registered RapidKit Workspaces:
|
|
475
|
+
|
|
476
|
+
my-workspace
|
|
477
|
+
Path: /home/user/projects/my-workspace
|
|
478
|
+
Projects: 3
|
|
479
|
+
|
|
480
|
+
microservices
|
|
481
|
+
Path: /home/user/work/microservices
|
|
482
|
+
Projects: 7
|
|
483
|
+
|
|
484
|
+
Total: 2 workspace(s)
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### Sync Workspace Projects
|
|
488
|
+
|
|
489
|
+
Projects are automatically tracked when created. Manual sync is available if needed:
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
cd my-workspace
|
|
493
|
+
rapidkit workspace sync
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
This scans the workspace directory and registers all RapidKit projects (directories with `.rapidkit/context.json` or `.rapidkit/project.json`).
|
|
497
|
+
|
|
498
|
+
**When to use manual sync:**
|
|
499
|
+
- Manually moved/copied projects into workspace
|
|
500
|
+
- Created projects before sync feature existed
|
|
501
|
+
- Registry got out of sync
|
|
502
|
+
- Want to refresh after external changes
|
|
503
|
+
|
|
504
|
+
### Registry Format
|
|
505
|
+
|
|
506
|
+
The registry stores workspace and project metadata:
|
|
507
|
+
|
|
508
|
+
```json
|
|
509
|
+
{
|
|
510
|
+
"workspaces": [
|
|
511
|
+
{
|
|
512
|
+
"name": "my-workspace",
|
|
513
|
+
"path": "/home/user/projects/my-workspace",
|
|
514
|
+
"mode": "full",
|
|
515
|
+
"projects": [
|
|
516
|
+
{
|
|
517
|
+
"name": "api-gateway",
|
|
518
|
+
"path": "/home/user/projects/my-workspace/api-gateway"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"name": "user-service",
|
|
522
|
+
"path": "/home/user/projects/my-workspace/user-service"
|
|
523
|
+
}
|
|
524
|
+
]
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
**Auto-registration:**
|
|
531
|
+
- Workspaces registered when created via `npx rapidkit <name>` or VS Code Extension
|
|
532
|
+
- Projects registered when created via `rapidkit create project ...` inside workspace
|
|
533
|
+
- VS Code Extension and npm CLI share the same registry
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
## 📁 Project Structure
|
|
538
|
+
|
|
539
|
+
### FastAPI Project
|
|
540
|
+
|
|
541
|
+
```
|
|
542
|
+
my-api/
|
|
543
|
+
├── .rapidkit/
|
|
544
|
+
│ ├── activate # Environment activation script
|
|
545
|
+
│ ├── cli.py # Python CLI module
|
|
546
|
+
│ ├── rapidkit # Bash wrapper
|
|
547
|
+
│ └── context.json # Project metadata
|
|
548
|
+
├── rapidkit # Main CLI entry point
|
|
549
|
+
├── src/
|
|
550
|
+
│ ├── main.py # FastAPI application
|
|
551
|
+
│ ├── cli.py # CLI commands
|
|
552
|
+
│ ├── routing/ # API routes
|
|
553
|
+
│ │ ├── __init__.py
|
|
554
|
+
│ │ ├── health.py
|
|
555
|
+
│ │ └── examples.py
|
|
556
|
+
│ └── modules/ # Module system
|
|
557
|
+
│ └── __init__.py
|
|
558
|
+
├── tests/ # Test suite
|
|
559
|
+
│ ├── __init__.py
|
|
560
|
+
│ ├── test_health.py
|
|
561
|
+
│ └── test_examples.py
|
|
562
|
+
├── pyproject.toml # Poetry configuration
|
|
563
|
+
├── Makefile # Make commands
|
|
564
|
+
├── Dockerfile # Docker configuration
|
|
565
|
+
├── docker-compose.yml # Docker Compose
|
|
566
|
+
├── .env.example # Environment template
|
|
567
|
+
├── .gitignore
|
|
568
|
+
└── README.md
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### NestJS Project
|
|
572
|
+
|
|
573
|
+
```
|
|
574
|
+
my-service/
|
|
575
|
+
├── .rapidkit/
|
|
576
|
+
│ ├── activate # Environment activation script
|
|
577
|
+
│ ├── rapidkit # Bash CLI wrapper
|
|
578
|
+
│ └── context.json # Project metadata
|
|
579
|
+
├── rapidkit # Main CLI entry point
|
|
580
|
+
├── src/
|
|
581
|
+
│ ├── main.ts # Application entry point
|
|
582
|
+
│ ├── app.module.ts # Root module
|
|
583
|
+
│ ├── app.controller.ts # Root controller
|
|
584
|
+
│ ├── app.service.ts # Root service
|
|
585
|
+
│ ├── config/ # Configuration
|
|
586
|
+
│ │ ├── configuration.ts
|
|
587
|
+
│ │ └── validation.ts
|
|
588
|
+
│ └── examples/ # Example module
|
|
589
|
+
│ ├── examples.module.ts
|
|
590
|
+
│ ├── examples.controller.ts
|
|
591
|
+
│ └── examples.service.ts
|
|
592
|
+
├── test/ # Test files
|
|
593
|
+
│ ├── app.e2e-spec.ts
|
|
594
|
+
│ └── jest-e2e.json
|
|
595
|
+
├── package.json # Dependencies
|
|
596
|
+
├── tsconfig.json # TypeScript config
|
|
597
|
+
├── nest-cli.json # NestJS CLI config
|
|
598
|
+
├── Dockerfile # Docker configuration
|
|
599
|
+
├── docker-compose.yml # Docker Compose
|
|
600
|
+
├── .env.example # Environment template
|
|
601
|
+
└── README.md
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
## 📋 Requirements
|
|
607
|
+
|
|
608
|
+
### System Requirements
|
|
609
|
+
|
|
610
|
+
- **Node.js**: 20.19.6+ LTS (20.x or 22.x recommended)
|
|
611
|
+
- **Python**: 3.10+ (required for RapidKit Core)
|
|
612
|
+
- **Git**: For version control
|
|
613
|
+
|
|
614
|
+
### Framework-Specific Requirements
|
|
615
|
+
|
|
616
|
+
**FastAPI Projects:**
|
|
617
|
+
- Python 3.10+
|
|
618
|
+
- Poetry (auto-installed if missing)
|
|
619
|
+
|
|
620
|
+
**NestJS Projects:**
|
|
621
|
+
- Node.js 20.19.6+
|
|
622
|
+
- Package manager (npm/yarn/pnpm)
|
|
623
|
+
|
|
624
|
+
### Optional Tools
|
|
625
|
+
|
|
626
|
+
- **Docker**: For containerized development
|
|
627
|
+
- **VS Code**: For Extension integration
|
|
628
|
+
- **Make**: For Makefile commands (usually pre-installed on Unix)
|
|
629
|
+
|
|
630
|
+
> 💡 **Tip:** Use [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) which includes a system checker to verify all requirements!
|
|
631
|
+
|
|
632
|
+
---
|
|
633
|
+
|
|
634
|
+
## ⚙️ CLI Options
|
|
635
|
+
|
|
636
|
+
```bash
|
|
637
|
+
npx rapidkit [workspace-name] [options]
|
|
638
|
+
npx rapidkit workspace <action>
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### Arguments
|
|
642
|
+
|
|
643
|
+
- `workspace-name` - Name of workspace directory to create
|
|
644
|
+
- `action` - For workspace commands: `list` or `sync`
|
|
645
|
+
|
|
646
|
+
### Workspace Creation Options
|
|
647
|
+
|
|
648
|
+
- `-y, --yes` - Skip prompts and use defaults
|
|
649
|
+
- `--skip-git` - Skip git initialization
|
|
650
|
+
- `--debug` - Enable verbose debug logging
|
|
651
|
+
- `--dry-run` - Preview what would be created without creating it
|
|
652
|
+
- `--no-update-check` - Skip checking for newer versions
|
|
653
|
+
- `--help` - Display help information
|
|
654
|
+
- `--version` - Show version number
|
|
655
|
+
|
|
656
|
+
### Project Creation Flags
|
|
657
|
+
|
|
658
|
+
- `--output <dir>` - Specify output directory (default: current)
|
|
659
|
+
- `--create-workspace` - Auto-create workspace if outside one
|
|
660
|
+
- `--no-workspace` - Don't create workspace if outside one
|
|
661
|
+
|
|
662
|
+
### Examples
|
|
663
|
+
|
|
664
|
+
```bash
|
|
665
|
+
# Create workspace with defaults
|
|
666
|
+
npx rapidkit my-workspace --yes --skip-git
|
|
667
|
+
|
|
668
|
+
# Create project in specific location
|
|
669
|
+
npx rapidkit create project fastapi.standard api --output ./services
|
|
670
|
+
|
|
671
|
+
# Preview workspace creation
|
|
672
|
+
npx rapidkit test-workspace --dry-run
|
|
673
|
+
|
|
674
|
+
# Skip update check
|
|
675
|
+
npx rapidkit create --no-update-check
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
---
|
|
679
|
+
|
|
680
|
+
## 🔧 Troubleshooting
|
|
681
|
+
|
|
682
|
+
### Common Issues
|
|
683
|
+
|
|
684
|
+
<details>
|
|
685
|
+
<summary><strong>❌ BRIDGE_VENV_BOOTSTRAP_FAILED</strong></summary>
|
|
686
|
+
|
|
687
|
+
**Problem:** Python core can't run in workspace.
|
|
688
|
+
|
|
689
|
+
**Cause:** Poetry virtualenv not activated or workspace environment issue.
|
|
690
|
+
|
|
691
|
+
**Solutions:**
|
|
692
|
+
|
|
693
|
+
```bash
|
|
694
|
+
# Solution 1: Use poetry run prefix
|
|
695
|
+
poetry run rapidkit create
|
|
696
|
+
|
|
697
|
+
# Solution 2: Activate environment
|
|
698
|
+
source "$(poetry env info --path)/bin/activate"
|
|
699
|
+
rapidkit create
|
|
700
|
+
|
|
701
|
+
# Solution 3: Use non-interactive mode (always works without workspace)
|
|
702
|
+
rapidkit create project fastapi.standard my-api
|
|
703
|
+
|
|
704
|
+
# Solution 4: Recreate workspace
|
|
705
|
+
cd ..
|
|
706
|
+
rm -rf old-workspace
|
|
707
|
+
npx rapidkit new-workspace
|
|
708
|
+
```
|
|
709
|
+
</details>
|
|
710
|
+
|
|
711
|
+
<details>
|
|
712
|
+
<summary><strong>🔍 Workspace not detected</strong></summary>
|
|
713
|
+
|
|
714
|
+
**Problem:** CLI doesn't recognize you're in a workspace.
|
|
715
|
+
|
|
716
|
+
**Check:**
|
|
717
|
+
```bash
|
|
718
|
+
# Verify workspace marker exists
|
|
719
|
+
ls -la .rapidkit-workspace
|
|
720
|
+
|
|
721
|
+
# Check workspace is registered
|
|
722
|
+
rapidkit workspace list
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
**Solution:**
|
|
726
|
+
```bash
|
|
727
|
+
# Manual sync
|
|
728
|
+
rapidkit workspace sync
|
|
729
|
+
```
|
|
730
|
+
</details>
|
|
731
|
+
|
|
732
|
+
<details>
|
|
733
|
+
<summary><strong>📋 Project not auto-registered</strong></summary>
|
|
734
|
+
|
|
735
|
+
**Problem:** New project not showing in `workspace list`.
|
|
736
|
+
|
|
737
|
+
**Solution:**
|
|
738
|
+
```bash
|
|
739
|
+
cd my-workspace
|
|
740
|
+
rapidkit workspace sync
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
Projects created with `rapidkit create project` should auto-register. If not, sync manually.
|
|
744
|
+
</details>
|
|
745
|
+
|
|
746
|
+
<details>
|
|
747
|
+
<summary><strong>🐍 Python version mismatch</strong></summary>
|
|
748
|
+
|
|
749
|
+
**Problem:** Python 3.10+ required but not found.
|
|
750
|
+
|
|
751
|
+
**Solution:**
|
|
752
|
+
|
|
753
|
+
```bash
|
|
754
|
+
# Ubuntu/Debian
|
|
755
|
+
sudo apt install python3.10 python3.10-venv
|
|
756
|
+
|
|
757
|
+
# macOS (Homebrew)
|
|
758
|
+
brew install python@3.10
|
|
759
|
+
|
|
760
|
+
# Verify installation
|
|
761
|
+
python3.10 --version
|
|
762
|
+
```
|
|
763
|
+
</details>
|
|
764
|
+
|
|
765
|
+
<details>
|
|
766
|
+
<summary><strong>📦 Poetry not found</strong></summary>
|
|
767
|
+
|
|
768
|
+
**Problem:** Poetry installation missing or not in PATH.
|
|
769
|
+
|
|
770
|
+
**Solution:**
|
|
771
|
+
|
|
772
|
+
```bash
|
|
773
|
+
# Install Poetry
|
|
774
|
+
curl -sSL https://install.python-poetry.org | python3 -
|
|
775
|
+
|
|
776
|
+
# Add to PATH (add to ~/.bashrc or ~/.zshrc)
|
|
777
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
778
|
+
|
|
779
|
+
# Verify
|
|
780
|
+
poetry --version
|
|
781
|
+
```
|
|
782
|
+
</details>
|
|
783
|
+
|
|
784
|
+
<details>
|
|
785
|
+
<summary><strong>🔄 Workspace environment corrupt</strong></summary>
|
|
786
|
+
|
|
787
|
+
**Problem:** Workspace `.venv` or Poetry environment is broken.
|
|
788
|
+
|
|
789
|
+
**Solution:**
|
|
790
|
+
|
|
791
|
+
```bash
|
|
792
|
+
# For Poetry workspace
|
|
793
|
+
cd my-workspace
|
|
794
|
+
poetry env remove python
|
|
795
|
+
poetry install
|
|
796
|
+
|
|
797
|
+
# For venv workspace
|
|
798
|
+
rm -rf .venv
|
|
799
|
+
python3 -m venv .venv
|
|
800
|
+
source .venv/bin/activate
|
|
801
|
+
pip install rapidkit-core
|
|
802
|
+
```
|
|
803
|
+
</details>
|
|
804
|
+
|
|
805
|
+
### Getting Help
|
|
806
|
+
|
|
807
|
+
If you encounter issues not covered here:
|
|
808
|
+
|
|
809
|
+
1. **Check the documentation:** https://getrapidkit.com
|
|
810
|
+
2. **Search existing issues:** https://github.com/getrapidkit/rapidkit-npm/issues
|
|
811
|
+
3. **Run diagnostics:** `rapidkit doctor`
|
|
812
|
+
4. **Open a new issue:** Include `rapidkit --version`, OS, Node.js version, and error output
|
|
813
|
+
|
|
814
|
+
---
|
|
815
|
+
|
|
816
|
+
## ❓ FAQs
|
|
817
|
+
|
|
818
|
+
<details>
|
|
819
|
+
<summary><strong>Do I need Python installed?</strong></summary>
|
|
820
|
+
|
|
821
|
+
Yes, Python 3.10+ is required for RapidKit Core (the engine). The npm package will bootstrap it into a workspace venv if needed, but having Python system-wide is recommended.
|
|
822
|
+
</details>
|
|
823
|
+
|
|
824
|
+
<details>
|
|
825
|
+
<summary><strong>Can I use this without npm?</strong></summary>
|
|
826
|
+
|
|
827
|
+
Yes! Install globally: `npm i -g rapidkit`, then use `rapidkit` directly without `npx`. Note: You'll still need Node.js installed.
|
|
828
|
+
</details>
|
|
829
|
+
|
|
830
|
+
<details>
|
|
831
|
+
<summary><strong>What's the difference from cookiecutter?</strong></summary>
|
|
832
|
+
|
|
833
|
+
RapidKit provides:
|
|
834
|
+
- **Living templates** that receive updates
|
|
835
|
+
- **Module system** (27+ free plug-and-play modules)
|
|
836
|
+
- **Workspace management** for organizing multiple projects
|
|
837
|
+
- **VS Code integration** with visual interface
|
|
838
|
+
- **Interactive TUI** wizard
|
|
839
|
+
- **Built-in CLI** commands (dev, test, lint, etc.)
|
|
840
|
+
|
|
841
|
+
Cookiecutter is great for one-time scaffolding, but RapidKit is a complete development platform.
|
|
842
|
+
</details>
|
|
843
|
+
|
|
844
|
+
<details>
|
|
845
|
+
<summary><strong>Do I need the VS Code Extension?</strong></summary>
|
|
846
|
+
|
|
847
|
+
No, but it's highly recommended! The Extension provides:
|
|
848
|
+
- Visual interface for creating projects
|
|
849
|
+
- One-click module installation
|
|
850
|
+
- Workspace browser
|
|
851
|
+
- System requirements checker
|
|
852
|
+
- Integrated terminal commands
|
|
853
|
+
|
|
854
|
+
CLI is fully functional standalone.
|
|
855
|
+
</details>
|
|
856
|
+
|
|
857
|
+
<details>
|
|
858
|
+
<summary><strong>Can I use venv instead of Poetry?</strong></summary>
|
|
859
|
+
|
|
860
|
+
Yes! During workspace creation, you can choose:
|
|
861
|
+
- **Poetry** (recommended - better dependency management)
|
|
862
|
+
- **venv** (standard Python virtualenv)
|
|
863
|
+
- **pipx** (global user install)
|
|
864
|
+
|
|
865
|
+
All options work, but Poetry provides the best experience.
|
|
866
|
+
</details>
|
|
867
|
+
|
|
868
|
+
<details>
|
|
869
|
+
<summary><strong>How do I upgrade RapidKit?</strong></summary>
|
|
870
|
+
|
|
871
|
+
```bash
|
|
872
|
+
# For global install
|
|
873
|
+
npm update -g rapidkit
|
|
874
|
+
|
|
875
|
+
# For npx usage (automatic)
|
|
876
|
+
npx rapidkit@latest create
|
|
877
|
+
|
|
878
|
+
# For workspace Python Core
|
|
879
|
+
cd my-workspace
|
|
880
|
+
poetry update rapidkit-core
|
|
881
|
+
# OR
|
|
882
|
+
pip install --upgrade rapidkit-core
|
|
883
|
+
```
|
|
884
|
+
</details>
|
|
885
|
+
|
|
886
|
+
<details>
|
|
887
|
+
<summary><strong>Can I customize generated projects?</strong></summary>
|
|
888
|
+
|
|
889
|
+
Yes! After generation:
|
|
890
|
+
1. Modify files as needed - they're yours
|
|
891
|
+
2. Add/remove modules: `rapidkit add module <name>`
|
|
892
|
+
3. Update dependencies in `pyproject.toml` or `package.json`
|
|
893
|
+
4. RapidKit won't overwrite your changes
|
|
894
|
+
|
|
895
|
+
For template-level changes, consider:
|
|
896
|
+
- Creating custom kits (see Core docs)
|
|
897
|
+
- Using RapidKit as a starting point
|
|
898
|
+
</details>
|
|
899
|
+
|
|
900
|
+
<details>
|
|
901
|
+
<summary><strong>Is there a Docker workflow?</strong></summary>
|
|
902
|
+
|
|
903
|
+
Yes! All projects include:
|
|
904
|
+
- `Dockerfile` for production builds
|
|
905
|
+
- `docker-compose.yml` for development
|
|
906
|
+
- `.dockerignore` for optimization
|
|
907
|
+
|
|
908
|
+
```bash
|
|
909
|
+
# Development
|
|
910
|
+
docker-compose up
|
|
911
|
+
|
|
912
|
+
# Production
|
|
913
|
+
docker build -t my-service .
|
|
914
|
+
docker run -p 8000:8000 my-service
|
|
915
|
+
```
|
|
916
|
+
</details>
|
|
917
|
+
|
|
918
|
+
<details>
|
|
919
|
+
<summary><strong>How does workspace registry work with teams?</strong></summary>
|
|
920
|
+
|
|
921
|
+
The registry (`~/.rapidkit/workspaces.json`) is **user-local**, not project-local:
|
|
922
|
+
- Each developer has their own registry
|
|
923
|
+
- Workspaces are auto-discovered when cloned
|
|
924
|
+
- VS Code Extension syncs automatically
|
|
925
|
+
- Git doesn't track the registry (it's in `~/.rapidkit/`)
|
|
926
|
+
|
|
927
|
+
For team sharing:
|
|
928
|
+
- Commit workspace code to Git
|
|
929
|
+
- Each developer runs `rapidkit workspace sync` after clone
|
|
930
|
+
- Or let VS Code Extension auto-discover
|
|
931
|
+
</details>
|
|
932
|
+
|
|
933
|
+
---
|
|
934
|
+
|
|
935
|
+
## 🛠️ Development
|
|
936
|
+
|
|
937
|
+
### Setup
|
|
938
|
+
|
|
939
|
+
```bash
|
|
940
|
+
# Clone the repository
|
|
941
|
+
git clone https://github.com/getrapidkit/rapidkit-npm.git
|
|
942
|
+
cd rapidkit-npm
|
|
943
|
+
|
|
944
|
+
# Install dependencies
|
|
945
|
+
npm install
|
|
946
|
+
|
|
947
|
+
# Build
|
|
948
|
+
npm run build
|
|
949
|
+
|
|
950
|
+
# Run tests
|
|
951
|
+
npm test
|
|
952
|
+
|
|
953
|
+
# Watch mode for development
|
|
954
|
+
npm run dev
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
### Local Testing
|
|
958
|
+
|
|
959
|
+
```bash
|
|
960
|
+
# Build and link locally
|
|
961
|
+
npm run install:local
|
|
962
|
+
|
|
963
|
+
# Now rapidkit command uses your local build
|
|
964
|
+
rapidkit --version
|
|
965
|
+
|
|
966
|
+
# Uninstall local version
|
|
967
|
+
npm run uninstall:local
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
### Project Scripts
|
|
971
|
+
|
|
972
|
+
```json
|
|
973
|
+
{
|
|
974
|
+
"dev": "tsup --watch",
|
|
975
|
+
"build": "tsup",
|
|
976
|
+
"test": "vitest run",
|
|
977
|
+
"test:watch": "vitest",
|
|
978
|
+
"lint": "eslint src",
|
|
979
|
+
"install:local": "npm unlink -g rapidkit 2>/dev/null || true && npm run build && npm link",
|
|
980
|
+
"uninstall:local": "npm unlink -g rapidkit"
|
|
981
|
+
}
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
---
|
|
985
|
+
|
|
986
|
+
## 🤝 Contributing
|
|
987
|
+
|
|
988
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
989
|
+
|
|
990
|
+
### Ways to Contribute
|
|
991
|
+
|
|
992
|
+
- 🐛 [Report bugs](https://github.com/getrapidkit/rapidkit-npm/issues)
|
|
993
|
+
- 💡 [Request features](https://github.com/getrapidkit/rapidkit-npm/issues)
|
|
994
|
+
- 📖 [Improve documentation](https://github.com/getrapidkit/rapidkit-npm/pulls)
|
|
995
|
+
- 🔧 [Submit pull requests](https://github.com/getrapidkit/rapidkit-npm/pulls)
|
|
996
|
+
|
|
997
|
+
### Development Guidelines
|
|
998
|
+
|
|
999
|
+
1. Fork the repository
|
|
1000
|
+
2. Create a feature branch: `git checkout -b feature/my-feature`
|
|
1001
|
+
3. Make your changes with tests
|
|
1002
|
+
4. Run tests: `npm test`
|
|
1003
|
+
5. Commit: `git commit -m "feat: add awesome feature"`
|
|
1004
|
+
6. Push: `git push origin feature/my-feature`
|
|
1005
|
+
7. Open a Pull Request
|
|
1006
|
+
|
|
1007
|
+
---
|
|
1008
|
+
|
|
1009
|
+
## 🔗 Related Projects
|
|
1010
|
+
|
|
1011
|
+
- **[RapidKit Core (Python)](https://pypi.org/project/rapidkit-core/)** - The engine powering RapidKit
|
|
1012
|
+
- **[RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode)** - Visual interface
|
|
1013
|
+
- **[RapidKit Documentation](https://getrapidkit.com)** - Full documentation
|
|
1014
|
+
- **[GitHub Organization](https://github.com/getrapidkit)** - All repositories
|
|
1015
|
+
|
|
1016
|
+
---
|
|
1017
|
+
|
|
1018
|
+
## 📄 License
|
|
1019
|
+
|
|
1020
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
1021
|
+
|
|
1022
|
+
---
|
|
1023
|
+
|
|
1024
|
+
## 🌟 Support
|
|
1025
|
+
|
|
1026
|
+
<div align="center">
|
|
1027
|
+
|
|
1028
|
+
### Show Your Support
|
|
1029
|
+
|
|
1030
|
+
⭐ Star this repo if you find it helpful!
|
|
1031
|
+
|
|
1032
|
+
### Stay Connected
|
|
1033
|
+
|
|
1034
|
+
🐦 Follow [@getrapidkit](https://twitter.com/getrapidkit) for updates
|
|
1035
|
+
|
|
1036
|
+
💬 Join our [Discord community](https://discord.gg/rapidkit)
|
|
1037
|
+
|
|
1038
|
+
📚 Read the [full documentation](https://getrapidkit.com)
|
|
1039
|
+
|
|
1040
|
+
### Get Help
|
|
1041
|
+
|
|
1042
|
+
🐛 [Report Issues](https://github.com/getrapidkit/rapidkit-npm/issues)
|
|
1043
|
+
|
|
1044
|
+
💡 [Request Features](https://github.com/getrapidkit/rapidkit-npm/issues)
|
|
1045
|
+
|
|
1046
|
+
📖 [Browse Docs](https://getrapidkit.com)
|
|
1047
|
+
|
|
1048
|
+
---
|
|
1049
|
+
|
|
1050
|
+
**Made with ❤️ by the RapidKit team**
|
|
1051
|
+
|
|
1052
|
+
[Website](https://getrapidkit.com) • [GitHub](https://github.com/getrapidkit) • [Twitter](https://twitter.com/getrapidkit) • [Discord](https://discord.gg/rapidkit)
|
|
1053
|
+
|
|
1054
|
+
</div>
|
|
1055
|
+
>
|
|
1056
|
+
> _Note: The AI recommender feature is complete in the `feature/ai-recommender` branch but not yet released. We will announce it when Core module support is available._
|
|
1057
|
+
|
|
1058
|
+
RapidKit's single source of truth for kits and global commands is **RapidKit Core (Python)**.
|
|
1059
|
+
This npm package is a **bridge/wrapper** that:
|
|
1060
|
+
|
|
1061
|
+
- Delegates project commands (e.g. `init`, `dev`, `test`) to the project-local launcher when you are inside a RapidKit project.
|
|
1062
|
+
- Forwards global/core commands (e.g. `list`, `info`, `create`, `add`, `doctor`, `--tui`, `--json`) to `python -m rapidkit ...`.
|
|
1063
|
+
- If `rapidkit-core` is not available in your system Python, it can bootstrap a cached virtualenv and install Core there.
|
|
14
1064
|
|
|
15
1065
|
**💡 Tip:** Use the [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) for a visual interface!
|
|
16
1066
|
|
|
17
1067
|
## Quick Start
|
|
18
1068
|
|
|
19
|
-
### Create a FastAPI
|
|
1069
|
+
### Create a Project (FastAPI)
|
|
20
1070
|
|
|
21
1071
|
```bash
|
|
22
|
-
npx rapidkit my-api --
|
|
1072
|
+
npx rapidkit create project fastapi.standard my-api --output .
|
|
23
1073
|
cd my-api
|
|
24
1074
|
npx rapidkit init # Install dependencies
|
|
25
1075
|
npx rapidkit dev # Start dev server at http://localhost:8000
|
|
26
1076
|
```
|
|
27
1077
|
|
|
28
|
-
### Create a NestJS
|
|
1078
|
+
### Create a Project (NestJS)
|
|
29
1079
|
|
|
30
1080
|
```bash
|
|
31
|
-
npx rapidkit my-api --
|
|
1081
|
+
npx rapidkit create project nestjs.standard my-api --output .
|
|
32
1082
|
cd my-api
|
|
33
1083
|
npx rapidkit init # Install dependencies
|
|
34
1084
|
npx rapidkit dev # Start dev server at http://localhost:8000
|
|
35
1085
|
```
|
|
36
1086
|
|
|
37
|
-
|
|
1087
|
+
### Create a Workspace (Recommended)
|
|
1088
|
+
|
|
1089
|
+
For organizing multiple projects:
|
|
1090
|
+
|
|
1091
|
+
```bash
|
|
1092
|
+
npx rapidkit my-workspace # Create workspace with Poetry
|
|
1093
|
+
cd my-workspace
|
|
1094
|
+
|
|
1095
|
+
# Activate environment (choose one):
|
|
1096
|
+
source "$(poetry env info --path)/bin/activate"
|
|
1097
|
+
# OR use poetry run prefix for all commands
|
|
1098
|
+
alias rapidkit="poetry run rapidkit"
|
|
1099
|
+
|
|
1100
|
+
# Create projects
|
|
1101
|
+
rapidkit create # Interactive mode
|
|
1102
|
+
rapidkit create project fastapi.standard my-api --output .
|
|
1103
|
+
cd my-api
|
|
1104
|
+
rapidkit init && rapidkit dev
|
|
1105
|
+
```
|
|
1106
|
+
|
|
1107
|
+
**Why use a workspace?**
|
|
1108
|
+
- ✅ Centralized Python environment for all projects
|
|
1109
|
+
- ✅ Auto-tracks all projects in registry (`~/.rapidkit/workspaces.json`)
|
|
1110
|
+
- ✅ VS Code Extension auto-discovers your projects
|
|
1111
|
+
- ✅ Easier dependency management across projects
|
|
1112
|
+
|
|
1113
|
+
### Interactive mode (recommended)
|
|
1114
|
+
|
|
1115
|
+
```bash
|
|
1116
|
+
# Outside workspace
|
|
1117
|
+
npx rapidkit create
|
|
1118
|
+
|
|
1119
|
+
# Inside workspace (after activation)
|
|
1120
|
+
rapidkit create
|
|
1121
|
+
# OR
|
|
1122
|
+
poetry run rapidkit create
|
|
1123
|
+
```
|
|
1124
|
+
|
|
1125
|
+
This runs the RapidKit Core wizard and guides you through kit selection and project creation.
|
|
38
1126
|
|
|
39
1127
|
## Two Modes of Operation
|
|
40
1128
|
|
|
41
|
-
### 1. Direct Project Creation (
|
|
1129
|
+
### 1. Direct Project Creation (Core-first)
|
|
42
1130
|
|
|
43
|
-
Create a standalone project directly:
|
|
1131
|
+
Create a standalone project directly via Core:
|
|
44
1132
|
|
|
45
1133
|
```bash
|
|
46
|
-
npx rapidkit my-api --
|
|
47
|
-
npx rapidkit my-api --
|
|
1134
|
+
npx rapidkit create project fastapi.standard my-api --output .
|
|
1135
|
+
npx rapidkit create project nestjs.standard my-api --output .
|
|
48
1136
|
```
|
|
49
1137
|
|
|
50
|
-
### 2. Workspace Mode
|
|
1138
|
+
### 2. RapidKit Workspace Mode
|
|
51
1139
|
|
|
52
1140
|
Create a workspace to organize multiple projects:
|
|
53
1141
|
|
|
54
1142
|
```bash
|
|
55
|
-
npx rapidkit my-workspace # Create workspace
|
|
1143
|
+
npx rapidkit my-workspace # Create a RapidKit workspace
|
|
1144
|
+
cd my-workspace
|
|
1145
|
+
|
|
1146
|
+
# Activate the environment (Poetry installs to cache, not .venv)
|
|
1147
|
+
source "$(poetry env info --path)/bin/activate"
|
|
1148
|
+
|
|
1149
|
+
# Or use poetry run prefix
|
|
1150
|
+
poetry run rapidkit create # Interactive project creation
|
|
1151
|
+
poetry run rapidkit create project fastapi.standard my-api --output .
|
|
1152
|
+
```
|
|
1153
|
+
|
|
1154
|
+
This mode creates a "RapidKit workspace" directory and installs the Python Core there via Poetry/venv/pipx, so you can create/manage multiple projects from the same environment.
|
|
1155
|
+
|
|
1156
|
+
**Important:** When using Poetry (recommended), the virtualenv is created in Poetry's cache, not as a local `.venv` folder. You must either:
|
|
1157
|
+
- Activate the environment: `source "$(poetry env info --path)/bin/activate"`
|
|
1158
|
+
- Use `poetry run` prefix: `poetry run rapidkit create`
|
|
1159
|
+
- Create an alias: `alias rapidkit="poetry run rapidkit"`
|
|
1160
|
+
|
|
1161
|
+
**Workspace Features:**
|
|
1162
|
+
- All projects are automatically tracked in `~/.rapidkit/workspaces.json`
|
|
1163
|
+
- VS Code Extension auto-discovers workspace projects
|
|
1164
|
+
- Use `rapidkit workspace list` to see all workspaces and projects
|
|
1165
|
+
- Use `rapidkit workspace sync` to update project registry
|
|
1166
|
+
|
|
1167
|
+
## Kits / Templates
|
|
1168
|
+
|
|
1169
|
+
Kits/templates are provided by the Python Core. This npm package is not limited to two templates.
|
|
1170
|
+
|
|
1171
|
+
List kits:
|
|
1172
|
+
|
|
1173
|
+
```bash
|
|
1174
|
+
rapidkit list
|
|
1175
|
+
rapidkit list --json
|
|
1176
|
+
```
|
|
1177
|
+
|
|
1178
|
+
Create a project with any kit slug:
|
|
1179
|
+
|
|
1180
|
+
```bash
|
|
1181
|
+
npx rapidkit create project <kit-slug> my-service --output .
|
|
1182
|
+
```
|
|
1183
|
+
|
|
1184
|
+
Examples:
|
|
1185
|
+
|
|
1186
|
+
```bash
|
|
1187
|
+
npx rapidkit create project fastapi.standard my-service --output .
|
|
1188
|
+
npx rapidkit create project nestjs.standard my-service --output .
|
|
1189
|
+
```
|
|
1190
|
+
|
|
1191
|
+
### Offline fallback (deprecated, last resort)
|
|
1192
|
+
|
|
1193
|
+
**Deprecated:** With the Python Core (PyPI `rapidkit-core`) now providing dynamic kits and the interactive wizard, the npm package no longer relies on static embedded templates. The offline fallback remains available only as an absolute last-resort for environments where Python/Core cannot be used, but it is not recommended for normal usage.
|
|
1194
|
+
|
|
1195
|
+
If you still need the fallback it supports:
|
|
1196
|
+
|
|
1197
|
+
- `fastapi.standard` (and `fastapi` shorthand)
|
|
1198
|
+
- `nestjs.standard` (and `nestjs` shorthand)
|
|
1199
|
+
|
|
1200
|
+
Example (deprecated fallback):
|
|
1201
|
+
|
|
1202
|
+
```bash
|
|
1203
|
+
npx rapidkit create project fastapi.standard my-api --output .
|
|
1204
|
+
```
|
|
1205
|
+
|
|
1206
|
+
Limitations of the offline fallback (deprecated):
|
|
1207
|
+
|
|
1208
|
+
- Only FastAPI/NestJS embedded templates are supported.
|
|
1209
|
+
- The full kit catalog (`rapidkit list`) and the interactive wizard (`rapidkit create`) require Python Core.
|
|
1210
|
+
- `--json` output is not supported for fallback `create`.
|
|
1211
|
+
|
|
1212
|
+
---
|
|
1213
|
+
|
|
1214
|
+
### Bootstrapping Python Core into a workspace
|
|
1215
|
+
|
|
1216
|
+
The recommended flow is to use the Python Core (`rapidkit-core` on PyPI) as the single source of truth for kits and modules. The npm CLI will bootstrap the Python Core into a workspace virtual environment so you can create and manage projects even on a fresh machine.
|
|
1217
|
+
|
|
1218
|
+
Example: create a workspace and verify Core is bootstrapped
|
|
1219
|
+
|
|
1220
|
+
```bash
|
|
1221
|
+
# Create a RapidKit workspace non-interactively (workspace .venv will be created)
|
|
1222
|
+
npx rapidkit my-workspace --yes --skip-git
|
|
1223
|
+
|
|
1224
|
+
# Activate the workspace environment
|
|
56
1225
|
cd my-workspace
|
|
57
|
-
|
|
58
|
-
|
|
1226
|
+
source .venv/bin/activate
|
|
1227
|
+
|
|
1228
|
+
# Confirm rapidkit-core is installed inside the workspace venv
|
|
1229
|
+
python -m pip show rapidkit-core
|
|
1230
|
+
# -> Name: rapidkit-core
|
|
1231
|
+
# -> Version: 0.2.1rc1 (or newer)
|
|
59
1232
|
```
|
|
60
1233
|
|
|
61
|
-
|
|
1234
|
+
## Install Python Core (optional) 🐍🔧
|
|
62
1235
|
|
|
63
|
-
|
|
1236
|
+
RapidKit's engine is provided by the Python package `rapidkit-core` on PyPI. If you prefer to install the engine manually (for development or testing), you can do so:
|
|
64
1237
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
| `nestjs` | NestJS | TypeScript Node.js framework with modular architecture |
|
|
1238
|
+
```bash
|
|
1239
|
+
# Install for current user
|
|
1240
|
+
pip install --user rapidkit-core
|
|
69
1241
|
|
|
70
|
-
|
|
1242
|
+
# Or install into an active virtual environment / system
|
|
1243
|
+
pip install rapidkit-core
|
|
1244
|
+
```
|
|
1245
|
+
|
|
1246
|
+
Project page: https://pypi.org/project/rapidkit-core/
|
|
1247
|
+
|
|
1248
|
+
Notes:
|
|
1249
|
+
|
|
1250
|
+
- The CLI will prefer system Python with `rapidkit-core` if available. If not present it bootstraps `rapidkit-core` into the workspace `.venv` (or a cached bridge venv as a fallback for some global flows).
|
|
1251
|
+
- To emulate a clean system in CI/QA, ensure `rapidkit-core` is not installed in the global/system Python before running the workspace creation script.
|
|
1252
|
+
- If you prefer Poetry to create in-project virtualenvs (`.venv`), enable it via `poetry config virtualenvs.in-project true` or let the workspace installer configure Poetry for you.
|
|
1253
|
+
|
|
1254
|
+
## Workspace Management
|
|
1255
|
+
|
|
1256
|
+
RapidKit maintains a shared workspace registry at `~/.rapidkit/workspaces.json` for cross-tool compatibility with the VS Code Extension.
|
|
1257
|
+
|
|
1258
|
+
### List Registered Workspaces
|
|
1259
|
+
|
|
1260
|
+
```bash
|
|
1261
|
+
npx rapidkit workspace list
|
|
1262
|
+
```
|
|
1263
|
+
|
|
1264
|
+
This shows all workspaces created via npm package or VS Code Extension, including:
|
|
1265
|
+
- Workspace name and path
|
|
1266
|
+
- Number of projects in each workspace
|
|
1267
|
+
- Validation status (path exists/missing)
|
|
1268
|
+
|
|
1269
|
+
**Example output:**
|
|
1270
|
+
```
|
|
1271
|
+
📦 Registered RapidKit Workspaces:
|
|
1272
|
+
|
|
1273
|
+
my-workspace
|
|
1274
|
+
Path: /home/user/projects/my-workspace
|
|
1275
|
+
Projects: 3
|
|
1276
|
+
|
|
1277
|
+
Total: 1 workspace(s)
|
|
1278
|
+
```
|
|
1279
|
+
|
|
1280
|
+
### Sync Workspace Projects
|
|
1281
|
+
|
|
1282
|
+
When you create projects inside a workspace, they are automatically tracked. If needed, you can manually sync:
|
|
1283
|
+
|
|
1284
|
+
```bash
|
|
1285
|
+
cd my-workspace
|
|
1286
|
+
rapidkit workspace sync
|
|
1287
|
+
```
|
|
1288
|
+
|
|
1289
|
+
This command scans the workspace directory and registers all RapidKit projects (directories with `.rapidkit/context.json` or `.rapidkit/project.json`) in the registry.
|
|
1290
|
+
|
|
1291
|
+
**Note:** Project registration happens automatically when you create projects with `rapidkit create project ...` inside a workspace. Manual sync is only needed if you:
|
|
1292
|
+
- Manually moved/copied projects into the workspace
|
|
1293
|
+
- Created projects before the sync feature was added
|
|
1294
|
+
- Want to refresh the registry after external changes
|
|
1295
|
+
|
|
1296
|
+
### Workspace Registry Format
|
|
1297
|
+
|
|
1298
|
+
The registry stores workspace metadata:
|
|
1299
|
+
|
|
1300
|
+
```json
|
|
1301
|
+
{
|
|
1302
|
+
"workspaces": [
|
|
1303
|
+
{
|
|
1304
|
+
"name": "my-workspace",
|
|
1305
|
+
"path": "/home/user/projects/my-workspace",
|
|
1306
|
+
"mode": "full",
|
|
1307
|
+
"projects": [
|
|
1308
|
+
{
|
|
1309
|
+
"name": "my-api",
|
|
1310
|
+
"path": "/home/user/projects/my-workspace/my-api"
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"name": "admin-api",
|
|
1314
|
+
"path": "/home/user/projects/my-workspace/admin-api"
|
|
1315
|
+
}
|
|
1316
|
+
]
|
|
1317
|
+
}
|
|
1318
|
+
]
|
|
1319
|
+
}
|
|
1320
|
+
```
|
|
1321
|
+
|
|
1322
|
+
Workspaces are automatically registered when created via:
|
|
1323
|
+
- `npx rapidkit <workspace-name>`
|
|
1324
|
+
- VS Code Extension "Create Workspace" command
|
|
1325
|
+
|
|
1326
|
+
Projects are automatically registered when created via:
|
|
1327
|
+
- `rapidkit create project ...` (inside a workspace)
|
|
1328
|
+
- VS Code Extension "Create Project" command
|
|
71
1329
|
|
|
72
1330
|
## CLI Options
|
|
73
1331
|
|
|
@@ -78,10 +1336,15 @@ npx rapidkit [project-name] [options]
|
|
|
78
1336
|
### Arguments
|
|
79
1337
|
|
|
80
1338
|
- `project-name` - Name of project/workspace directory to create
|
|
1339
|
+
- `action` - For workspace commands: `list` or `sync`
|
|
1340
|
+
|
|
1341
|
+
### Workspace Commands
|
|
1342
|
+
|
|
1343
|
+
- `rapidkit workspace list` - List all registered workspaces and their projects
|
|
1344
|
+
- `rapidkit workspace sync` - Scan current workspace and register all projects
|
|
81
1345
|
|
|
82
1346
|
### Options
|
|
83
1347
|
|
|
84
|
-
- `-t, --template <template>` - Template to use: `fastapi` or `nestjs` (creates direct project)
|
|
85
1348
|
- `--skip-git` - Skip git initialization
|
|
86
1349
|
- `--skip-install` - Skip installing dependencies (for NestJS)
|
|
87
1350
|
- `--debug` - Enable verbose debug logging
|
|
@@ -106,6 +1369,43 @@ npx rapidkit format # Format code
|
|
|
106
1369
|
npx rapidkit --help # Show all commands
|
|
107
1370
|
```
|
|
108
1371
|
|
|
1372
|
+
### Adding Modules to Your Project
|
|
1373
|
+
|
|
1374
|
+
RapidKit's modular architecture lets you extend your project with pre-built modules. Install modules using:
|
|
1375
|
+
|
|
1376
|
+
```bash
|
|
1377
|
+
npx rapidkit add module <module-slug>
|
|
1378
|
+
```
|
|
1379
|
+
|
|
1380
|
+
**Examples:**
|
|
1381
|
+
|
|
1382
|
+
```bash
|
|
1383
|
+
# Add authentication module
|
|
1384
|
+
npx rapidkit add module auth
|
|
1385
|
+
|
|
1386
|
+
# Add caching module (Redis)
|
|
1387
|
+
npx rapidkit add module redis
|
|
1388
|
+
|
|
1389
|
+
# Add database module (PostgreSQL)
|
|
1390
|
+
npx rapidkit add module db_postgres
|
|
1391
|
+
```
|
|
1392
|
+
|
|
1393
|
+
**List available modules:**
|
|
1394
|
+
|
|
1395
|
+
```bash
|
|
1396
|
+
npx rapidkit list modules
|
|
1397
|
+
npx rapidkit list modules --json
|
|
1398
|
+
```
|
|
1399
|
+
|
|
1400
|
+
**View module details:**
|
|
1401
|
+
|
|
1402
|
+
```bash
|
|
1403
|
+
npx rapidkit info module auth
|
|
1404
|
+
npx rapidkit info module db_postgres
|
|
1405
|
+
```
|
|
1406
|
+
|
|
1407
|
+
> **💡 Tip:** Use the [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) for a visual interface to browse and install modules!
|
|
1408
|
+
|
|
109
1409
|
> **Note:** `npx rapidkit` automatically detects when you're inside a RapidKit project and delegates to the local CLI. Works everywhere without any setup!
|
|
110
1410
|
|
|
111
1411
|
> **💡 Tip:** Install globally with `npm i -g rapidkit` to use `rapidkit` directly without `npx`.
|
|
@@ -165,33 +1465,55 @@ my-api/
|
|
|
165
1465
|
## Requirements
|
|
166
1466
|
|
|
167
1467
|
- **Node.js**: 20.19.6+ (LTS recommended)
|
|
168
|
-
- **
|
|
169
|
-
-
|
|
1468
|
+
- **Python**: Required for RapidKit Core commands (e.g. `list/info/create/add/...`). If Python is missing, the bridge fails with a clear error message.
|
|
1469
|
+
- For FastAPI projects: Python + Poetry (as required by the generated project)
|
|
1470
|
+
- For NestJS projects: Node + a package manager (npm/yarn/pnpm)
|
|
170
1471
|
- **Git**: For version control
|
|
171
1472
|
|
|
172
1473
|
> 💡 **Tip:** Use [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) - includes system checker to verify all requirements!
|
|
173
1474
|
|
|
174
|
-
##
|
|
1475
|
+
## How It Works (Under the Hood)
|
|
1476
|
+
|
|
1477
|
+
This CLI runs a Node entrypoint (`dist/index.js`) that makes these decisions:
|
|
1478
|
+
|
|
1479
|
+
1. If you're inside a RapidKit project:
|
|
1480
|
+
|
|
1481
|
+
- It detects the project (via `.rapidkit/project.json` or other signals).
|
|
1482
|
+
- It delegates `rapidkit init/dev/test/...` to the project-local launcher (`./rapidkit` or `.rapidkit/rapidkit`).
|
|
175
1483
|
|
|
176
|
-
|
|
1484
|
+
2. If you're not inside a project and run a global/core command (e.g. `rapidkit list --json`):
|
|
177
1485
|
|
|
178
|
-
|
|
1486
|
+
- It forwards the request to the Python Core via `python -m rapidkit ...`.
|
|
1487
|
+
- If Core is not installed in system Python, it bootstraps a cached venv and installs `rapidkit-core` there.
|
|
179
1488
|
|
|
180
|
-
|
|
181
|
-
- **AI-Powered Recommendations** - Intelligent module suggestions
|
|
182
|
-
- **Seamless Integration** - npm package becomes thin wrapper over Python Core
|
|
183
|
-
- **Dynamic Modules** - Install any module from the registry
|
|
184
|
-
- **Advanced Features** - All RapidKit power through npm
|
|
1489
|
+
3. If you run `npx rapidkit <name>` without `--template`:
|
|
185
1490
|
|
|
186
|
-
|
|
1491
|
+
- It creates a "RapidKit environment" directory (Poetry/venv/pipx) so you're ready to create and run real projects.
|
|
187
1492
|
|
|
188
|
-
|
|
189
|
-
- Improve documentation
|
|
190
|
-
- Optimize bundle size
|
|
191
|
-
- Prepare Core integration bridge
|
|
192
|
-
- Enhanced error messages
|
|
1493
|
+
### Bridge controls
|
|
193
1494
|
|
|
194
|
-
|
|
1495
|
+
- Override Core install target (dev/test): `RAPIDKIT_CORE_PYTHON_PACKAGE=/path/to/core`
|
|
1496
|
+
- Cache location: `XDG_CACHE_HOME=...`
|
|
1497
|
+
- Upgrade pip during bootstrap (optional): `RAPIDKIT_BRIDGE_UPGRADE_PIP=1`
|
|
1498
|
+
|
|
1499
|
+
### Workspace Markers
|
|
1500
|
+
|
|
1501
|
+
Workspaces created by the npm package include a `.rapidkit-workspace` marker file:
|
|
1502
|
+
|
|
1503
|
+
```json
|
|
1504
|
+
{
|
|
1505
|
+
"signature": "RAPIDKIT_WORKSPACE",
|
|
1506
|
+
"createdBy": "rapidkit-npm",
|
|
1507
|
+
"version": "0.15.1",
|
|
1508
|
+
"createdAt": "2026-02-01T...",
|
|
1509
|
+
"name": "my-workspace"
|
|
1510
|
+
}
|
|
1511
|
+
```
|
|
1512
|
+
|
|
1513
|
+
This marker enables:
|
|
1514
|
+
- Workspace auto-detection by VS Code Extension
|
|
1515
|
+
- Cross-tool workspace compatibility
|
|
1516
|
+
- Workspace validation and version tracking
|
|
195
1517
|
|
|
196
1518
|
## Development
|
|
197
1519
|
|
|
@@ -215,7 +1537,7 @@ npm run dev
|
|
|
215
1537
|
|
|
216
1538
|
## Related Projects
|
|
217
1539
|
|
|
218
|
-
- **RapidKit Python** - The
|
|
1540
|
+
- **RapidKit Core (Python)** - The engine (PyPI: `rapidkit-core`)
|
|
219
1541
|
- **RapidKit Docs** - https://getrapidkit.com
|
|
220
1542
|
- **GitHub**: https://github.com/getrapidkit
|
|
221
1543
|
|
|
@@ -227,13 +1549,3 @@ MIT
|
|
|
227
1549
|
|
|
228
1550
|
- 🐛 Report issues: [GitHub Issues](https://github.com/getrapidkit/rapidkit-npm/issues)
|
|
229
1551
|
- 📚 Docs: https://getrapidkit.com
|
|
230
|
-
|
|
231
|
-
---
|
|
232
|
-
|
|
233
|
-
**v0.13.0** - NestJS test coverage boost (75%→90%), demo-kit improvements
|
|
234
|
-
|
|
235
|
-
**v0.12.4** - Friendly shell activation UX with green headers and robust fallback logic
|
|
236
|
-
|
|
237
|
-
**v0.12.2** - Simplified CLI: `rapidkit init` now handles environment activation automatically
|
|
238
|
-
|
|
239
|
-
**v0.12.0** - Added NestJS template, workspace mode, and unified CLI
|