managarten/apps/cards/apps/web
Till JS 5dbc9ace2d feat(cards): Phase ζ.1 — Paid decks via mana-credits
Server (cards-server):
- lib/credits.ts: thin internal-API client for mana-credits
  (reserve / commit / refund-reservation / grant). Service-to-
  service via X-Service-Key. Throws InsufficientCreditsError
  separately so the buy flow can branch on UX.
- services/purchases.ts: 4-step purchase pipeline: reserve →
  insert deck_purchases row → commit reservation → grant
  author share + insert author_payouts. Idempotent on
  (buyer, deck) so a refresh-spam-click can't double-charge.
  Verified-mana authors get the 90/10 split, others 80/20
  (already in config). Refunds intentionally out of scope —
  see MARKETPLACE_PLAN §13a.
- routes/purchases.ts: POST /v1/decks/:slug/purchase,
  GET /v1/me/purchases, GET /v1/authors/me/payouts.
- decks.bySlug now returns hasPurchased (null when anonymous,
  bool when authed) so the deck-detail page can pick the right
  CTA.
- subscriptions.subscribe now blocks paid decks unless the
  caller has a non-refunded purchase row (owner exempt for
  testing).
- Notify: author gets a "Verkauf"-Email at grant time, with a
  deterministic externalId for dedup.

Frontend (cards-web):
- /d/<slug> shows "Kaufen für N 💎" instead of "Abonnieren"
  when paid + not yet bought; flips to subscribe path once
  purchased.
- /me/purchases page listing buyer history + (when present)
  author-payout history. Linked from the top nav.
2026-05-07 23:10:18 +02:00
..
src feat(cards): Phase ζ.1 — Paid decks via mana-credits 2026-05-07 23:10:18 +02:00
static fix(cards-web): missing static assets — sql-wasm-browser.wasm + PWA icons 2026-05-07 14:42:47 +02:00
.gitignore feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction 2026-05-07 01:20:43 +02:00
Dockerfile feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction 2026-05-07 01:20:43 +02:00
package.json feat(cards-web): PDF input for AI generator + study activity heatmap 2026-05-07 13:37:01 +02:00
svelte.config.js feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction 2026-05-07 01:20:43 +02:00
tsconfig.json feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction 2026-05-07 01:20:43 +02:00
vite.config.ts chore(infra): drop status-page-gen from Mini, status.mana.how → GPU-Box tunnel 2026-05-07 13:22:20 +02:00