CLI: Before You Start
This chapter covers preparation before you run any deployment commands. Do not skip it.
1. What you are deploying
Section titled “1. What you are deploying”ZShip is not a single-page project. It includes:
- 10 backend Workers
- 2 frontend apps (
webandadmin) - 9 D1 databases
- 1 KV namespace (payment service)
- 1 R2 bucket (CDN service)
You are deploying a Cloudflare-based system, not just one website.
2. Accounts you need
Section titled “2. Accounts you need”At minimum:
- A Cloudflare account
- A copy of the Git repository
- A machine with Node.js
Optional:
- Stripe account (for payments)
- Creem account (for Creem payments)
- Google OAuth app (for Google login)
3. How to get the source code
Section titled “3. How to get the source code”Option A: GitHub Fork
Section titled “Option A: GitHub Fork”- Fork the official template into your GitHub account or organization
- Clone your fork locally
Advantages: Keeps upstream relationship; easier to sync future updates.
Option B: Copy and create your own repo
Section titled “Option B: Copy and create your own repo”- Download the official code
- Create a new Git repository
- Push the code there
Advantages: Cleaner history; feels like your own project from day one.
We recommend GitHub Fork for long-term maintenance.
4. Install local tools
Section titled “4. Install local tools”Ensure you have:
- Node.js 22 or newer
- pnpm
- Git
Verify:
node -vpnpm -vgit --version5. Clone and install dependencies
Section titled “5. Clone and install dependencies”git clone <your-repository-url>cd zshippnpm install6. Log in to Wrangler
Section titled “6. Log in to Wrangler”npx wrangler loginAfter authorization, verify:
npx wrangler whoami7. Do not change on first deployment
Section titled “7. Do not change on first deployment”- Workers: Keep names like
zship-node1-auth,zship-node2-support, etc. - Pages: Keep
webandadmin - app_key: Use
demofirst; switch to your real key after the system works
8. Checklist
Section titled “8. Checklist”Before continuing, confirm:
- You have decided Fork vs. copy
- Repository is cloned locally
-
pnpm installcompleted -
npx wrangler loginandnpx wrangler whoamisucceed - You will keep default service names on first pass