Skip to content

feat(docs): Habitica-styled hosted-plan checkout page - #1

Merged
SDR3078 merged 1 commit into
mainfrom
feat/hosted-checkout-page
Jul 14, 2026
Merged

SDR3078 merged 1 commit into
mainfrom
feat/hosted-checkout-page

Conversation

@SDR3078

@SDR3078 SDR3078 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Adds a static GitHub Pages page (docs/) for the paid hosted plan — a self-host pitch plus a PayPal subscribe flow.

What it does

The page is a pure front-end: PayPal's JS SDK creates the subscription client-side and stamps the subscriber's Habitica User ID into the subscription custom_id. WardStone (the private billing backend) decodes it from the BILLING.SUBSCRIPTION.ACTIVATED webhook to bind the entitlement. The page shares no code with the engine or the backend — only the custom_id contract.

Files

  • index.html — Habitica-authentic design: full purple field, Varela Round headings, task-card sections with centered checkmarks (from Habitica's own check.svg), pixel dividers + a pixel-mountain footer. Scope-honest copy (to-dos + dailies only — no habits/rewards/streaks). Free self-host + €1/mo hosted. PayPal + card funding. Responsive, keyboard focus, reduced-motion, dark mode.
  • custom-id.js — browser custom_id encoder, pinned byte-for-byte to WardStone's Python codec by custom-id.golden.json.
  • custom-id.test.mjs — node docs/custom-id.test.mjs asserts the encoder reproduces the golden vectors.
  • checkout.md — runbook: config, codec contract, Pages publish, go-live gate.
  • .nojekyll — serve .js/.mjs/.json verbatim.

Verified

  • Codec agreement JS ⇄ WardStone, including padding / |-delimiter / UTF-8 edge cases.
  • Page logic (button gating, custom_id stamping, honest success copy) — 12/12 checks.
  • Driven end-to-end against the live PayPal sandbox: a real subscription bound and the gate flipped deny→allow.
  • Centering + responsiveness audited at desktop and 390px mobile.

Deploy

Merge, then enable Pages: Settings → Pages → Deploy from a branch → main / /docs.

Notes

  • PayPal client-id / plan-id are sandbox values (public, safe to commit) — swap for live before real customers.
  • €1 is display-only: the wired sandbox plan still charges $3 USD until a €1 EUR plan is created and PLAN_ID + WardStone's WARDSTONE_PAYPAL_PLAN_MAP are updated.

🤖 Generated with Claude Code

Static GitHub Pages page (docs/) for the paid hosted plan. A client-side
PayPal subscribe flow stamps the subscriber's Habitica User ID into the
subscription custom_id, which WardStone decodes to bind the entitlement —
the page shares no code with the engine or the billing backend, only the
custom_id contract.

- index.html: Habitica-authentic design (full purple field, Varela Round
  headings, task-card sections with centered checkmarks, pixel dividers +
  footer); scope-honest copy (to-dos + dailies only); free self-host + EUR1/mo
  hosted; PayPal + card funding; responsive, keyboard focus, reduced-motion, dark.
- custom-id.js: browser custom_id encoder, pinned byte-for-byte to WardStone's
  Python codec by custom-id.golden.json (verify with custom-id.test.mjs).
- checkout.md: runbook - config, codec contract, Pages publish, go-live gate.
- .nojekyll: serve .js/.mjs/.json verbatim.

PayPal client-id/plan-id are sandbox (public, safe to commit). EUR1 is
display-only until a EUR1 plan replaces the current $3 sandbox plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@SDR3078
SDR3078 merged commit 7249aad into main Jul 14, 2026
2 checks passed
@SDR3078
SDR3078 deleted the feat/hosted-checkout-page branch July 14, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant