Add orgstar Pro (StoreKit on iOS, license keys on the Mac) !378

merged merged by cmc on 2026-11-14 01:55 UTC · krz/orgstar:orgstar-pro into main

Discussion

cmc

Adds orgstar Pro, gated on both platforms. Everyone who installed before Pro keeps it.

Pro: running and tangling source blocks; export other than HTML/Markdown, publishing, and copying as rich text; encrypting entries (decrypting stays free); org-roam nodes, dailies and backlinks; widgets; the Watch app; the clock Live Activity; Calendar and Reminders in the agenda; Shortcuts actions. Git is not in the list: orgstar has no Git feature beyond the branch name in the Mac mode line.

iOS: StoreKit 2 with sh.krz.orgstar.pro.monthly ($1.99), .yearly ($19.99) and .lifetime ($39.99). Includes restore, manage subscription, Settings ▸ orgstar Pro, a paywall sheet, and ios/Orgstar.storekit in the scheme for local testing. Grandfathering uses AppTransaction.originalAppVersion < 569 (production only). 569 is this commit's count on main. If anything else merges to main first, bump Grandfathering.firstPaidIOSBuild to this commit's git rev-list --count.

Mac: $39.99 once. Paste a license key in Settings ▸ Pro. Keys are ORGSTAR1-<payload>.<sig>, Ed25519-signed and verified offline. packaging/license-issuer is a Cloudflare Worker that signs a key for a completed Paddle transaction (stateless; the same transaction always returns the same key). Paddle Billing no longer issues license keys, and the Worker keeps the app independent of the payment provider. Macs that ran an earlier version (Sparkle's SUHasLaunchedBefore, or roots.json) keep Pro. release-mac.sh refuses to build until keygen.sh replaces the placeholder public key.

Tests: swift test passes (exit 0). The iOS scheme builds for the simulator with xcodebuild. The Pro screen was checked in the simulator. Purchases were not exercised.

Manual setup

App Store Connect (orgstar app):

  1. Agreements, Tax and Banking: Paid Apps agreement active, bank and tax forms done. Enroll in the Small Business Program (15%).
  2. Subscription group "orgstar Pro" with sh.krz.orgstar.pro.monthly ($1.99, 1 month) and sh.krz.orgstar.pro.yearly ($19.99, 1 year), same level.
  3. Non-consumable sh.krz.orgstar.pro.lifetime ($39.99).
  4. Display names, descriptions, and a review screenshot of the Pro screen for each. Submit them with the first Pro build.
  5. App Privacy: no change (purchases aren't linked to identity). Add the standard EULA link to the description (already linked in the app).

Paddle (Mac):

  1. Sign up as an individual. Complete identity verification. Get krz.sh approved: live HTTPS, public pricing, terms naming you.
  2. Create product "orgstar Pro (Mac)" with a one-time price of $39.99. Note the pri_… ID.
  3. Create an API key with read access to transactions and customers. Create a client-side token.
  4. cd packaging/license-issuer, set PRICE_ID in wrangler.toml, npx wrangler deploy, npx wrangler secret put PADDLE_API_KEY, then ./keygen.sh (stores the private key, writes the public key into LicenseKey.swift; back up the private key). Commit the new public key.
  5. Put buy.html's button on krz.sh/apps/orgstar/buy with the token, price ID and Worker URL. Test end to end in Paddle's sandbox first (PADDLE_API=https://sandbox-api.paddle.com).

Not done: translations for the new strings (scripts/sync-strings.sh). Repos stay public for now; making them private needs DMGs, the appcast and the manual moved to a public repo first.