@pylonsync/create-pylon 0.3.351 → 0.3.353

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 (69) hide show
  1. package/bin/create-pylon.js +42 -24
  2. package/package.json +1 -1
  3. /package/templates/{default → saas}/.env.example +0 -0
  4. /package/templates/{default → saas}/AGENTS.md +0 -0
  5. /package/templates/{default → saas}/CLAUDE.md +0 -0
  6. /package/templates/{default → saas}/README.md +0 -0
  7. /package/templates/{default → saas}/app/auth-form.tsx +0 -0
  8. /package/templates/{default → saas}/app/auth-shell.tsx +0 -0
  9. /package/templates/{default → saas}/app/company/[slug]/page.tsx +0 -0
  10. /package/templates/{default → saas}/app/compare/[slug]/page.tsx +0 -0
  11. /package/templates/{default → saas}/app/dashboard/billing/page.tsx +0 -0
  12. /package/templates/{default → saas}/app/dashboard/dashboard-client.tsx +0 -0
  13. /package/templates/{default → saas}/app/dashboard/members/page.tsx +0 -0
  14. /package/templates/{default → saas}/app/dashboard/page.tsx +0 -0
  15. /package/templates/{default → saas}/app/dashboard/projects/page.tsx +0 -0
  16. /package/templates/{default → saas}/app/dashboard/provision-workspace.tsx +0 -0
  17. /package/templates/{default → saas}/app/dashboard/settings/page.tsx +0 -0
  18. /package/templates/{default → saas}/app/error.tsx +0 -0
  19. /package/templates/{default → saas}/app/globals.css +0 -0
  20. /package/templates/{default → saas}/app/layout.tsx +0 -0
  21. /package/templates/{default → saas}/app/login/page.tsx +0 -0
  22. /package/templates/{default → saas}/app/not-found.tsx +0 -0
  23. /package/templates/{default → saas}/app/page.tsx +0 -0
  24. /package/templates/{default → saas}/app/products/[slug]/page.tsx +0 -0
  25. /package/templates/{default → saas}/app/resources/[slug]/page.tsx +0 -0
  26. /package/templates/{default → saas}/app/robots.ts +0 -0
  27. /package/templates/{default → saas}/app/signup/page.tsx +0 -0
  28. /package/templates/{default → saas}/app/sitemap.ts +0 -0
  29. /package/templates/{default → saas}/app/solutions/[slug]/page.tsx +0 -0
  30. /package/templates/{default → saas}/app.ts +0 -0
  31. /package/templates/{default → saas}/bunfig +0 -0
  32. /package/templates/{default → saas}/components/dashboard-shell.tsx +0 -0
  33. /package/templates/{default → saas}/components/marketing.tsx +0 -0
  34. /package/templates/{default → saas}/components/ui/badge.tsx +0 -0
  35. /package/templates/{default → saas}/components/ui/button.tsx +0 -0
  36. /package/templates/{default → saas}/components/ui/card.tsx +0 -0
  37. /package/templates/{default → saas}/components/ui/dialog.tsx +0 -0
  38. /package/templates/{default → saas}/components/ui/input.tsx +0 -0
  39. /package/templates/{default → saas}/components/ui/label.tsx +0 -0
  40. /package/templates/{default → saas}/components/ui/select.tsx +0 -0
  41. /package/templates/{default → saas}/components/ui/table.tsx +0 -0
  42. /package/templates/{default → saas}/components/ui/textarea.tsx +0 -0
  43. /package/templates/{default → saas}/components.json +0 -0
  44. /package/templates/{default → saas}/functions/_pylonStripeFindActiveSubForReference.ts +0 -0
  45. /package/templates/{default → saas}/functions/_pylonStripeFindByCustomerId.ts +0 -0
  46. /package/templates/{default → saas}/functions/_pylonStripeGetCustomerHolder.ts +0 -0
  47. /package/templates/{default → saas}/functions/_pylonStripeListSubsForReference.ts +0 -0
  48. /package/templates/{default → saas}/functions/_pylonStripeOrgMembership.ts +0 -0
  49. /package/templates/{default → saas}/functions/_pylonStripeSetCustomerId.ts +0 -0
  50. /package/templates/{default → saas}/functions/_pylonStripeUpsertSubscription.ts +0 -0
  51. /package/templates/{default → saas}/functions/cancelSubscription.ts +0 -0
  52. /package/templates/{default → saas}/functions/createBillingPortalSession.ts +0 -0
  53. /package/templates/{default → saas}/functions/createCheckoutSession.ts +0 -0
  54. /package/templates/{default → saas}/functions/restoreSubscription.ts +0 -0
  55. /package/templates/{default → saas}/functions/stripeWebhook.ts +0 -0
  56. /package/templates/{default → saas}/functions/updateProject.ts +0 -0
  57. /package/templates/{default → saas}/gitignore +0 -0
  58. /package/templates/{default → saas}/lib/billing.ts +0 -0
  59. /package/templates/{default → saas}/lib/products.ts +0 -0
  60. /package/templates/{default → saas}/lib/projects.ts +0 -0
  61. /package/templates/{default → saas}/lib/site.config.ts +0 -0
  62. /package/templates/{default → saas}/lib/site.ts +0 -0
  63. /package/templates/{default → saas}/lib/utils.ts +0 -0
  64. /package/templates/{default → saas}/package.json +0 -0
  65. /package/templates/{default → saas}/tests/button.test.tsx +0 -0
  66. /package/templates/{default → saas}/tests/example.test.ts +0 -0
  67. /package/templates/{default → saas}/tests/projects.test.ts +0 -0
  68. /package/templates/{default → saas}/tests/setup.ts +0 -0
  69. /package/templates/{default → saas}/tsconfig.json +0 -0
