Replaces the (never-launched) ad business direction with a freiwilliger Beitrag/Community-Abo model: owners can support PawFeed via Stripe with a one-time payment or a monthly SEPA/card subscription (2 EUR minimum), declared as Sponsoring/Community-Abo, not a tax-deductible donation. The Sponsor badge (only perk, no feature unlocks) is Owner-scoped and shows on every post of every one of their pets, plus their profile. - Schema: Owner.stripeCustomerId/sponsorSince/sponsorPeriodEnd/ sponsorSubscriptionId/sponsorSubscriptionStatus, new SponsorContribution model (payment history) - src/lib/stripe.ts (singleton client, mux.ts pattern) + src/lib/sponsor.ts (isActiveSponsor: one-time givers keep the badge permanently, subscribers through sponsorPeriodEnd even after cancelling -- no mid-period cliff) - src/trpc/routers/sponsor.ts: getStatus, createCheckoutSession (SEPA + card for subscriptions, card for one-time, price_data since amounts are user-chosen), cancelSubscription (cancel_at_period_end, no hard stop) - src/app/api/webhooks/stripe: checkout.session.completed, invoice.paid, customer.subscription.updated/deleted (mux webhook route pattern) - src/app/(app)/unterstuetzen: amount chips (3/5/10 EUR) prefilling an editable field, one-time/subscription toggle, status + contribution history, in-app cancel button (no Stripe-hosted portal, per requirement) - Badge surfaced in feed/explore postInclude + PostCard, and on the pet profile page next to the existing isVerified badge - Nutzungsbedingungen Sec. 12 (draft, needs sign-off before launch) + Stripe added to the Datenschutzerklaerung's Auftragsverarbeiter list - src/__tests__/sponsor.test.ts (7 tests), Stripe client fully mocked STRIPE_WEBHOOK_SECRET intentionally not yet configured -- the webhook endpoint can only be registered in the Stripe dashboard once this is deployed and reachable at https://pawfeed.org/api/webhooks/stripe. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
72 lines
1.9 KiB
JSON
72 lines
1.9 KiB
JSON
{
|
|
"name": "pawfeed",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint"
|
|
},
|
|
"prisma": {
|
|
"seed": "npx tsx prisma/seed.ts"
|
|
},
|
|
"dependencies": {
|
|
"@base-ui/react": "^1.5.0",
|
|
"@clerk/nextjs": "^7.4.3",
|
|
"@clerk/themes": "^2.4.57",
|
|
"@hookform/resolvers": "^5.4.0",
|
|
"@mux/mux-node": "^14.1.1",
|
|
"@mux/mux-player-react": "^3.13.0",
|
|
"@prisma/adapter-pg": "^7.8.0",
|
|
"@prisma/client": "^7.8.0",
|
|
"@sentry/nextjs": "^10.69.0",
|
|
"@supabase/supabase-js": "^2.107.0",
|
|
"@tanstack/react-query": "^5.101.0",
|
|
"@trpc/client": "^11.17.0",
|
|
"@trpc/server": "^11.17.0",
|
|
"@trpc/tanstack-react-query": "^11.17.0",
|
|
"blurhash": "^2.0.5",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"embla-carousel-react": "^8.6.0",
|
|
"ioredis": "^5.11.1",
|
|
"lucide-react": "^1.17.0",
|
|
"next": "^16.3.0",
|
|
"next-intl": "^4.13.0",
|
|
"next-themes": "^0.4.6",
|
|
"nodemailer": "^9.0.5",
|
|
"pg": "^8.21.0",
|
|
"prisma": "^7.8.0",
|
|
"react": "19.2.4",
|
|
"react-dom": "19.2.4",
|
|
"react-easy-crop": "^6.2.3",
|
|
"react-hook-form": "^7.77.0",
|
|
"react-intersection-observer": "^10.0.3",
|
|
"server-only": "^0.0.1",
|
|
"sonner": "^2.0.7",
|
|
"stripe": "^22.5.0",
|
|
"tailwind-merge": "^3.6.0",
|
|
"tw-animate-css": "^1.4.0",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/node": "^20",
|
|
"@types/nodemailer": "^8.0.1",
|
|
"@types/pg": "^8.20.0",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"@vitest/coverage-v8": "^4.1.8",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.2.7",
|
|
"jsdom": "^28.1.0",
|
|
"shadcn": "^4.10.0",
|
|
"tailwindcss": "^4",
|
|
"tsx": "^4.22.4",
|
|
"typescript": "^6.0.3",
|
|
"vitest": "^4.1.8"
|
|
}
|
|
}
|