98 lines
3.7 KiB
Markdown
98 lines
3.7 KiB
Markdown
# ADR 0001: Future paid official-binary distribution
|
|
|
|
Status: explored, not implemented
|
|
|
|
## Decision
|
|
|
|
Keep update metadata public and cryptographically signed. Keep artifact URLs
|
|
stable behind the distribution gateway. If paid access is introduced later,
|
|
authorize artifact responses at that gateway; do not put credentials or
|
|
short-lived signed URLs into immutable feeds.
|
|
|
|
The future request path is:
|
|
|
|
```text
|
|
billing webhook
|
|
-> Echoion entitlement service
|
|
-> account/device access token
|
|
-> distribution gateway
|
|
-> short-lived origin authorization or streamed object response
|
|
```
|
|
|
|
Billing authorization and update integrity are separate:
|
|
|
|
- The gateway decides whether an account may receive the bytes.
|
|
- The updater independently verifies the feed signature, artifact SHA-256,
|
|
signed manifest, size, compatibility, and replay sequence.
|
|
|
|
No billing, account, license, device, or gateway authorization code is part of
|
|
the current implementation.
|
|
|
|
## Current public baseline
|
|
|
|
Initial component artifacts are mirrored into the public `Void` organization
|
|
Generic Package Registry. This keeps downloads public after component
|
|
repositories become private and requires no additional storage service.
|
|
|
|
Gitea package URLs are permanently public while the organization is public;
|
|
they cannot later become paywalled without breaking their original access
|
|
contract. Introduce the entitlement gateway as the distribution base before
|
|
publishing the first paid-only artifact. Existing public versions remain
|
|
public, while new signed feed entries may point to the gateway.
|
|
|
|
## Provider options
|
|
|
|
### Stripe Billing
|
|
|
|
Use Stripe subscriptions and Billing Entitlements webhooks while Echoion owns
|
|
the entitlement database, account model, tax configuration, support, and
|
|
gateway. This provides the most control but also leaves more commerce and
|
|
compliance work in Echoion.
|
|
|
|
- <https://docs.stripe.com/billing/entitlements>
|
|
- <https://docs.stripe.com/billing/subscriptions/webhooks>
|
|
|
|
### Paddle or Lemon Squeezy
|
|
|
|
Prefer a merchant-of-record provider when supported jurisdictions, tax
|
|
collection/remittance, invoices, and payment operations should be delegated.
|
|
Echoion still needs a webhook-driven entitlement projection and must treat
|
|
webhooks as replayable, out-of-order external events.
|
|
|
|
- <https://developer.paddle.com/build/subscriptions/provision-access-webhooks/>
|
|
- <https://docs.lemonsqueezy.com/help/webhooks>
|
|
|
|
### Keygen
|
|
|
|
Consider Keygen in addition to a billing provider when per-device activation,
|
|
offline signed licenses, machine limits, or license-policy administration
|
|
becomes a product requirement.
|
|
|
|
- <https://keygen.sh/docs/api/entitlements/>
|
|
|
|
## Required follow-up decisions
|
|
|
|
Before implementation, produce a jurisdiction-specific commerce review and
|
|
lock these product choices:
|
|
|
|
- Merchant of record versus Echoion-operated merchant account.
|
|
- Monthly, annual, perpetual, trial, and grace-period behavior.
|
|
- Device limits, device replacement, account sharing, and offline operation.
|
|
- Refund, dispute, chargeback, failed-payment, cancellation, and revocation
|
|
timing.
|
|
- Availability when billing, entitlement, or gateway dependencies are down.
|
|
- Minimal personal data, retention, account deletion, audit history, and
|
|
customer-support access.
|
|
|
|
Webhook handlers must verify provider signatures, persist provider event IDs,
|
|
be idempotent, tolerate reordering, and derive access from stored entitlement
|
|
state rather than trusting a single webhook delivery.
|
|
|
|
## Limits
|
|
|
|
Echoion is public source. A download paywall can control official signed
|
|
binaries, automated updates, and paid support, but cannot prevent someone from
|
|
building and running the public source. Stronger enforcement would require
|
|
moving real product value into private components or a hosted service and is
|
|
outside this decision.
|