@crossdelta/platform-sdk 0.5.5 → 0.5.7

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.
Files changed (3) hide show
  1. package/README.md +68 -47
  2. package/bin/cli.js +43 -43
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p align="center">
12
12
  <strong>Your AI-powered platform engineer.</strong><br />
13
- Scaffold complete Turborepo workspaces, generate production-ready microservices<br />
13
+ Scaffold complete <a href="https://turbo.build/repo">Turborepo</a> workspaces, generate microservice boilerplate<br />
14
14
  with natural language, and deploy to the cloud — all from one CLI.
15
15
  </p>
16
16
 
@@ -29,25 +29,54 @@
29
29
  <br />
30
30
 
31
31
  ---
32
+ ## 🚀 Quick Start
32
33
 
33
- ## 🎯 Why This Exists
34
+ ```bash
35
+ # Create workspace
36
+ bunx @crossdelta/platform-sdk new workspace my-platform -y
37
+ cd my-platform
38
+
39
+ # Generate service with AI (first time: you'll be prompted to configure an AI provider)
40
+ bunx @crossdelta/platform-sdk new hono-micro services/orders --ai \
41
+ -d "Handle order creation and payment processing"
42
+
43
+ # Start all services
44
+ bun dev
45
+ ```
46
+
47
+ **In under a minute you have a running, event-driven microservice platform with infra parity between local and production.**
48
+
49
+ You get: [Turborepo](https://turbo.build/repo) monorepo + [NATS](https://nats.io) + event-driven microservices + [Pulumi](https://www.pulumi.com) infra + auto-generated `.env.local` + **AI-generated services** — all wired automatically.
50
+
51
+ <details>
52
+ <summary><strong>💡 Prefer shorter commands? Install globally</strong></summary>
53
+
54
+ ```bash
55
+ # Install once globally
56
+ bun add -g @crossdelta/platform-sdk
57
+
58
+ # Then use short commands
59
+ pf new workspace my-platform
60
+ pf new hono-micro services/orders --ai -d "..."
61
+ ```
62
+
63
+ Works with npm/yarn/pnpm too: `npm install -g @crossdelta/platform-sdk`
34
64
 
35
- Building microservice platforms is hard. You start with great intentions, but complexity creeps in fast:
65
+ </details>
36
66
 
37
- - **Scattered repositories** with inconsistent conventions across services
38
- - **No unified DX** — every team member invents their own scripts
39
- - **Infrastructure drift** — Terraform/Pulumi configs live in separate repos
40
- - **Environment hell** — `.env` files manually maintained, ports collide, services don't talk
41
- - **Slow onboarding** — new developers spend days setting up the platform
67
+ <br />
42
68
 
43
- **`pf` is an opinionated CLI for platform engineering.** It helps you:
69
+ ---
70
+
71
+ ## 🎯 Why This Exists
44
72
 
45
- - Scaffold monorepos with consistent structure and tooling
46
- - Generate microservices (manually or AI-assisted) with shared conventions
47
- - Auto-configure infrastructure, environment variables, and port assignments
48
- - Run all services locally with a single command
73
+ Platform engineering problems `pf` solves:
49
74
 
50
- Built for teams using **Turborepo + Pulumi + NATS + Bun**.
75
+ - **Infrastructure drift** Infra configs live in separate repos, diverge from code
76
+ - **Manual wiring** — Ports, env vars, service discovery configured by hand
77
+ - **Slow onboarding** — New devs spend days setting up local environment
78
+
79
+ **`pf` is lockstep infra + code:** Services auto-generate `infra/services/*.ts`, ports/env derived automatically, event handlers type-safe and auto-discovered.
51
80
 
52
81
  <br />
53
82
 
@@ -58,18 +87,24 @@ Built for teams using **Turborepo + Pulumi + NATS + Bun**.
58
87
  ### ✅ `pf` is:
59
88
 
60
89
  - **Opinionated CLI** for event-driven microservice platforms
61
- - **Turborepo scaffolder** with Pulumi IaC and NATS messaging built-in
90
+ - **[Turborepo](https://turbo.build/repo) scaffolder** with [Pulumi](https://www.pulumi.com) IaC and [NATS](https://nats.io) messaging built-in
62
91
  - **AI-assisted code generator** that creates service boilerplate from descriptions
63
92
  - **Unified dev workflow** — one command to run all services (`bun dev`)
64
- - **DigitalOcean-first** deployment target (App Platform + DOKS)
93
+ - **[DigitalOcean](https://www.digitalocean.com)-first** deployment target (App Platform + DOKS)
65
94
 
66
95
  ### ❌ `pf` is not:
67
96
 
68
97
  - **Generic microservice generator** — makes architectural choices for you
69
- - **Cloud-agnostic** (yet) — DigitalOcean first, AWS/GCP planned
98
+ - **Multi-cloud** (not yet) — DigitalOcean first, extensible provider architecture
70
99
  - **Runtime manager** — scaffolds code, you deploy with Pulumi
71
100
  - **Kubernetes replacement** — generates K8s configs via Pulumi
72
101
 
102
+ ### 🔥 Why `pf` vs other tools?
103
+
104
+ - **🔗 Lockstep infra + code** — `infra/services/*.ts` auto-generated from service metadata, ports/env derived automatically
105
+ - **⚡ Event-driven by default** — [NATS](https://nats.io) + JetStream built-in with auto-discovered handlers (`*.event.ts`) and Zod-validated payloads
106
+ - **🤖 Automation through conventions** — New service = infra config + env vars + port assignment happens automatically
107
+
73
108
  <br />
74
109
 
75
110
  ---
@@ -140,35 +175,20 @@ These principles guide every decision in `pf`:
140
175
  - **🌊 DigitalOcean-first, cloud-agnostic later** — Start simple with DO, expand to AWS/GCP when needed
141
176
  - **🤖 AI-augmented development** — Use AI to generate complete services, not just snippets
142
177
  - **📏 Convention over configuration** — Strong opinions enable automation
178
+
143
179
  <br />
144
180
 
145
181
  ---
146
182
 
147
- ## 🚀 Quick Start
148
-
149
- > 💡 **Get started in under 2 minutes**
150
-
151
- ### 1. Create a new workspace
183
+ ## 👥 Who Is This For?
152
184
 
153
- ```bash
154
- # Install globally
155
- npm install -g @crossdelta/platform-sdk
156
- pf new workspace my-platform
185
+ `pf` is designed for **small to mid-sized teams building event-driven systems** who want strong conventions, infra parity, and fast onboarding — without maintaining their own internal platform.
157
186
 
158
- # Or use directly with bunx (no installation required)
159
- bunx @crossdelta/platform-sdk new workspace my-platform
160
- ```
161
-
162
- **Options:**
187
+ ---
163
188
 
164
- | Flag | Description |
165
- |------|-------------|
166
- | `-y, --yes` | Skip prompts |
167
- | `-o, --github-owner <owner>` | GitHub org/user for GHCR registry |
168
- | `-s, --pulumi-stack <name>` | Pulumi stack base name |
169
- | `--no-github` | Skip GitHub Actions workflows |
189
+ ## 📘 Workflows
170
190
 
171
- ### 2. Generate microservices
191
+ ### Generate microservices
172
192
 
173
193
  **Manual scaffolding:**
174
194
  ```bash
@@ -192,7 +212,9 @@ pf new hono-micro services/payments --ai \
192
212
  - ✅ Test files with validation logic
193
213
  - ✅ Complete README documentation
194
214
 
195
- ### 3. Start local development
215
+ > **Note:** AI-generated code is a starting point. Always review and test before deploying to production. `pf` never deploys or provisions infrastructure automatically — deployment always happens explicitly via Pulumi.
216
+
217
+ ### Start local development
196
218
 
197
219
  ```bash
198
220
  cd my-platform
@@ -517,7 +539,6 @@ export default handleEvent(
517
539
  | `pf new` | Interactive creation wizard |
518
540
  | `pf new workspace <name>` | Scaffold a complete platform monorepo |
519
541
  | `pf setup --ai` | Configure AI provider (OpenAI or Anthropic) |
520
- | `pf dev` | Start development mode with auto-reload |
521
542
 
522
543
  ### Service Commands
523
544
 
@@ -601,9 +622,9 @@ Configure these secrets in your repository settings (`Settings` → `Secrets and
601
622
  | `GHCR_TOKEN` | GitHub Container Registry PAT | Docker image publishing |
602
623
 
603
624
  **Get tokens:**
604
- - **Pulumi:** https://app.pulumi.com/account/tokens
605
- - **DigitalOcean:** https://cloud.digitalocean.com/account/api/tokens
606
- - **npm:** https://www.npmjs.com/settings/~/tokens
625
+ - **Pulumi:** [Create access token](https://app.pulumi.com/account/tokens)
626
+ - **DigitalOcean:** [Generate API token](https://cloud.digitalocean.com/account/api/tokens)
627
+ - **npm:** [Create access token](https://www.npmjs.com/settings/~/tokens)
607
628
 
608
629
  <br />
609
630
 
@@ -611,10 +632,10 @@ Configure these secrets in your repository settings (`Settings` → `Secrets and
611
632
 
612
633
  ## 📚 Requirements
613
634
 
614
- - Node.js 21
615
- - Bun (latest)
616
- - Pulumi CLI
617
- - Docker (for local NATS)
635
+ - **[Bun](https://bun.sh)** (latest) — recommended for best performance
636
+ - **Node.js** ≥ 21 — supported as fallback (npm/yarn/pnpm)
637
+ - **[Pulumi CLI](https://www.pulumi.com/docs/install/)** — for infrastructure deployment
638
+ - **[Docker](https://www.docker.com/)** — required for local NATS. Without Docker, you can still scaffold/build
618
639
 
619
640
 
620
641
  ---