Source-derived

Commands are bound to checked-in scripts and the pinned Wrangler version.

01

Clone the reference

Keep the original source visible until your application cutover is proven.

git clone https://github.com/rogu3bear/leptos-cloudflare.git my-app
02

Check the toolchain

Resolve the repository’s actual cargo-leptos, Worker, and wasm-bindgen requirements.

./scripts/check-deps.sh
03

Prepare local D1

Apply checked-in migrations to the local replica. This does not mutate the remote database.

CI=1 ./scripts/wrangler.sh d1 migrations apply leptos-cf-db --local
04

Build the deployment shape

Compile hydration, SSR, hashed assets, and the generated Worker entry together.

bash ./scripts/build-edge.sh
05

Run locally

Serve the Worker, Assets binding, SSR fallback, and local D1 at one origin.

CI=1 ./scripts/wrangler.sh dev --local --ip 127.0.0.1 --port 57581
06

Earn the local release claim

Before review or release, run the repository’s complete local source of truth.

./scripts/verify.sh
Unproven

Production is not initialized yet.

The checked-in `wrangler.toml` deliberately contains placeholder D1 identifiers. Creating provider resources, applying remote migrations, and deploying are separate governed changes. The local `scripts/init.sh` command adopts the application name while preserving source and migrations; it does not initialize production. Follow the adoption guide before provider cutover.