create-blaze 0.2.0 → 0.3.0

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 +110 -0
  2. package/dist/index.js +73 -2
  3. package/package.json +5 -1
package/README.md ADDED
@@ -0,0 +1,110 @@
1
+ <div align="center">
2
+
3
+ <img src="https://s6.imgcdn.dev/Y2Bbiu.png" alt="blazestack" width="200" />
4
+
5
+ <h3>create-blaze</h3>
6
+ <p>Scaffold a new <a href="https://github.com/Alshahriah/blazestack">blazestack</a> project in seconds.</p>
7
+
8
+ [![npm version](https://img.shields.io/npm/v/create-blaze?style=for-the-badge&logo=npm&logoColor=white&color=f97316)](https://www.npmjs.com/package/create-blaze)
9
+ [![npm downloads](https://img.shields.io/npm/dm/create-blaze?style=for-the-badge&logo=npm&logoColor=white&color=f97316)](https://www.npmjs.com/package/create-blaze)
10
+ [![License](https://img.shields.io/github/license/Alshahriah/blazestack?style=for-the-badge&logo=opensourceinitiative&logoColor=white&color=22c55e)](https://github.com/Alshahriah/blazestack/blob/main/LICENSE)
11
+ [![Bun](https://img.shields.io/badge/Bun-1.1+-000000?style=for-the-badge&logo=bun&logoColor=white)](https://bun.sh)
12
+
13
+ ```bash
14
+ npx create-blaze my-app
15
+ ```
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## Usage
22
+
23
+ ```bash
24
+ # With a name
25
+ npx create-blaze my-app
26
+
27
+ # Without a name — defaults to my-blazestack-app
28
+ # Auto-increments if the directory already exists
29
+ npx create-blaze
30
+ ```
31
+
32
+ ## What it does
33
+
34
+ 1. Downloads the latest blazestack template from GitHub
35
+ 2. Copies it to `./<project-name>/`
36
+ 3. Renames all package references to match your project name
37
+ 4. Prints next steps
38
+
39
+ ## Next steps after scaffolding
40
+
41
+ ```bash
42
+ cd my-app
43
+ bun install
44
+ cp apps/api/.dev.vars.example apps/api/.dev.vars
45
+ # Fill in DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL
46
+
47
+ bun db:setup && bun db:generate && bun db:migrate
48
+
49
+ bun dev:api # API → http://localhost:8787
50
+ bun dev:web # Web → http://localhost:5173
51
+ ```
52
+
53
+ ## What's in the scaffold
54
+
55
+ ```
56
+ my-app/
57
+ ├── apps/
58
+ │ ├── api/ Hono — Better Auth + tRPC (Cloudflare Workers)
59
+ │ ├── web/ React Router v7 SSR (Cloudflare Workers)
60
+ │ └── mobile/ Expo SDK 55 — iOS + Android
61
+ └── packages/
62
+ ├── auth/ Better Auth factory
63
+ ├── db/ Drizzle ORM + PostgreSQL
64
+ ├── env/ Zod-validated env vars
65
+ ├── trpc/ Shared tRPC v11 router
66
+ └── ui/ Shared UI components (web + native)
67
+ ```
68
+
69
+ ## Stack
70
+
71
+ <table>
72
+ <tr>
73
+ <td><img src="https://img.shields.io/badge/Bun-000000?style=flat-square&logo=bun&logoColor=white" /></td>
74
+ <td>Runtime & package manager</td>
75
+ </tr>
76
+ <tr>
77
+ <td><img src="https://img.shields.io/badge/Hono-E36002?style=flat-square&logo=hono&logoColor=white" /></td>
78
+ <td>API on Cloudflare Workers</td>
79
+ </tr>
80
+ <tr>
81
+ <td><img src="https://img.shields.io/badge/React_Router_v7-CA4245?style=flat-square&logo=reactrouter&logoColor=white" /></td>
82
+ <td>SSR web app on Cloudflare Workers</td>
83
+ </tr>
84
+ <tr>
85
+ <td><img src="https://img.shields.io/badge/Expo-000020?style=flat-square&logo=expo&logoColor=white" /></td>
86
+ <td>iOS + Android (SDK 55 / RN 0.84)</td>
87
+ </tr>
88
+ <tr>
89
+ <td><img src="https://img.shields.io/badge/Better_Auth-000000?style=flat-square&logo=auth0&logoColor=white" /></td>
90
+ <td>Authentication & sessions</td>
91
+ </tr>
92
+ <tr>
93
+ <td><img src="https://img.shields.io/badge/Drizzle_ORM-C5F74F?style=flat-square&logo=drizzle&logoColor=black" /></td>
94
+ <td>PostgreSQL ORM + migrations</td>
95
+ </tr>
96
+ <tr>
97
+ <td><img src="https://img.shields.io/badge/tRPC_v11-2596BE?style=flat-square&logo=trpc&logoColor=white" /></td>
98
+ <td>End-to-end type-safe API — no codegen</td>
99
+ </tr>
100
+ <tr>
101
+ <td><img src="https://img.shields.io/badge/Cloudflare_Workers-F38020?style=flat-square&logo=cloudflare&logoColor=white" /></td>
102
+ <td>Deploy target for API + web</td>
103
+ </tr>
104
+ </table>
105
+
106
+ ---
107
+
108
+ ## Full documentation
109
+
110
+ See the [blazestack repo](https://github.com/Alshahriah/blazestack) for full documentation.
package/dist/index.js CHANGED
@@ -3262,8 +3262,20 @@ var So = (s3) => {
3262
3262
  var REPO_OWNER = "Alshahriah";
3263
3263
  var REPO_NAME = "blazestack";
3264
3264
  var REPO_BRANCH = "main";
3265
- var VERSION = "0.2.0";
3266
- var EXCLUDE = new Set(["node_modules", ".git", "bun.lock", "packages/create-blaze"]);
3265
+ var VERSION = "0.3.0";
3266
+ var EXCLUDE = new Set([
3267
+ "node_modules",
3268
+ ".git",
3269
+ "bun.lock",
3270
+ "packages/create-blaze",
3271
+ "docs",
3272
+ "assets",
3273
+ ".vscode",
3274
+ "scripts",
3275
+ "CODE_OF_CONDUCT.md",
3276
+ "CONTRIBUTING.md",
3277
+ "README.md"
3278
+ ]);
3267
3279
  var EXCLUDE_FILES = new Set([".github/workflows/publish.yml"]);
3268
3280
  var TEXT_EXTENSIONS = new Set([
3269
3281
  ".ts",
@@ -3358,6 +3370,64 @@ function download(url, dest) {
3358
3370
  request(url);
3359
3371
  });
3360
3372
  }
3373
+ function generateReadme(name) {
3374
+ return `# ${name}
3375
+
3376
+ Scaffolded with [create-blaze](https://github.com/Alshahriah/blazestack) — a full-stack Bun monorepo with end-to-end type safety.
3377
+
3378
+ ## Stack
3379
+
3380
+ - **API** — Hono on Cloudflare Workers
3381
+ - **Web** — React Router v7 SSR on Cloudflare Workers
3382
+ - **Mobile** — Expo SDK 55 (iOS + Android)
3383
+ - **Auth** — Better Auth
3384
+ - **Database** — Drizzle ORM + PostgreSQL
3385
+ - **RPC** — tRPC v11 (no codegen)
3386
+
3387
+ ## Getting started
3388
+
3389
+ \`\`\`bash
3390
+ bun install
3391
+ cp apps/api/.dev.vars.example apps/api/.dev.vars
3392
+ # Fill in DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL
3393
+
3394
+ bun db:setup && bun db:generate && bun db:migrate
3395
+
3396
+ bun dev:api # API → http://localhost:8787
3397
+ bun dev:web # Web → http://localhost:5173
3398
+ bun dev:mobile # Mobile (optional)
3399
+ \`\`\`
3400
+
3401
+ ## Structure
3402
+
3403
+ \`\`\`
3404
+ ${name}/
3405
+ ├── apps/
3406
+ │ ├── api/ Hono API — auth + tRPC
3407
+ │ ├── web/ React Router v7 SSR
3408
+ │ └── mobile/ Expo — iOS + Android
3409
+ └── packages/
3410
+ ├── auth/ Better Auth factory
3411
+ ├── db/ Drizzle schema + migrations
3412
+ ├── env/ Zod-validated env vars
3413
+ ├── trpc/ Shared tRPC router
3414
+ └── ui/ Shared components (web + native)
3415
+ \`\`\`
3416
+
3417
+ ## Commands
3418
+
3419
+ \`\`\`bash
3420
+ bun dev:api # Start API
3421
+ bun dev:web # Start web app
3422
+ bun dev:mobile # Start mobile app
3423
+ bun db:generate # Generate migrations
3424
+ bun db:migrate # Run migrations
3425
+ bun db:studio # Open Drizzle Studio
3426
+ bun lint # Lint check
3427
+ bun lint:fix # Auto-fix lint
3428
+ \`\`\`
3429
+ `;
3430
+ }
3361
3431
  function dirExists(p2) {
3362
3432
  try {
3363
3433
  statSync(p2);
@@ -3446,6 +3516,7 @@ async function main() {
3446
3516
  }
3447
3517
  }
3448
3518
  stepDone();
3519
+ writeFileSync(join(targetDir, "README.md"), generateReadme(safeName), "utf8");
3449
3520
  } catch (err) {
3450
3521
  stepFail();
3451
3522
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-blaze",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Create a new blazestack project",
5
5
  "keywords": [
6
6
  "blazestack",
@@ -20,6 +20,10 @@
20
20
  },
21
21
  "license": "MIT",
22
22
  "type": "module",
23
+ "files": [
24
+ "dist",
25
+ "README.md"
26
+ ],
23
27
  "bin": {
24
28
  "create-blaze": "dist/index.js"
25
29
  },