Skip to content

CLI: Before You Start

This chapter covers preparation before you run any deployment commands. Do not skip it.

ZShip is not a single-page project. It includes:

  • 10 backend Workers
  • 2 frontend apps (web and admin)
  • 9 D1 databases
  • 1 KV namespace (payment service)
  • 1 R2 bucket (CDN service)

You are deploying a Cloudflare-based system, not just one website.

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)
  1. Fork the official template into your GitHub account or organization
  2. Clone your fork locally

Advantages: Keeps upstream relationship; easier to sync future updates.

  1. Download the official code
  2. Create a new Git repository
  3. Push the code there

Advantages: Cleaner history; feels like your own project from day one.

We recommend GitHub Fork for long-term maintenance.

Ensure you have:

  • Node.js 22 or newer
  • pnpm
  • Git

Verify:

Terminal window
node -v
pnpm -v
git --version
Terminal window
git clone <your-repository-url>
cd zship
pnpm install
Terminal window
npx wrangler login

After authorization, verify:

Terminal window
npx wrangler whoami
  • Workers: Keep names like zship-node1-auth, zship-node2-support, etc.
  • Pages: Keep web and admin
  • app_key: Use demo first; switch to your real key after the system works

Before continuing, confirm:

  • You have decided Fork vs. copy
  • Repository is cloned locally
  • pnpm install completed
  • npx wrangler login and npx wrangler whoami succeed
  • You will keep default service names on first pass