@@ -6,7 +6,7 @@
6
6
  * yarn/pnpm/bun create @pylonsync/pylon).
7
7
  *
8
8
  * Picks one or more platforms (web, mobile, expo) and a template
9
- * (barebones, todo, …). Each platform shares the same Pylon backend
9
+ * (barebones by default, saas to build a product, todo, …). Each platform shares the same Pylon backend
10
10
  * under apps/api so `bun run dev` brings the whole project up.
11
11
  *
12
12
  * Templates live as real files under ../templates/<scope>/<template>.
@@ -76,9 +76,9 @@ const PYLON_VERSION = JSON.parse(
76
76
  const PLATFORMS_AVAILABLE = ["web", "vite", "ios", "mac", "expo"];
77
77
 
78
78
  const TEMPLATE_REGISTRY = {
79
- default: {
79
+ barebones: {
80
80
  blurb:
81
- "SaaS starter server-rendered marketing landing + multi-tenant dashboard (orgs, members, tenant-scoped data). One app, one port, no Next.js.",
81
+ "Single entity, live list + optimistic create. The smallest SSR app, one port. THE DEFAULT.",
82
82
  // `unified` templates are a single Pylon app (app.ts + app/ routes +
83
83
  // functions/), NOT a monorepo of apps/api + apps/web. `pylon dev`
84
84
  // serves the SSR frontend and the API from one port. They take no
@@ -86,9 +86,9 @@ const TEMPLATE_REGISTRY = {
86
86
  platforms: [],
87
87
  unified: true,
88
88
  },
89
- barebones: {
89
+ saas: {
90
90
  blurb:
91
- "Single entity, live list + optimistic create. The smallest SSR app, one port.",
91
+ "SaaS starter server-rendered marketing landing + multi-tenant dashboard (orgs, members, tenant-scoped data), auth, billing. Reach for this to build a product.",
92
92
  platforms: [],
93
93
  unified: true,
94
94
  },
@@ -122,12 +122,6 @@ const TEMPLATE_REGISTRY = {
122
122
  platforms: [],
123
123
  unified: true,
124
124
  },
125
- saas: {
126
- blurb:
127
- "SaaS app — marketing landing + multi-tenant dashboard (orgs, members, tenant-scoped data). The 'saas' archetype; identical to the default template.",
128
- platforms: [],
129
- unified: true,
130
- },
131
125
  restaurant: {
132
126
  blurb:
133
127
  "Restaurant — menu + reservations with LIVE table availability (each seating shows tables-left, greys to 'Full' instantly) + owner dashboard. One SSR app.",
@@ -209,6 +203,32 @@ const TEMPLATE_REGISTRY = {
209
203
  };
210
204
  const TEMPLATES_AVAILABLE = Object.keys(TEMPLATE_REGISTRY);
211
205
 
206
+ /**
207
+ * What you get when you don't choose.
208
+ *
209
+ * The smallest thing that runs, deliberately. Scaffolding somebody straight
210
+ * into a multi-tenant SaaS app — orgs, members, billing, a marketing site —
211
+ * means most of what they read on day one is scaffolding they didn't ask for
212
+ * and have to delete. Reach for `saas` when you're actually building a
213
+ * product; that's what it's for.
214
+ */
215
+ const DEFAULT_TEMPLATE = "barebones";
216
+
217
+ /**
218
+ * Retired template names, kept working so existing scripts and docs don't
219
+ * break. `ssr` was the original name of the full-stack starter; `default` was
220
+ * its name while it WAS the default — it isn't any more, and a template
221
+ * literally called "default" that you don't get by default is worse than a
222
+ * rename.
223
+ */
224
+ const TEMPLATE_ALIASES = {
225
+ ssr: "saas",
226
+ default: "saas",
227
+ };
228
+
229
+ const resolveTemplate = (name) =>
230
+ TEMPLATE_ALIASES[name] ?? name;
231
+
212
232
  // ---------------------------------------------------------------------------
213
233
  // CLI args + interactive prompts
214
234
  // ---------------------------------------------------------------------------
@@ -267,7 +287,8 @@ ${tmplLines.join("\n")}
267
287
  --skip-install scaffold only, don't run install
268
288
 
269
289
  Examples:
270
- npm create @pylonsync/pylon my-app # default — SaaS landing + multi-tenant dashboard
290
+ npm create @pylonsync/pylon my-app # default — the smallest SSR app that runs
291
+ npm create @pylonsync/pylon my-app --template saas # building a product? start here: landing + orgs + billing
271
292
  npm create @pylonsync/pylon my-app --template todo # live, optimistic todo (SSR, one port)
272
293
  npm create @pylonsync/pylon my-app --template chat # realtime live chat room
273
294
  npm create @pylonsync/pylon my-app --template waitlist # coming-soon landing + live signup counter
@@ -304,29 +325,26 @@ if (!projectName) {
304
325
  if (!flags.template) {
305
326
  if (isInteractive) {
306
327
  const lines = Object.entries(TEMPLATE_REGISTRY)
307
- .map(([k, v]) => ` ${k.padEnd(10)} ${v.blurb}`)
328
+ .map(([k, v]) => ` ${k.padEnd(13)} ${v.blurb}`)
308
329
  .join("\n");
309
330
  process.stdout.write(`\n${lines}\n`);
310
331
  const ans = (
311
332
  await rl.question(
312
- `Template (${TEMPLATES_AVAILABLE.join(", ")}) [default]: `,
333
+ `Template (${TEMPLATES_AVAILABLE.join(", ")}) [${DEFAULT_TEMPLATE}]: `,
313
334
  )
314
335
  )
315
336
  .trim()
316
337
  .toLowerCase();
317
- flags.template = TEMPLATES_AVAILABLE.includes(ans) ? ans : "default";
338
+ const picked = resolveTemplate(ans);
339
+ flags.template = TEMPLATES_AVAILABLE.includes(picked)
340
+ ? picked
341
+ : DEFAULT_TEMPLATE;
318
342
  } else {
319
- console.log("Non-interactive stdin — using --template default.");
320
- flags.template = "default";
343
+ console.log(`Non-interactive stdin — using --template ${DEFAULT_TEMPLATE}.`);
344
+ flags.template = DEFAULT_TEMPLATE;
321
345
  }
322
346
  }
323
- // `ssr` was the original name of the default template; keep it working as a
324
- // quiet alias so older `--template ssr` invocations don't break.
325
- if (flags.template === "ssr") flags.template = "default";
326
- // `saas` is the archetype NAME for the default template (a SaaS landing +
327
- // multi-tenant dashboard). It scaffolds the exact same app as `default`; we
328
- // alias rather than duplicate the whole tree so there's one source of truth.
329
- if (flags.template === "saas") flags.template = "default";
347
+ flags.template = resolveTemplate(flags.template);
330
348
  // `unified` templates (default) are a single app, not a monorepo — they take
331
349
  // no platforms. Skip the platform prompt + validation for them entirely.
332
350
  const isUnified = TEMPLATE_REGISTRY[flags.template]?.unified === true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pylonsync/create-pylon",
3
- "version": "0.3.351",
3
+ "version": "0.3.353",
4
4
  "description": "Scaffold a new Pylon app — realtime backend + web/mobile/expo frontends in one command. Run via `npm create @pylonsync/pylon@latest`.",
5
5
  "publishConfig": {
6
6
  "access": "public"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes