A minimal SaaS app with Clerk auth, Stripe payments, and Resend email — all provisioned by vibe-provision.
User → Clerk Auth → Next.js
├── /pricing → Stripe Checkout
├── /dashboard → Protected page
└── /api/webhooks/stripe → Stripe signature verification
├── checkout.session.completed → Resend welcome email
├── customer.subscription.updated → Update plan
└── customer.subscription.deleted → Downgrade
# 1. Provision all services
npx vp auth # One-time: paste API keys for Clerk, Stripe, Resend
npx vp up # Creates Stripe product/price/webhook, generates .env
# 2. Install dependencies
npm install
# 3. Run
npm run dev # http://localhost:3000That's it. Clerk auth, Stripe checkout, and webhook handling are all wired up.
Running npx vp up with the included vibe.yaml:
| Service | What's created | .env vars |
|---|---|---|
| Clerk | Auth config | NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY, sign-in/up URLs |
| Stripe | Pro Plan ($19/mo), Webhook endpoint | STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY, STRIPE_PRO_PLAN_MONTH_PRICE_ID, STRIPE_WEBHOOK_SECRET |
| Resend | Email domain | RESEND_API_KEY |
| Route | Auth | Description |
|---|---|---|
/ |
Public | Landing page with sign-in |
/pricing |
Public | Pricing page with checkout button |
/sign-in |
Public | Clerk sign-in |
/sign-up |
Public | Clerk sign-up |
/dashboard |
Protected | User dashboard |
/api/checkout |
Protected | Creates Stripe Checkout session |
/api/webhooks/stripe |
Public | Stripe webhook handler |
vibe.yaml の webhooks.url にはプレースホルダー (https://YOUR_DOMAIN/api/webhooks/stripe) が設定されています。
- ローカル開発: そのままで OK。
npx vp up実行時に Stripe CLI 経由のローカル転送用エンドポイントが自動設定されます。 - 本番デプロイ時: デプロイ先のドメインに書き換えてから
npx vp upを再実行してください。
# vibe.yaml — 本番用の例
webhooks:
url: https://app.example.com/api/webhooks/stripeUse Stripe CLI to forward webhooks:
stripe listen --forward-to localhost:3000/api/webhooks/stripeOr trigger a test event:
stripe trigger checkout.session.completed