import Link from "next/link"; import QRCode from "qrcode"; import { PaymentMethodType } from "@prisma/client"; import { auth } from "@/lib/auth"; import { buildPaymentUri } from "@/lib/payment-uri"; import { ProfileHeader } from "@/components/public/profile-header"; import { PaymentMethodCard } from "@/components/public/payment-method-card"; import { buttonStyles } from "@/components/ui/button"; const previewProfile = { displayName: "Your Name", username: "yourname", bio: "A public page where people can copy your payment details in one place.", avatarUrl: null, }; const previewMethodsBase: Array<{ id: string; type: PaymentMethodType; label: string; value: string; network: string | null; description: string | null; isVisible: boolean; }> = [ { id: "preview-monero", type: "BITCOIN", label: "Bitcoin", value: "bc1qrp8uudvq5rr5l0nuepkxvxayyny2ws2w0m8jz3", network: null, description: null, isVisible: true, }, { id: "preview-paypal", type: "PAYPAL", label: "PayPal", value: "https://paypal.me/yourname", network: null, description: null, isVisible: true, }, ]; const howItWorks = [ "Create an account and choose your public username.", "Add payment methods and optional social/contact links.", "Share your profile URL so people can copy details or scan QR.", ]; const whyPayMe = [ "No custody: PayMe does not hold funds.", "No processing: PayMe does not execute transactions.", "Self-hosted: run it on your own infrastructure.", "Open source: inspect and modify everything.", "Privacy-friendly: minimal profile data, no tracking layer built in.", ]; export default async function HomePage() { const session = await auth(); const previewMethods = await Promise.all( previewMethodsBase.map(async (method) => { const qrPayload = buildPaymentUri( method.type, method.value, method.network, ); let qrDataUrl: string | null = null; try { qrDataUrl = await QRCode.toDataURL(qrPayload, { margin: 1, width: 220, }); } catch { qrDataUrl = null; } return { ...method, qrPayload, qrDataUrl, }; }), ); const primaryHref = session?.user ? "/dashboard" : "/register"; const primaryLabel = session?.user ? "Open dashboard" : "Create your profile"; return (

PayMe

One public page for every way people can pay you.

Self-hosted payment profile pages for creators, freelancers, and OSS maintainers. No custody. No transaction processing. Just clear payment details and links.

{primaryLabel} View example

Profile preview

How a public PayMe profile is presented.

Payment Methods

{previewMethods.map((method) => ( ))}

How it works

    {howItWorks.map((item) => (
  1. {item}
  2. ))}

Why PayMe

    {whyPayMe.map((item) => (
  • {item}
  • ))}
); }