13 Commits

Author SHA1 Message Date
9cf29d5f8a feat(seo): server-render contribution opportunities 2026-09-13 21:31:47 +03:00
a122792a6c fix(seo): keep category snippets concise 2026-09-13 15:46:05 +03:00
55809a0607 fix(seo): normalize category page titles 2026-09-13 13:40:36 +03:00
9b66375f8f fix: address review findings on reversal auditability and session persistence
HIGH — the reversal clamp no longer erases the alerting/audit trail: a
reversal that applies nothing (already fully reversed, or clamped to zero)
now records a 'clamped_reversal' adjustment row with zero applied amount
and the provider-claimed cumulative, and partial clamps store the
provider-claimed cumulative on the refund row, so provider-side
over-refunds are queryable instead of silently absorbed (migration 0024
extends the adjustment_type/amount CHECKs accordingly).

MEDIUM — persistProviderCheckoutSession now throws on a zero-row UPDATE
instead of returning nulls, so a missing checkout intent fails the request
rather than handing the buyer an unsettleable provider session.

LOW — launch-notify origin check uses the configured appUrl (same policy
as checkout); repository URLs are stored WHATWG-normalized (parsed.href);
the launch_notifications email CHECK now mirrors the application regex.

Integration: +1 over-refund audit scenario; refund-after-dispute now
asserts the no-op refund id is recorded (8/8 green vs real Postgres 16).
2026-09-05 17:29:18 +03:00
e872343192 feat: capture pre-launch demand while checkout is disabled
While CHECKOUT_ENABLED=false (payment provider approval pending) a founder
who completed the bid form hit a dead-end 503. Now the form swaps in an
'email me when checkout opens' capture:

- launch_notifications table (migration 0025): one row per email, DB-level
  CHECK constraints on normalization/source, first attribution preserved
  via ON CONFLICT DO NOTHING
- POST /api/launch-notify: origin + content-type checks, edge and DB rate
  limits, strict validation (lib/launch-notify), identical response for
  new and duplicate emails so the list cannot be enumerated
- bid-board: checkout_disabled response renders the notify capture with
  the intended repository attached, instead of a plain error
- 5 unit tests + 1 Postgres integration scenario
2026-09-05 17:14:23 +03:00
c709b0d3ec feat: harden money-path idempotency across checkout, settlement, and reversal
- Send stable per-checkout Idempotency-Key headers to Creem and Dodo so
  concurrent retries converge on one payable provider session
- State-guarded provider-session persistence: a late provider response can
  no longer clobber a checkout a webhook already settled/reversed
- Key refund/dispute idempotency on the provider adjustment id (not the
  webhook event id) with ON CONFLICT claim, preventing double-subtraction
  when the same refund replays under a new event id
- Surface a conflicting second capture on an already-fulfilled checkout as
  an incident instead of silently swallowing it
- Clamp reversals to the settled contribution so post-dispute refunds are
  zero-delta no-ops instead of jamming the webhook forever
- Unique indexes: (provider, provider_adjustment_id) on payment_adjustments,
  partial (provider, provider_transaction_id) on bids (migration 0024)
- 4 new unit tests + 5 new Postgres integration scenarios (all green vs
  real Postgres 16)
2026-09-05 17:09:23 +03:00
ce8e078a29 fix: stop rejecting public domains that start with private IPv6 prefixes
publicHostname() applied the IPv6 ULA (fc00::/7) and link-local
(fe80::/10) prefix checks to every hostname, so legitimate public
domains whose names merely begin with fc/fd/fe80 (fd.io, fdroid.org,
fda.gov, fcbarcelona.com) were wrongly rejected at destination
normalization. Guard those prefix checks with a colon test so they
apply only to actual IPv6 literals; private IPv6 hosts stay rejected.
2026-08-25 12:27:29 +03:00
036e70d39d feat: settlement reversal-states module + tests 2026-08-25 03:42:36 +03:00
16ef8479ac fix: server-side pricing correctness in upvote-token checkout path 2026-08-25 03:21:30 +03:00
de7e551889 feat(bidstage): $5 upvote-token pricing + visible pricing for Creem compliance
Reframe the paid product as upvote tokens at a fixed $5.00 each (amountCents =
quantity * 500) so pricing is unmistakably visible for Creem review.

- Homepage hero now shows a prominent "$5 per upvote" pricing callout and
  reframed money-boundary copy; visible regardless of CHECKOUT_ENABLED.
- Replace the placement-budget dollar input with an upvote quantity selector:
  preset buttons (1/5/20/100/200 = $5/$25/$100/$500/$1,000), custom quantity,
  and a live total = quantity x $5. Enforces min 1, max 10,000 upvotes ($50k).
- Fix JSON-LD offer: AggregateOffer, unit price 5.00 USD (was price "0").
- Reframe bid/placement/budget copy to upvote-token framing on the homepage,
  /bids pricing page, and Terms; error messages updated in lib/market.ts.
- Add transparent inclusive platform fee: PLATFORM_FEE_BPS=2000 (+ platformFeeCents
  helper) in lib/market.ts, disclosed as "each $5 upvote includes a 20% bidstage
  platform fee" in pricing UI and Terms. Bidstage stays sole seller; no payouts.

tsc --noEmit clean; next build compiled successfully.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-24 14:49:58 +03:00
526a0b0250 Add branded previews and prepare public launch 2026-08-24 13:12:45 +03:00
8c8ceb4fa9 Harden manual Cloudflare production deploy 2026-08-24 00:30:27 +03:00
026f4c06d7 Build production-ready open-source bidding platform 2026-08-24 00:16:49 +03:00