This Worker is the free-tier deployment target for Entroly’s privacy-safe, opt-in product-health collector and public community-savings lower bound. It preserves the Python collector’s closed wire schema while replacing the hosted Starlette process and SQLite file with Cloudflare Workers and D1.
entroly telemetry on.wrangler.jsonc; application code does
not store IP addresses, request headers, or user agents.GET /v1/public-savings exposes totals and fixed methodology labels only.
GET /v1/summary is hidden unless ADMIN_TOKEN is configured and supplied.The optional INGEST_TOKEN secret can restrict uploads. If it is omitted, the
closed schema and two rate-limit bindings protect the public opt-in endpoint.
The free Workers plan currently includes 100,000 requests per day. D1 includes 5 million rows read per day, 100,000 rows written per day, and 5 GB total storage. When a free limit is exhausted, requests fail instead of creating an uncapped pay-as-you-go bill. Check Cloudflare’s current Workers pricing and D1 pricing before deploying.
cd deploy/cloudflare-community-savings
npm install
npm test
npm run check
npx wrangler login
npx wrangler d1 create entroly-community-savings
Copy the returned database_id into wrangler.jsonc (the Entroly production
database ID is already checked in), then initialize and deploy:
npx wrangler d1 execute entroly-community-savings --remote --file=schema.sql
npx wrangler secret put ADMIN_TOKEN
npx wrangler deploy
ADMIN_TOKEN should be a new random secret. Do not commit it. INGEST_TOKEN
is optional; if configured, every contributing installation must also receive
it via ENTROLY_TELEMETRY_TOKEN.
After deployment:
/health and /v1/public-savings.ENTROLY_TELEMETRY_ENDPOINT only through the user’s explicit consent
flow; an environment variable alone cannot turn consent into upload.https://entroly-community-savings.entroly-community-savings-worker.workers.dev/v1/public-savings.
Keep that URL in the entroly-community-savings-endpoint meta tag in
docs/index.html.https://juyterman1000.github.io before publication.Clear the website meta tag first so the site immediately returns to its checked-in proof. Then roll back or delete the Worker. D1 remains separate and can be exported or deleted from the Cloudflare dashboard.