Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ npm run preview

Set `DODO_CHECKOUT_URL` to the HTTPS hosted product checkout URL (for example `https://checkout.dodopayments.com/buy/pdt_example`) at build time. Do not set a private API key. Without the URL, the purchase button is disabled and shows “Checkout coming soon.”

Configure a one-time USD $14.99 product in Dodo. The build sets the checkout return URL to `https://diffy.run/thanks`. Put `https://diffy.run/downloads` in a Digital Files entitlement's external delivery link and attach it to the product as well, so buyers can keep it. Dodo setup remains manual until the product is ready.
Configure a one-time USD $12.99 product in Dodo. The build sets the checkout return URL to `https://diffy.run/thanks`. Put `https://diffy.run/downloads` in a Digital Files entitlement's external delivery link and attach it to the product as well, so buyers can keep it. The live product and its download entitlement are configured.

```sh
DODO_CHECKOUT_URL='https://checkout.dodopayments.com/buy/YOUR_PRODUCT_ID' npm run build
Expand Down Expand Up @@ -62,16 +62,16 @@ The screenshot serves 480/960/1440px variants through `srcset`; the original 192

## Beta pricing and platform availability

The landing page displays regular price $24.99 crossed out and $14.99 during beta. It keeps the purchase CTA and “Or build for free”; platform downloads are offered after purchase on `/thanks` and through Dodo delivery. There is no separate beta announcement line. macOS is Beta; Windows/Linux are Alpha. The purchase supports all platforms. Keep the Dodo product's actual one-time USD price at 1499 cents to match the site.
The landing page displays regular price $24.99 crossed out and $12.99 during beta. It keeps the purchase CTA and “Or build for free”; platform downloads are offered after purchase on `/thanks` and through Dodo delivery. There is no separate beta announcement line. macOS is Beta; Windows/Linux are Alpha. The purchase supports all platforms. Keep the Dodo product's actual one-time USD price at 1299 cents to match the site.

`src/data/platforms.json` supplies download choices, requirements, asset names, and installation instructions for `/downloads` and `/thanks`. `DIFFY_RELEASED_PLATFORMS` is a comma-separated list of published platforms, default `macos`. After the complete release is verified and published, set the GitHub repository variable to `macos,windows,linux` and rebuild the site. Keep it at `macos` until then; the site never advertises missing assets.

`node scripts/check-build.mjs` checks the built pricing, checkout return URL, availability, and redirect targets. Run it with the same environment used for `npm run build`. CI exercises both checkout configurations and all-platform availability.

## Dodo dashboard setup

No Dodo CLI or product is configured for this repository. Create one **Diffy — all desktop platforms** product with a one-time **USD $14.99** price (1499 cents), covering macOS beta and Windows/Linux alpha. Create a Digital Files entitlement named **Diffy downloads**, set its external link to **https://diffy.run/downloads**, and attach it to the product. Suggested delivery instructions:
The live product ID is `pdt_0NqoFXz9I2D2slqhYL42T`; its Digital Files entitlement ID is `ent_0NqoFXuK7ZzeWUnnHUAMW`. This is one **Diffy — all desktop platforms** product with a one-time **USD $12.99** price (1299 cents), covering macOS beta and Windows/Linux alpha. Its attached Digital Files entitlement is named **Diffy downloads**, with its external link set to **https://diffy.run/downloads**, and these delivery instructions:

> Choose your platform on the download page. All versions require Git. macOS is beta; Windows and Linux are early alphas with limited hardware testing. Save the page for future releases.

Copy the hosted `https://checkout.dodopayments.com/buy/PRODUCT_ID` URL into the GitHub `DODO_CHECKOUT_URL` repository variable. The site adds the return URL `/thanks`. Keep checkout disabled until the product exists and its displayed charge matches $14.99. Public downloads and the return page do not verify payment or grant a license.
Copy the hosted `https://checkout.dodopayments.com/buy/pdt_0NqoFXz9I2D2slqhYL42T` URL into the GitHub `DODO_CHECKOUT_URL` repository variable. The site adds the return URL `/thanks`. Keep checkout disabled until the product exists and its displayed charge matches $12.99. Public downloads and the return page do not verify payment or grant a license.
2 changes: 1 addition & 1 deletion site/scripts/check-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
const read = path => readFileSync(new URL(`../dist/${path}`, import.meta.url), 'utf8');
const home = read('index.html');
assert(home.includes('$14.99') && home.includes('$24.99') && !home.includes('$19.99'));
assert(home.includes('$12.99') && home.includes('$24.99') && !home.includes('$19.99') && !home.includes('$14.99'));
assert(home.includes('<s>$24.99</s>') && home.includes('during beta'));
assert(!home.includes('Downloads &amp; installation') && !home.includes('Diffy is in beta.'));
const checkout = process.env.DODO_CHECKOUT_URL;
Expand Down
2 changes: 1 addition & 1 deletion site/src/data/releases.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import definitions from './platforms.json';
const published = new Set((import.meta.env.DIFFY_RELEASED_PLATFORMS || 'macos').split(',').map((value: string) => value.trim()));
export const platforms = definitions.map(platform => ({ ...platform, available: published.has(platform.id), href: `/download/${platform.id}` }));
export const price = { regular: '$24.99', beta: '$14.99' };
export const price = { regular: '$24.99', beta: '$12.99' };
2 changes: 1 addition & 1 deletion site/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (checkout) {
</ul>
<p class="compatibility">{platforms.map((platform, index) => <>{index > 0 && <span aria-hidden="true"> · </span>}{platform.name} {platform.stage.toLowerCase()}</>)} <span aria-hidden="true">·</span> Requires Git</p>
<div class="purchase">
<p class="beta-price"><span class="visually-hidden">Regular price </span><s>{price.regular}</s> <strong>{price.beta}</strong><span> during beta</span></p>
<p class="beta-price"><span class="visually-hidden">Regular price </span><s>{price.regular}</s> <strong>{price.beta}</strong><span> USD during beta</span></p>
{purchaseUrl ? <a target="_blank" rel="noopener" class="button" href={purchaseUrl}>Buy once <span aria-hidden="true">—</span> {price.beta} <span class="button-arrow" aria-hidden="true">↗</span></a> : <button class="button" disabled aria-describedby="checkout-note">Buy once <span aria-hidden="true">—</span> {price.beta} <span class="button-arrow" aria-hidden="true">↗</span></button>}
{!purchaseUrl && <p id="checkout-note" class="checkout-note">Checkout coming soon.</p>}
<a target="_blank" rel="noopener" class="build-link" href="https://github.com/hitSlop/Diffy">Or build for free <span aria-hidden="true">↗</span></a>
Expand Down
Loading