Add premium paywall and core German drills

This commit is contained in:
fightme-cmd
2026-07-05 10:28:11 +02:00
parent 960f63dc21
commit 49f78ef6b0
5 changed files with 296 additions and 37 deletions
+32
View File
@@ -36,3 +36,35 @@ Open the URL in Safari, tap Share → **Add to Home Screen**. It opens fullscree
The app tries `window.storage` first (Claude artifact environment), then falls back to `localStorage`. When self-hosted, only localStorage runs, which iOS Safari persists reliably.
To wipe progress: open browser devtools → Application → Local Storage → delete the `gd-v10` key. Or on iPhone: Settings → Safari → Advanced → Website Data → search your domain → delete.
## Stripe checkout
Beug uses public Stripe Checkout or Payment Link URLs, supplied through environment variables. Do not put Stripe secret keys in this Vite app.
Create one product in Stripe, for example `Beug Premium`, with three prices:
- Weekly subscription: `$2.99` every week
- Yearly subscription: `$9.99` every year
- Lifetime access: `$19.99` one-time payment
Create a Payment Link or Checkout link for each price. Set the success redirect URL to:
```text
https://beug.george1.dev/?checkout=success
```
Set the cancel URL to:
```text
https://beug.george1.dev/
```
Then add these public URLs in the deployment environment:
```bash
VITE_STRIPE_YEARLY_URL=https://buy.stripe.com/...
VITE_STRIPE_LIFETIME_URL=https://buy.stripe.com/...
VITE_STRIPE_WEEKLY_URL=https://buy.stripe.com/...
```
The current v1 unlock is intentionally simple: after Stripe redirects back with `?checkout=success`, Beug stores the unlock in this browser's localStorage. This avoids accounts for the tiny-app version, but it is a soft paywall. A stricter version needs a small backend, Stripe webhooks, and account or email-based entitlement lookup.