@crossdelta/platform-sdk 0.10.1 → 0.11.1
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 +40 -3
- package/bin/cli.js +109 -109
- package/bin/docs/generators/README.md +29 -20
- package/bin/docs/generators/code-style.md +96 -0
- package/bin/docs/generators/hono-bun.md +31 -45
- package/bin/docs/generators/hono-node.md +33 -57
- package/bin/docs/generators/nest.md +169 -107
- package/bin/docs/generators/service.md +133 -528
- package/bin/docs/generators/testing.md +97 -0
- package/bin/templates/nest-microservice/biome.json.hbs +1 -8
- package/bin/templates/workspace/biome.json.hbs +2 -1
- package/bin/templates/workspace/package.json.hbs +1 -1
- package/bin/templates/workspace/packages/contracts/package.json.hbs +1 -1
- package/package.json +123 -118
- package/bin/docs/generators/nest.md.new +0 -351
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<code>pf</code> scaffolds real-world platforms: backend services, event-driven messaging, infrastructure — all wired together and kept in sync.
|
|
12
|
+
<code>pf</code> scaffolds real-world platforms: backend services, event-driven messaging, infrastructure — all wired together and kept in sync. <strong>AI-assisted.</strong>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
@@ -216,7 +216,42 @@ pf new hono-micro services/notifications --ai \
|
|
|
216
216
|
-d "Send emails when orders are created"
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
-
AI generates
|
|
219
|
+
The AI generates **production-ready code** that follows your platform's conventions:
|
|
220
|
+
|
|
221
|
+
<table>
|
|
222
|
+
<tr>
|
|
223
|
+
<td>✅</td>
|
|
224
|
+
<td><strong>Event contracts</strong> with Zod schemas in <code>packages/contracts/</code></td>
|
|
225
|
+
</tr>
|
|
226
|
+
<tr>
|
|
227
|
+
<td>✅</td>
|
|
228
|
+
<td><strong>Event handlers</strong> that auto-discover and consume from NATS</td>
|
|
229
|
+
</tr>
|
|
230
|
+
<tr>
|
|
231
|
+
<td>✅</td>
|
|
232
|
+
<td><strong>Use-cases/Services</strong> with business logic separated from handlers</td>
|
|
233
|
+
</tr>
|
|
234
|
+
<tr>
|
|
235
|
+
<td>✅</td>
|
|
236
|
+
<td><strong>Tests</strong> for use-cases with realistic scenarios</td>
|
|
237
|
+
</tr>
|
|
238
|
+
<tr>
|
|
239
|
+
<td>✅</td>
|
|
240
|
+
<td><strong>Type-safe</strong> — no <code>any</code>, proper imports, strict TypeScript</td>
|
|
241
|
+
</tr>
|
|
242
|
+
<tr>
|
|
243
|
+
<td>✅</td>
|
|
244
|
+
<td><strong>Lint-compliant</strong> — passes Biome formatting out of the box</td>
|
|
245
|
+
</tr>
|
|
246
|
+
</table>
|
|
247
|
+
|
|
248
|
+
**What makes it different:**
|
|
249
|
+
- Uses your **existing contracts** when wiring events between services
|
|
250
|
+
- Follows **framework-specific patterns** (Hono use-cases vs. NestJS Services)
|
|
251
|
+
- Generates **only the code you need** — no bloat, no unused abstractions
|
|
252
|
+
- **Hot-reload friendly** — `pf dev` automatically restarts when AI finishes
|
|
253
|
+
|
|
254
|
+
Works with OpenAI (GPT-4o) and Anthropic (Claude 3.5 Sonnet).
|
|
220
255
|
|
|
221
256
|
---
|
|
222
257
|
|
|
@@ -292,7 +327,7 @@ my-platform/
|
|
|
292
327
|
| Monorepo | [Turborepo](https://turbo.build/repo) |
|
|
293
328
|
| Services | [Hono](https://hono.dev) or [NestJS](https://nestjs.com) |
|
|
294
329
|
| Messaging | [NATS](https://nats.io) + JetStream |
|
|
295
|
-
| Events | [CloudEvents](https://cloudevents.io) + Zod
|
|
330
|
+
| Events | [@crossdelta/cloudevents](https://www.npmjs.com/package/@crossdelta/cloudevents) ([CloudEvents](https://cloudevents.io) + Zod) |
|
|
296
331
|
| Infrastructure | [Pulumi](https://pulumi.com) → DigitalOcean (extensible) |
|
|
297
332
|
| Runtime | [Bun](https://bun.sh) |
|
|
298
333
|
|
|
@@ -380,6 +415,8 @@ export default handleEvent(OrdersCreatedContract, async (data) => {
|
|
|
380
415
|
|
|
381
416
|
Handlers are auto-discovered. No manual subscriptions.
|
|
382
417
|
|
|
418
|
+
See [@crossdelta/cloudevents](https://www.npmjs.com/package/@crossdelta/cloudevents) for full event API.
|
|
419
|
+
|
|
383
420
|
</details>
|
|
384
421
|
|
|
385
422
|
<details>
|