create-caspian-store
v0.2.1
Published
One-command scaffolder for @caspian-explorer/script-caspian-store. Enables `npm create caspian-store@latest <project-dir>`.
Maintainers
Readme
create-caspian-store
One-command scaffolder for @caspian-explorer/script-caspian-store — a framework-agnostic React e-commerce storefront + admin panel.
Usage
npm create caspian-store@latest my-shop
cd my-shop
npm install
cp .env.example .env.local # fill in Firebase config
npm run dev # http://localhost:3000Options
All flags are forwarded to the underlying scaffolder:
--package-tag vX.Y.Z— pin the generated project to a specific release (default: latest main)--with-stripe— also scaffold the Stripe Cloud Functions tree intofunctions-stripe/--with-email— also scaffold the transactional-email Cloud Functions tree intofunctions-email/(v8.0.0+ requiresfirebase functions:secrets:set CASPIAN_EMAIL_<PROVIDER>_API_KEYbefore first deploy)--with-functions— deprecated alias for--with-stripe, kept for back-compat--no-apphosting— suppressapphosting.yamlin the output. Set this when deploying to Vercel so the unused file doesn't sit in your repo.--force— scaffold into a non-empty directory (.git,.gitignore,README.md,LICENSEare preserved automatically)
What gets scaffolded
- Next.js 15 App Router project with every storefront, auth, content, and admin route pre-mounted
- Next.js adapter code (
Link,Image,useNavigation) for the package - Real
firestore.rules,firestore.indexes.json,storage.rulesdeployable viafirebase deploy --only firestore:rules,firestore:indexes,storage .env.examplewith Firebase web config + Stripe publishable key placeholders, plus a runtime preflight inproviders.tsxthat throws a clear error if anyNEXT_PUBLIC_FIREBASE_*is missing on first runpackage.jsonscripts fordev,typecheck,firebase:seed,grant-admin,deploy:admin,deploy:email,deploy:stripe- Self-update route that POSTs to the library's hardened handler (v8.0.0+ runs
npm installwith--ignore-scriptsand is gated byCASPIAN_ALLOW_SELF_UPDATE=true)
How it works
This package is a thin launcher. It clones the main script-caspian-store repo into a temporary directory, runs the scaffolder inside it against your target directory, then removes the clone.
Requires git on PATH and Node ≥ 18.
Links
- Main repo: https://github.com/Caspian-Explorer/script-caspian-store
- INSTALL guide: https://github.com/Caspian-Explorer/script-caspian-store/blob/main/INSTALL.md
- CHANGELOG: https://github.com/Caspian-Explorer/script-caspian-store/blob/main/CHANGELOG.md
License
MIT © Caspian-Explorer
