Self-hosting
Attackfee runs on your server. Nothing is sent to us. Page views stay free. Checks run where you installed them.
Packages
The packages are not on npm yet. From a clone of this repo, run npm install and npm run build, then install each package by path and run it yourself. You do not need a hosted worker to do that.
@attackfee/widgetserves the page script. See Widget.@attackfee/serveris the Node issuer. See Server.@attackfee/agentis the automated client. See Agent SDK.@attackfee/mcpis the local tool server. See MCP server.- The WordPress plugin is the PHP issuer. See WordPress and Download.
secret is at least 16 characters. Keep it in the environment or a Worker secret. Do not commit it, and do not print it.
This site's worker
The attackfee-site worker is the site and demo worker in this repo. It runs attackfee.dev and its work-only demo at /demo. Paid passes are off. The owner chooses each route's class, which sets its relative cost. Production on attackfee.dev is work-only (CASHU_MINTS unset, L402_ENABLED is 0). The mint list is CASHU_MINTS when you turn payments on for your own copy. The store is one SQLite-backed Durable Object, AttackfeeStoreDO. From a clean checkout:
npm ci
npm run build
npx wrangler deploy
npm run build writes the worker bundle and the static files the config points at. npx wrangler deploy publishes that worker. Attackfee's own production deploy is scripts/deploy.sh --sha <origin/main> after a verifier passes, and attaches only the attackfee.dev apex under routes. www and attackfee.com are not attached; they 308 to the apex at the DNS layer. For your own copy, change or remove those routes before you deploy.
Set SITE_SECRET before the demo can issue checks:
npx wrangler secret put SITE_SECRET
To run it on your own machine instead of publishing, copy .dev.vars.example to .dev.vars, replace the placeholder, and start npx wrangler dev --local. The placeholder is not a secret you can reuse.