@crossdelta/platform-sdk 0.3.21 → 0.3.22
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 +100 -18
- package/bin/cli.js +164 -302
- package/package.json +16 -5
- package/logo.png +0 -0
package/README.md
CHANGED
|
@@ -14,29 +14,37 @@
|
|
|
14
14
|
with natural language, and deploy to the cloud — all from one CLI.
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
+
<p align="center">
|
|
18
|
+
<strong>🚀 Scaffold • 🤖 Generate • ☁️ Deploy</strong>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
17
21
|
<p align="center">
|
|
18
22
|
<a href="https://www.npmjs.com/package/@crossdelta/platform-sdk"><img src="https://img.shields.io/npm/v/@crossdelta/platform-sdk.svg?style=flat-square" alt="npm version" /></a>
|
|
23
|
+
<a href="https://www.npmjs.com/package/@crossdelta/platform-sdk"><img src="https://img.shields.io/npm/dm/@crossdelta/platform-sdk?style=flat-square" alt="Downloads" /></a>
|
|
24
|
+
<img src="https://img.shields.io/bundlephobia/min/@crossdelta/platform-sdk?style=flat-square&label=size" alt="Package size" />
|
|
19
25
|
<img src="https://img.shields.io/badge/bun-%E2%9A%A1-f9f1e1?style=flat-square" alt="Bun" />
|
|
20
26
|
<img src="https://img.shields.io/badge/pulumi-ready-blueviolet?style=flat-square" alt="Pulumi" />
|
|
21
27
|
<img src="https://img.shields.io/badge/DigitalOcean-App_Platform_|_DOKS-0080FF?style=flat-square" alt="DigitalOcean" />
|
|
22
28
|
</p>
|
|
23
29
|
|
|
30
|
+
<br />
|
|
31
|
+
|
|
24
32
|
---
|
|
25
33
|
|
|
26
|
-
##
|
|
34
|
+
## Who is this for?
|
|
27
35
|
|
|
28
36
|
- You run **multiple microservices** and want a unified developer experience
|
|
29
37
|
- You prefer **monorepos + Infrastructure-as-Code** as your architectural baseline
|
|
30
38
|
- You're okay with **DigitalOcean as the initial cloud provider** (AWS/GCP coming soon)
|
|
31
39
|
|
|
32
|
-
---
|
|
33
|
-
|
|
34
40
|
> ⚠️ **Cloud Provider Support:** Currently only **DigitalOcean** is supported:
|
|
35
41
|
> - **App Platform** — Managed PaaS for simple deployments
|
|
36
42
|
> - **DOKS (Kubernetes)** — Full Kubernetes control for production workloads
|
|
37
43
|
>
|
|
38
44
|
> **AWS and GCP support** is planned for future releases.
|
|
39
45
|
|
|
46
|
+
<br />
|
|
47
|
+
|
|
40
48
|
---
|
|
41
49
|
|
|
42
50
|
## ✨ Features
|
|
@@ -54,18 +62,24 @@
|
|
|
54
62
|
| 🔌 **Auto Port Assignment** | Unique ports per service |
|
|
55
63
|
| 🔁 **Smart Watch Mode** | Watches infra & services, regenerates env, reinstalls deps |
|
|
56
64
|
|
|
65
|
+
<br />
|
|
66
|
+
|
|
57
67
|
---
|
|
58
68
|
|
|
59
69
|
## 🚀 Quick Start
|
|
60
70
|
|
|
71
|
+
> 💡 **Get started in under 2 minutes**
|
|
72
|
+
|
|
61
73
|
### 1. Create a new workspace
|
|
62
74
|
|
|
63
75
|
```bash
|
|
76
|
+
# Install globally
|
|
64
77
|
npm install -g @crossdelta/platform-sdk
|
|
65
78
|
pf new workspace my-platform
|
|
66
79
|
|
|
67
|
-
# Or with bunx
|
|
68
|
-
|
|
80
|
+
# Or use directly with npx/bunx (no installation required)
|
|
81
|
+
npx @crossdelta/platform-sdk new workspace my-platform
|
|
82
|
+
bunx @crossdelta/platform-sdk new workspace my-platform
|
|
69
83
|
```
|
|
70
84
|
|
|
71
85
|
**Options:**
|
|
@@ -77,30 +91,45 @@ bunx @crossdelta/platform-sdk pf new workspace my-platform
|
|
|
77
91
|
| `-s, --pulumi-stack <name>` | Pulumi stack base name |
|
|
78
92
|
| `--no-github` | Skip GitHub Actions workflows |
|
|
79
93
|
|
|
80
|
-
---
|
|
81
|
-
|
|
82
94
|
### 2. Generate microservices
|
|
83
95
|
|
|
96
|
+
**Manual scaffolding:**
|
|
84
97
|
```bash
|
|
85
98
|
pf new hono-micro services/orders
|
|
86
99
|
pf new nest-micro services/api-gateway
|
|
87
100
|
```
|
|
88
101
|
|
|
89
|
-
|
|
90
|
-
|
|
102
|
+
**AI-powered generation:**
|
|
91
103
|
```bash
|
|
92
|
-
|
|
104
|
+
# First time: configure AI provider (OpenAI or Anthropic)
|
|
93
105
|
pf setup --ai
|
|
106
|
+
|
|
107
|
+
# Generate service with AI
|
|
108
|
+
pf new hono-micro services/payments --ai \
|
|
109
|
+
-d "Handle Stripe webhooks and send payment confirmations"
|
|
94
110
|
```
|
|
95
111
|
|
|
96
|
-
|
|
112
|
+
**✨ AI generates:**
|
|
113
|
+
- ✅ Complete service with event handlers & use cases
|
|
114
|
+
- ✅ Pulumi infrastructure configuration
|
|
115
|
+
- ✅ Test files with validation logic
|
|
116
|
+
- ✅ Complete README documentation
|
|
97
117
|
|
|
98
118
|
### 3. Start local development
|
|
99
119
|
|
|
100
120
|
```bash
|
|
121
|
+
cd my-platform
|
|
101
122
|
pf dev
|
|
102
123
|
```
|
|
103
124
|
|
|
125
|
+
This will:
|
|
126
|
+
- 🔄 Auto-generate `.env.local` from infrastructure config
|
|
127
|
+
- 🚀 Start all services in watch mode
|
|
128
|
+
- 🔌 Auto-assign unique ports per service
|
|
129
|
+
- 📦 Install dependencies when `package.json` changes
|
|
130
|
+
|
|
131
|
+
<br />
|
|
132
|
+
|
|
104
133
|
---
|
|
105
134
|
|
|
106
135
|
## 📁 Workspace Structure
|
|
@@ -123,18 +152,53 @@ my-platform/
|
|
|
123
152
|
└── biome.json
|
|
124
153
|
```
|
|
125
154
|
|
|
155
|
+
<br />
|
|
156
|
+
|
|
126
157
|
---
|
|
127
158
|
|
|
128
159
|
## 🛠 CLI Commands
|
|
129
160
|
|
|
161
|
+
<details>
|
|
162
|
+
<summary><strong>📖 View Full Command Reference</strong></summary>
|
|
163
|
+
|
|
164
|
+
<br />
|
|
165
|
+
|
|
166
|
+
### Workspace Commands
|
|
167
|
+
|
|
168
|
+
| Command | Description |
|
|
169
|
+
|---------|-------------|
|
|
170
|
+
| `pf new` | Interactive creation wizard |
|
|
171
|
+
| `pf new workspace <name>` | Scaffold a complete platform monorepo |
|
|
172
|
+
| `pf setup --ai` | Configure AI provider (OpenAI or Anthropic) |
|
|
173
|
+
| `pf dev [options]` | Start development environment with hot reload |
|
|
174
|
+
|
|
175
|
+
### Service Commands
|
|
176
|
+
|
|
177
|
+
| Command | Description |
|
|
178
|
+
|---------|-------------|
|
|
179
|
+
| `pf new hono-micro <path>` | Generate a Hono microservice (lightweight) |
|
|
180
|
+
| `pf new nest-micro <path>` | Generate a NestJS microservice (enterprise-grade) |
|
|
181
|
+
| `pf new hono-micro <path> --ai` | Generate service with AI (requires `pf setup --ai`) |
|
|
182
|
+
|
|
183
|
+
### Code Generation
|
|
184
|
+
|
|
185
|
+
| Command | Description |
|
|
186
|
+
|---------|-------------|
|
|
187
|
+
| `pf generate event-handler <name>` | Generate an event handler |
|
|
188
|
+
| `pf generate use-case <name>` | Generate a use case |
|
|
189
|
+
| `pf event:list` | List all available event mocks |
|
|
190
|
+
| `pf event:send <name>` | Send a test event to NATS |
|
|
191
|
+
|
|
192
|
+
### Utility Commands
|
|
193
|
+
|
|
130
194
|
| Command | Description |
|
|
131
195
|
|---------|-------------|
|
|
132
|
-
| `pf
|
|
133
|
-
| `pf
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
196
|
+
| `pf --version` | Show version information |
|
|
197
|
+
| `pf --help` | Show help for any command |
|
|
198
|
+
|
|
199
|
+
</details>
|
|
200
|
+
|
|
201
|
+
<br />
|
|
138
202
|
|
|
139
203
|
---
|
|
140
204
|
|
|
@@ -155,6 +219,8 @@ export const config: K8sServiceConfig = {
|
|
|
155
219
|
}
|
|
156
220
|
```
|
|
157
221
|
|
|
222
|
+
<br />
|
|
223
|
+
|
|
158
224
|
---
|
|
159
225
|
|
|
160
226
|
## 🚢 Deployment
|
|
@@ -170,6 +236,8 @@ GitHub Secrets:
|
|
|
170
236
|
- `DIGITALOCEAN_TOKEN`
|
|
171
237
|
- `NPM_TOKEN` (optional)
|
|
172
238
|
|
|
239
|
+
<br />
|
|
240
|
+
|
|
173
241
|
---
|
|
174
242
|
|
|
175
243
|
## 📚 Requirements
|
|
@@ -179,8 +247,22 @@ GitHub Secrets:
|
|
|
179
247
|
- Pulumi CLI
|
|
180
248
|
- Docker (for local Supabase/NATS)
|
|
181
249
|
|
|
250
|
+
<br />
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## � Community & Support
|
|
255
|
+
|
|
256
|
+
- 📖 [Full Documentation](https://github.com/orderboss/platform/tree/main/packages/platform-sdk/docs)
|
|
257
|
+
- 🐛 [Report Issues](https://github.com/orderboss/platform/issues)
|
|
258
|
+
- 💡 [Feature Requests](https://github.com/orderboss/platform/discussions)
|
|
259
|
+
- 📦 [npm Package](https://www.npmjs.com/package/@crossdelta/platform-sdk)
|
|
260
|
+
- ⭐ [Star on GitHub](https://github.com/orderboss/platform)
|
|
261
|
+
|
|
262
|
+
<br />
|
|
263
|
+
|
|
182
264
|
---
|
|
183
265
|
|
|
184
|
-
##
|
|
266
|
+
## �📄 License
|
|
185
267
|
|
|
186
268
|
MIT © Crossdelta
|