Crypto-billed seedbox control-plane second slice
Prepared for the accepted seedbox provisioning platform gig.
Delivered artifact
A small executable scaffold for the core control-plane flows, not just a planning doc.
- Provider lifecycle contract with an in-memory provider implementation.
- Prepaid billing ledger with top-up, monthly reserve, and low-balance dunning behavior.
- BYOS authorization model where the customer authorizes the platform public key and no customer private key is stored.
- Seedbox cloud-init rendering with firewall and fail2ban bootstrap.
- Audit event creation for privileged lifecycle actions.
- Node test coverage for billing gate, successful provision, BYOS key validation, and lifecycle guard.
Verification
cd work/seedbox-control-plane-slice
npm test
Result: 4 tests passed, 0 failed.
Files
work/seedbox-control-plane-slice/src/control-plane.mjs
work/seedbox-control-plane-slice/test/control-plane.test.mjs
work/seedbox-control-plane-slice/README.md
outputs/seedbox-control-plane-second-slice-20260626.zip
Next slices
Good next paid slices: real Hetzner/Vultr/OVH adapters, CoinPay/NOWPayments webhook reconciliation, Postgres schema/migrations, job queue for provisioning, and Ansible/cloud-init hardening modules.