6. Deploy to production
Local works — now ship it. Four pieces go up: the node, the dataview, your enclave, and
the frontend. The node and dataview are Cloudflare Workers; the enclave is minted on the live
node; the frontend is a static build. Order matters — you deploy the dataview before minting (so
its production URL bakes into the manifest), and minting rewrites enc.config.json, which the
frontend reads.
1 · Node
Deploy the node you patched in step 1 — admission hook and all — and set
the two values it runs on as secrets (not plaintext vars) in production:
cd impl-node
yarn wrangler secret put NODE_PRIVATE_KEY # paste node.key
yarn wrangler secret put OWNER_PUBKEY # paste your OWNER_PUBKEY — the hook admits only this
yarn wrangler deploy # → https://<your-node>.workers.devThe deployed node carries the same validateContent gate, so it still admits only your owner
identity. See Run a Node → Deploy for custom domains and Durable Object regions.
2 · Dataview
Ship the dataview you wrote in step 2. Give it a real signing
key as a secret (the local .dev.vars key was a throwaway) and deploy:
cd my-dataview
wrangler secret put DATAVIEW_PRIVATE_KEY # a real 32-byte hex key
wrangler deploy # → https://<your-dataview>.workers.dev3 · Enclave
Mint on the live node by re-running the deploy script from
step 3, pointed at the production node and dataview. It bakes the
production dataview endpoint into the manifest and rewrites enc.config.json with the production
node URL, sequencer pubkey, and enclave id. Minting is idempotent:
NODE_URL=https://<your-node>.workers.dev \
DATAVIEW_URL=https://<your-dataview>.workers.dev \
node deploy-enclave.mjs
# Personal enclave → fff25e6a…
# wrote enc.config.json4 · Frontend
Copy the production enc.config.json into the app and build — Vite inlines it, so the bundle points
straight at your live node:
cp enc.config.json personal-app/enc.config.json
cd personal-app
npm run build # → dist/Ship dist/ to any static host. With Cloudflare Workers static assets:
name = "personal-app"
compatibility_date = "2024-11-15"
[assets]
directory = "./dist"wrangler deploy # → https://personal-app.<you>.workers.devVisitors load the app, connect their own wallet extension, and read your public feed; you sign in with your owner seed and see both timelines. Per-enclave isolation, geo-routing, and scaling come from the node's Durable Object model; the dataview keeps the public feed live.
Verify the deploy end-to-end with the node's test harness (see Run a Node → Verify).
🎉 You've built and shipped a custom Personal app on ENC — local node, dataview, enclave, frontend, tests, and production, all on one verifiable protocol.