01. Before You Start

Preparation before deployment: accounts, source access strategy, local tools, cloning the repository, Wrangler login, and starting the Dev Console.

Deployment Updated Nov 24, 2026

Do not skip this chapter. If this part is not ready, you will almost certainly get stuck later.

What you are actually deploying

ZShip is not a single-page project. It is a full system that you deliver to users, including at least:

  • 11 backend Workers
  • 2 frontend apps that users interact with
  • 10 D1 databases
  • 1 KV namespace used by the payment service
  • 1 R2 bucket used by the CDN service

In other words, you are deploying a Cloudflare-based system made of a user site, an admin backend, microservices, databases, and storage.

What accounts you need

Required:

  • A Cloudflare account
  • Your own copy of the Git repository
  • A machine that can run Node.js

Optional:

  • A Stripe, Creem, Dodo Payments, or Waffo Pancake account if you want real payments
  • A Google OAuth app if you want Google login

Decide how you will obtain the source code

This choice is easy to overlook, but it decides how hard future template updates will be.

GitHub Fork (recommended) Copy into a new repository
How Click Fork on the official template repository, then clone your fork Download the code and push it to a brand-new repository
Future template updates Sync manually with Sync fork on GitHub, or git fetch + merge / rebase No upstream link; you compare and copy changes by hand
Best for Most teams building a product on top of the template Teams that want a standalone history from day one

What you need installed locally

  • Node.js 22 or newer
  • pnpm
  • Git

Check that all three return a version before you continue:

node -v
pnpm -v
git --version

Clone the repository and install dependencies

Skip the clone if you already have the repository locally. Otherwise clone your own repository — your fork, or the new repository you created — not the official one:

git clone <your-repository-url>
cd zship

Then install dependencies from the repository root:

pnpm install

Installation can take a few minutes. If it fails, fix it before moving on — every later step depends on it.

Log in to Wrangler

Wrangler is Cloudflare's official command-line tool. ZShip uses it to create and deploy Workers, Pages, D1, KV, and R2 resources, and the Dev Console calls it for you.

Run this from the repository root:

npx wrangler login

Your browser opens a Cloudflare authorization page. After you approve it, confirm the login:

npx wrangler whoami

If you see your Cloudflare account information, Wrangler is ready.

Start the Dev Console

Now start the console from the repository root:

pnpm dev:console

Open http://localhost:3900 and make sure you can see these pages in the left menu:

  • Setup — the Quick Setup checklist
  • Services — local Workers and frontend apps
  • Deploy — the Cloudflare deployment pipeline

You do not need to click through everything yet. Seeing these pages means your local setup works. See 00. Meet the Dev Console for what each page does.

What not to change on the first deployment

Keep the default names for the first pass; the services find each other by these names.

Workers:

  • zship-node1-auth
  • zship-node2-support
  • zship-node3-pay
  • zship-node4-notify
  • zship-node5-blog
  • zship-node6-cdn
  • zship-node7-site
  • zship-node8-prompt
  • zship-node9-checkin
  • zship-node10-ai

Frontend targets:

  • Worker web
  • Pages project admin

Checklist before you leave this chapter

  • You have decided between a fork and a new repository
  • The repository is cloned locally and pnpm install succeeded
  • npx wrangler login and npx wrangler whoami both worked
  • pnpm dev:console opens and shows Setup, Services, and Deploy
  • You will keep the default service names on the first deployment

If any item is still open, finish it before continuing to 02. Deploy to Cloudflare.

Was this page helpful?

Still stuck? See Troubleshooting or open a ticket