create-shopify-firebase-app 1.1.0 → 1.1.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 (3) hide show
  1. package/README.md +49 -19
  2. package/lib/index.js +24 -9
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # create-shopify-firebase-app
2
2
 
3
- > Create Shopify apps powered by Firebase. One command. Zero framework. Fully serverless.
3
+ > Build and run Shopify apps for free. Pay nothing until you have real traffic. One command. Zero framework. Fully serverless.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/create-shopify-firebase-app.svg)](https://www.npmjs.com/package/create-shopify-firebase-app)
6
6
  [![Downloads](https://img.shields.io/npm/dm/create-shopify-firebase-app.svg)](https://www.npmjs.com/package/create-shopify-firebase-app)
@@ -38,11 +38,11 @@ One `npx` command scaffolds everything, installs dependencies, wires up Firebase
38
38
 
39
39
  ### Prerequisites
40
40
 
41
- | Tool | Install |
42
- |------|---------|
43
- | Node.js 18+ | [nodejs.org](https://nodejs.org/) |
44
- | Firebase CLI | `npm i -g firebase-tools` |
45
- | Shopify CLI *(optional)* | `npm i -g @shopify/cli` |
41
+ | Tool | Install | Auto-installed? |
42
+ |------|---------|----------------|
43
+ | Node.js 18+ | [nodejs.org](https://nodejs.org/) | Required |
44
+ | Firebase CLI | `npm i -g firebase-tools` | Yes, installed automatically if missing |
45
+ | Shopify CLI | `npm i -g @shopify/cli` | Yes, installed automatically if missing |
46
46
 
47
47
  ### 1. Create your Shopify app
48
48
 
@@ -117,7 +117,11 @@ shopify app dev
117
117
 
118
118
  ---
119
119
 
120
- ## Why Firebase instead of Remix?
120
+ ## Why Firebase?
121
+
122
+ **$0/month to run your Shopify app. No credit card. No server. No bill until you're big.**
123
+
124
+ Most Shopify app developers pay for hosting before they even have users. With Firebase, you deploy for free and only start paying when your app serves thousands of stores daily. Even at 50,000 installed stores, you're looking at ~$5/month. Try getting that from Vercel or Heroku.
121
125
 
122
126
  | | `shopify app init` (Remix) | `create-shopify-firebase-app` |
123
127
  |---|---|---|
@@ -128,7 +132,7 @@ shopify app dev
128
132
  | **Auth** | `@shopify/shopify-app-remix` | Manual OAuth (140 lines, you own it) |
129
133
  | **Build** | Webpack / Vite | `tsc` (TypeScript compiler, no bundler) |
130
134
  | **Deploy** | Varies | `firebase deploy` (one command) |
131
- | **Cost** | $5-25/month hosting | Free tier covers most apps |
135
+ | **Cost** | $5-25/month from day one | **$0/month** free until you scale |
132
136
  | **Framework knowledge** | Remix + React required | Express + HTML (that's it) |
133
137
  | **Scaling** | Single server | Per-function auto-scaling (Cloud Run) |
134
138
  | **GDPR webhooks** | Auto-handled | Included (ready for App Store) |
@@ -137,11 +141,11 @@ shopify app dev
137
141
 
138
142
  ### When to use this
139
143
 
144
+ - You want to **launch for free** and only pay when your app takes off
140
145
  - Custom apps for a single merchant
141
146
  - Public apps with simple admin UIs
142
147
  - Teams already using Firebase / Google Cloud
143
148
  - You want to understand every line of your app
144
- - You want free/cheap serverless hosting
145
149
 
146
150
  ### When to use Remix instead
147
151
 
@@ -401,19 +405,45 @@ export { dailyCleanup } from "./cleanup";
401
405
 
402
406
  ---
403
407
 
404
- ## Firebase Free Tier
408
+ ## How Many Stores Can You Run for Free?
409
+
410
+ Firebase's free tier is generous. Here's what it actually means for a Shopify app:
411
+
412
+ ### Per-store usage (typical Shopify app)
413
+
414
+ | Action | Function calls | Firestore reads | Firestore writes |
415
+ |--------|---------------|-----------------|------------------|
416
+ | Merchant opens admin dashboard | 5 | 5 | 0 |
417
+ | Webhooks (orders, inventory) | 5 | 5 | 2 |
418
+ | **Total per active store/day** | **~10** | **~10** | **~2** |
419
+
420
+ ### Free tier capacity
421
+
422
+ | Firebase Resource | Free Limit | Stores Supported |
423
+ |-------------------|-----------|-----------------|
424
+ | Cloud Functions | 2M invocations/month (~66K/day) | **~6,600 daily active stores** |
425
+ | Firestore reads | 50K/day | **~5,000 daily active stores** |
426
+ | Firestore writes | 20K/day | **~10,000 daily active stores** |
427
+ | Hosting bandwidth | 360 MB/day | **~7,000 page loads/day** (CDN-cached after first load) |
428
+
429
+ **Bottleneck: Firestore reads at ~5,000 daily active stores.**
430
+
431
+ Not every installed merchant opens your app daily. With a typical 20% daily active rate:
432
+
433
+ > **Free tier supports ~25,000 installed stores** with normal usage patterns. That's $0/month.
434
+
435
+ ### When you outgrow free (Blaze pay-as-you-go)
405
436
 
406
- The Spark (free) plan covers most Shopify apps:
437
+ | Installed Stores | Daily Active | Monthly Cost |
438
+ |-----------------|-------------|-------------|
439
+ | 1 - 25,000 | up to 5,000 | **$0 (free)** |
440
+ | 50,000 | ~10,000 | **~$5/month** |
441
+ | 100,000 | ~20,000 | **~$15/month** |
442
+ | 500,000 | ~100,000 | **~$80/month** |
407
443
 
408
- | Resource | Free Limit |
409
- |----------|-----------|
410
- | Cloud Functions | 2M invocations/month |
411
- | Firestore reads | 50K/day |
412
- | Firestore writes | 20K/day |
413
- | Hosting storage | 10 GB |
414
- | Hosting transfer | 360 MB/day |
444
+ Compare that to Vercel/Heroku at **$25-100/month from day one**, before you even have your first user.
415
445
 
416
- Need more? The Blaze plan (pay-as-you-go) costs most apps **under $5/month**.
446
+ No credit card required to start. No server to manage. No bill until you're successful.
417
447
 
418
448
  ---
419
449
 
package/lib/index.js CHANGED
@@ -352,8 +352,19 @@ export async function run(argv) {
352
352
  warn("Build failed — run manually: cd functions && npm run build");
353
353
  }
354
354
 
355
- // ── Step 4: Firebase provisioning ───────────────────────────────────
355
+ // ── Step 4: Firebase CLI ─────────────────────────────────────────────
356
356
  step(4, totalSteps, "Setting up Firebase...");
357
+ if (!hasCommand("firebase")) {
358
+ info("Firebase CLI not found — installing globally...");
359
+ try {
360
+ await exec("npm install -g firebase-tools");
361
+ ok("Firebase CLI installed");
362
+ } catch (e) {
363
+ warn("Could not install Firebase CLI automatically");
364
+ info("Install manually: npm i -g firebase-tools");
365
+ info(`Then run: cd ${config.projectName} && firebase use ${config.projectId}`);
366
+ }
367
+ }
357
368
  if (hasCommand("firebase")) {
358
369
  const isCI = args["api-key"] && args["api-secret"] && args["project-id"];
359
370
  await provisionFirebase(config, {
@@ -362,19 +373,22 @@ export async function run(argv) {
362
373
  nonInteractive: isCI,
363
374
  cwd: outputDir,
364
375
  });
365
- } else {
366
- warn("Firebase CLI not found. Install: npm i -g firebase-tools");
367
- info(`Then run: cd ${config.projectName} && firebase use ${config.projectId}`);
368
- info("After installing, re-run with --skip-provision to skip provisioning");
369
376
  }
370
377
 
371
- // ── Step 5: Shopify CLI check ─────────────────────────────────────
378
+ // ── Step 5: Shopify CLI ─────────────────────────────────────────────
372
379
  step(5, totalSteps, "Checking Shopify CLI...");
373
380
  if (hasCommand("shopify")) {
374
381
  ok("Shopify CLI detected — you can use `shopify app dev` for local development");
375
382
  } else {
376
- warn("Shopify CLI not found. Install: npm i -g @shopify/cli");
377
- info("Optional — you can also develop with Firebase emulators");
383
+ info("Shopify CLI not found installing globally...");
384
+ try {
385
+ await exec("npm install -g @shopify/cli");
386
+ ok("Shopify CLI installed");
387
+ } catch (e) {
388
+ warn("Could not install Shopify CLI automatically");
389
+ info("Install manually: npm i -g @shopify/cli");
390
+ info("Optional — you can also develop with Firebase emulators");
391
+ }
378
392
  }
379
393
 
380
394
  // ── Step 6: Initialize git ────────────────────────────────────────
@@ -483,7 +497,8 @@ function printHelp() {
483
497
  ✔ Firestore for sessions and app data
484
498
  ✔ App Bridge embedded admin dashboard (vanilla HTML/JS)
485
499
  ✔ Theme App Extension for storefront UI
486
- ✔ Firebase Hosting (free tier covers most apps)
500
+ ✔ Firebase Hosting ($0/month — free for up to 25K installed stores)
501
+ ✔ Auto-installs Firebase CLI + Shopify CLI if missing
487
502
  ✔ Auto-provisioning: Firestore, Web App, Hosting (interactive)
488
503
  `);
489
504
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-shopify-firebase-app",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Create Shopify apps powered by Firebase — serverless, lightweight, zero-framework. The official alternative to Remix for Shopify + Firebase developers.",
5
5
  "keywords": [
6
6
  "shopify",