Keep environment, authority, and data boundaries visible.
A successful demo and a safe production transaction require different controls. Use this checklist before enabling real spend.
Configure every dependent value as one set
Fail startup when a mainnet service is missing an explicit program ID, mint, or signer. Do not silently inherit devnet defaults.
Each actor signs only its own transition
Published packages and browser bundles must not contain raw service signer material.
Keep the API bearer outside JavaScript
- Configure
PROCUREMENT_API_URLonly on the product server. - Store the upstream bearer in an HTTP-only, Secure, SameSite Strict cookie.
- Require an exact same Origin and a session-bound CSRF value for every command.
- Rotate the bearer before its bounded expiry and invalidate the previous token atomically.
- Revoke the server session on sign-out, then clear every browser session cookie.
Browser storage may keep tenant selections such as organization, workspace, and cost center. It must not contain an access token, wallet session proof, or service signer.
A chain reference is public by default
- Put public-safe, encrypted, or content-addressed references in on-chain URI fields.
- Keep customer inputs, raw outputs, reviewer notes, and dispute evidence in controlled storage.
- Store hashes that prove integrity without exposing the underlying content.
- Apply retention and access policies to receipts and audit exports.
Deployment does not automatically enable new spend
Keep NEW_SPEND_ENABLED=0 for a new environment. Validate migrations, tenant isolation, policy, evidence signer, RPC, remote signer authentication, reconciliation, alerting, and rollback before a separate reviewed change enables financial commands.
NEW_SPEND_ENABLED=0Run the complete local stack
nvm use
pnpm dev:local