bunkit-cli 0.4.0 → 0.4.2

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 (2) hide show
  1. package/dist/index.js +85 -33
  2. package/package.json +6 -4
package/dist/index.js CHANGED
@@ -11027,9 +11027,6 @@ var {
11027
11027
  Help
11028
11028
  } = import__.default;
11029
11029
 
11030
- // ../../node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs
11031
- import { stripVTControlCharacters as S2 } from "util";
11032
-
11033
11030
  // ../../node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
11034
11031
  var import_sisteransi = __toESM(require_src(), 1);
11035
11032
  var import_picocolors = __toESM(require_picocolors(), 1);
@@ -11578,21 +11575,6 @@ ${import_picocolors2.default.cyan(d2)}
11578
11575
  }
11579
11576
  } }).prompt();
11580
11577
  };
11581
- var Me = (t = "", n = "") => {
11582
- const r2 = `
11583
- ${t}
11584
- `.split(`
11585
- `), i = S2(n).length, s = Math.max(r2.reduce((a, l2) => {
11586
- const $2 = S2(l2);
11587
- return $2.length > a ? $2.length : a;
11588
- }, 0), i) + 2, c = r2.map((a) => `${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(a)}${" ".repeat(s - S2(a).length)}${import_picocolors2.default.gray(o)}`).join(`
11589
- `);
11590
- process.stdout.write(`${import_picocolors2.default.gray(o)}
11591
- ${import_picocolors2.default.green(C)} ${import_picocolors2.default.reset(n)} ${import_picocolors2.default.gray(_2.repeat(Math.max(s - i - 1, 1)) + me)}
11592
- ${c}
11593
- ${import_picocolors2.default.gray(de + _2.repeat(s + 2) + pe)}
11594
- `);
11595
- };
11596
11578
  var xe = (t = "") => {
11597
11579
  process.stdout.write(`${import_picocolors2.default.gray(d2)} ${import_picocolors2.default.red(t)}
11598
11580
 
@@ -24401,6 +24383,7 @@ coverage = true
24401
24383
  // ../templates/src/builders/full.ts
24402
24384
  async function buildFullPreset(projectPath, context) {
24403
24385
  await ensureDirectory(join(projectPath, "apps/web"));
24386
+ await ensureDirectory(join(projectPath, "apps/platform"));
24404
24387
  await ensureDirectory(join(projectPath, "apps/api"));
24405
24388
  await ensureDirectory(join(projectPath, "packages/types"));
24406
24389
  await ensureDirectory(join(projectPath, "packages/utils"));
@@ -24424,7 +24407,7 @@ async function buildFullPreset(projectPath, context) {
24424
24407
  catalog: {
24425
24408
  react: "^19.1.0",
24426
24409
  "react-dom": "^19.1.0",
24427
- next: "^15.5.6",
24410
+ next: "^16.0.0",
24428
24411
  hono: "^4.7.12"
24429
24412
  }
24430
24413
  };
@@ -24441,7 +24424,7 @@ coverage = true
24441
24424
  version: "0.0.0",
24442
24425
  private: true,
24443
24426
  scripts: {
24444
- dev: "next dev --turbopack",
24427
+ dev: "next dev",
24445
24428
  build: "next build",
24446
24429
  start: "next start"
24447
24430
  },
@@ -24459,6 +24442,29 @@ coverage = true
24459
24442
  }
24460
24443
  };
24461
24444
  await writeFile(join(projectPath, "apps/web/package.json"), JSON.stringify(webPackageJson, null, 2));
24445
+ const platformPackageJson = {
24446
+ name: `@${context.packageName}/platform`,
24447
+ version: "0.0.0",
24448
+ private: true,
24449
+ scripts: {
24450
+ dev: "next dev --port 3001",
24451
+ build: "next build",
24452
+ start: "next start --port 3001"
24453
+ },
24454
+ dependencies: {
24455
+ react: "catalog:",
24456
+ "react-dom": "catalog:",
24457
+ next: "catalog:",
24458
+ [`@${context.packageName}/types`]: "workspace:*"
24459
+ },
24460
+ devDependencies: {
24461
+ "@types/react": "^19.1.0",
24462
+ "@types/react-dom": "^19.1.0",
24463
+ "@types/node": "^22.10.6",
24464
+ typescript: "^5.7.2"
24465
+ }
24466
+ };
24467
+ await writeFile(join(projectPath, "apps/platform/package.json"), JSON.stringify(platformPackageJson, null, 2));
24462
24468
  const apiPackageJson = {
24463
24469
  name: `@${context.packageName}/api`,
24464
24470
  version: "0.0.0",
@@ -24503,20 +24509,39 @@ export interface ApiResponse<T = unknown> {
24503
24509
  await writeFile(join(projectPath, "packages/types/src/index.ts"), typesContent);
24504
24510
  const readmeContent = `# ${context.projectName}
24505
24511
 
24506
- Full-stack monorepo created with [bunkit](https://github.com/Arakiss/bunkit) \uD83C\uDF5E
24512
+ Enterprise-grade SaaS monorepo created with [bunkit](https://github.com/Arakiss/bunkit) \uD83C\uDF5E
24507
24513
 
24508
24514
  ## Structure
24509
24515
 
24510
24516
  \`\`\`
24511
24517
  ${context.projectName}/
24512
24518
  \u251C\u2500\u2500 apps/
24513
- \u2502 \u251C\u2500\u2500 web/ # Next.js frontend
24514
- \u2502 \u2514\u2500\u2500 api/ # Hono backend
24519
+ \u2502 \u251C\u2500\u2500 web/ # Customer-facing app (landing, marketing)
24520
+ \u2502 \u251C\u2500\u2500 platform/ # Dashboard/Admin panel (port 3001)
24521
+ \u2502 \u2514\u2500\u2500 api/ # Backend API (Hono)
24515
24522
  \u2514\u2500\u2500 packages/
24516
- \u251C\u2500\u2500 types/ # Shared types
24523
+ \u251C\u2500\u2500 types/ # Shared TypeScript types
24517
24524
  \u2514\u2500\u2500 utils/ # Shared utilities
24518
24525
  \`\`\`
24519
24526
 
24527
+ ## The Enterprise SaaS Trifecta
24528
+
24529
+ This monorepo follows the proven enterprise pattern:
24530
+
24531
+ 1. **web** (\`localhost:3000\`) - Public-facing customer app
24532
+ - Landing pages, marketing content, blog
24533
+ - Optimized for SEO and conversion
24534
+
24535
+ 2. **platform** (\`localhost:3001\`) - Internal dashboard
24536
+ - Admin panel, user management
24537
+ - Analytics, settings, configuration
24538
+ - Authenticated access only
24539
+
24540
+ 3. **api** (\`localhost:3001/api\`) - Backend services
24541
+ - REST API with Hono
24542
+ - Database operations, business logic
24543
+ - Shared across web and platform
24544
+
24520
24545
  ## Getting Started
24521
24546
 
24522
24547
  \`\`\`bash
@@ -24528,8 +24553,16 @@ bun dev
24528
24553
 
24529
24554
  - \`bun dev\` - Start all apps in development mode
24530
24555
  - \`bun build\` - Build all apps for production
24531
- - \`bun lint\` - Lint all code
24532
- - \`bun format\` - Format all code
24556
+ - \`bun lint\` - Lint all code with Biome
24557
+ - \`bun format\` - Format all code with Biome
24558
+
24559
+ ## Individual Apps
24560
+
24561
+ \`\`\`bash
24562
+ cd apps/web && bun dev # Start customer-facing app
24563
+ cd apps/platform && bun dev # Start admin dashboard
24564
+ cd apps/api && bun dev # Start backend API
24565
+ \`\`\`
24533
24566
 
24534
24567
  ---
24535
24568
 
@@ -24723,12 +24756,20 @@ async function initCommand(options = {}) {
24723
24756
  return "\uD83C\uDF5E";
24724
24757
  }
24725
24758
  };
24726
- Me([
24727
- `${import_picocolors4.default.cyan("cd")} ${projectName}`,
24728
- shouldInstall ? "" : `${import_picocolors4.default.cyan("bun install")}`,
24729
- `${import_picocolors4.default.cyan(getDevCommand())} ${import_picocolors4.default.dim("# Start development")}`
24759
+ const nextSteps = [
24760
+ `${source_default.cyan("cd")} ${projectName}`,
24761
+ shouldInstall ? "" : `${source_default.cyan("bun install")}`,
24762
+ `${source_default.cyan(getDevCommand())} ${source_default.dim("# Start development")}`
24730
24763
  ].filter(Boolean).join(`
24731
- `), `${getPresetEmoji()} Next steps`);
24764
+ `);
24765
+ console.log(`
24766
+ ` + boxen(nextSteps, {
24767
+ padding: 1,
24768
+ title: `${getPresetEmoji()} Next steps`,
24769
+ titleAlignment: "left",
24770
+ borderColor: "cyan",
24771
+ borderStyle: "round"
24772
+ }));
24732
24773
  } catch (error) {
24733
24774
  s.stop("\u274C Failed to create project");
24734
24775
  xe(`${import_picocolors4.default.red("Error:")} ${error.message}`);
@@ -24754,8 +24795,19 @@ async function createCommand2(preset, name, options) {
24754
24795
  s.start(`Creating ${preset} project: ${name}`);
24755
24796
  await new Promise((resolve2) => setTimeout(resolve2, 1500));
24756
24797
  s.stop(`Project ${name} created!`);
24757
- Me([`cd ${name}`, preset === "web" ? "bun dev" : "bun run dev"].join(`
24758
- `), "Next steps");
24798
+ const nextSteps = [
24799
+ `${source_default.cyan("cd")} ${name}`,
24800
+ source_default.cyan(preset === "web" ? "bun dev" : "bun run dev")
24801
+ ].join(`
24802
+ `);
24803
+ console.log(`
24804
+ ` + boxen(nextSteps, {
24805
+ padding: 1,
24806
+ title: "\uD83D\uDCCB Next steps",
24807
+ titleAlignment: "left",
24808
+ borderColor: "cyan",
24809
+ borderStyle: "round"
24810
+ }));
24759
24811
  }
24760
24812
 
24761
24813
  // src/commands/add.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunkit-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Beautiful CLI for creating production-ready Bun projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,12 +29,14 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@clack/prompts": "^0.11.0",
32
- "picocolors": "^1.1.1",
32
+ "boxen": "^8.0.1",
33
+ "chalk": "^5.4.1",
33
34
  "commander": "^14.0.1",
34
- "execa": "^9.6.0",
35
35
  "consola": "^3.2.3",
36
+ "defu": "^6.1.4",
37
+ "execa": "^9.6.0",
36
38
  "pathe": "^1.1.2",
37
- "defu": "^6.1.4"
39
+ "picocolors": "^1.1.1"
38
40
  },
39
41
  "devDependencies": {
40
42
  "@bunkit/core": "workspace:*",