Quickstart
This guide gets Sandcut running locally without changing the existing Worker deployment path.
Deployment model
Use two independent services:
- Application service: the existing Worker + Container deployment from the repo root
- New Sandcut service: a second Worker + Container deployment using
wrangler.sandcut.toml - Documentation service: a separate Cloudflare Pages project built from
apps/docs
This keeps docs releases completely isolated from media processing releases.
Prerequisites
- Node.js 20+
- Cloudflare account with Workers, Containers, Durable Objects, KV, and R2
- Wrangler authentication already configured locally
Install the application
bash
npm install
cp .dev.vars.example .dev.varsRun the application locally
bash
npm run devRun the new Sandcut service locally
bash
npm run dev:sandcutCreate a bearer token
bash
wrangler kv key put --binding=AUTH_KV "your-secret-token" "active" --remoteTest a processing request
bash
curl -X POST http://127.0.0.1:8787/video/process \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-secret-token" \
-d '{
"input_url": "https://example.com/video.mp4",
"ffmpeg_args": ["-vf", "scale=640:360", "-c:v", "libx264"],
"seek": { "mode": "hybrid", "start": 30, "duration": 8 }
}'Start the docs app
The docs app lives in apps/docs and is intentionally isolated from the root package.
bash
cd apps/docs
npm install
npm run devBuild and deploy the docs app
bash
cd apps/docs
npm run build
npm run deployThe deploy script targets the separate Pages project sandcut-docs.
Configure your own Cloudflare resources
Before deploying publicly, replace placeholder values in wrangler.toml or wrangler.sandcut.toml with your own:
CDN_DOMAINOUTPUT_BUCKET.bucket_nameAUTH_KV.id
Deploy the new Sandcut Worker + Container service
bash
npm run build:sandcut
npm run deploy:sandcutThis deploys a separate Worker named sandcut-video-sandbox and does not overwrite the existing application service.