Getting Started

From clone to live — run it, customize it, deploy it

Last updated October 21, 2026


This page takes you from cloning the repo to a live site. Four stages, every step with a copyable command.

When you finish you have a site on Cloudflare Workers with your own name, logo, and navigation.

Prerequisites

NeedNotes
Node.js 22 / 24Even LTS only. Odd versions (23 / 25) are unsupported by vitest@5
pnpmVersion pinned by packageManager in package.json; do not use pnpm 9
Cloudflare accountThe free plan is enough. You can run locally without one
bash
node --version   # v22.x or v24.x
pnpm --version

Setup

1. Install dependencies

bash
pnpm install

2. Provision local resources

bash
pnpm run setup

The script asks for a project name, then creates (or reuses) a D1 database, R2 bucket, and KV namespace, generates the auth secret, and writes the results to .env and wrangler.jsonc.

If you are not logged in to Cloudflare it warns you but continues — local development uses a SQLite-backed D1 and needs no real resources. To log in:

bash
pnpm exec wrangler login

3. Start the dev server

bash
pnpm dev

Open http://localhost:3000. If the database was not initialized, run it manually:

bash
pnpm exec wrangler d1 migrations apply DB --local

4. Customize the site

All site identity lives in src/config/website.ts:

ts
// src/config/website.ts
export function createWebsiteConfig(env: PublicEnv): WebsiteConfig {
  return {
    baseUrl: env.VITE_BASE_URL,
    metadata: {
      name: 'Jerbix',                        // ← your site name
      images: { ogImage: '/logo.png', /* … */ },
    },
    docs: { enabled: true },                 // ← set false to drop the docs site
    // …
  }
}

See Website Config for every field.

5. Deploy

bash
pnpm deploy

This runs production env validation → build → client bundle leak check → wrangler deploy.

Local .env values do not become production secrets. Configure them separately with wrangler secret put, and never put a secret behind a VITE_ prefix — those are inlined into the browser bundle.

To deploy automatically on push to main, see Cloudflare · CI deployment.

Commands

CommandPurpose
pnpm devDev server on port 3000
pnpm buildProduction build
pnpm deployValidate → build → check → deploy
pnpm checkBiome + TypeScript + env + locale (run before committing)
pnpm testUnit and component tests

References

What's next