Mental model
Vibestrap follows a fill-what-you-use model. The app boots with two real values (DATABASE_URL + BETTER_AUTH_SECRET); everything else is optional and gracefully
no-ops when blank. Don’t have a Stripe account yet? The pricing page just hides the
checkout button. No Resend key? Password reset still renders, just doesn’t send.
But here’s the trap most people fall into:
The 3 config layers
Vibestrap’s configuration lives in three places, each for a reason:Where you’ll edit values
The flow on a live cluster:.env.local and pnpm dev picks them up
automatically — no restart dance.
Required: the 4 values without which the site shows 500
Skip any of these and the site won’t render. Do these first.DATABASE_URL — your Postgres
/login,
/register, /pricing, /admin will not.Where to sign up: neon.tech — serverless Postgres, generous
free tier, indie-friendly. (Alternatives: Supabase, Railway, RDS — anything that
speaks Postgres 15+.)Create the project
- Sign up at https://neon.tech
- Create a new project — pick a region close to your K8s cluster (e.g.
us-east-2if your nodes are there) - Wait ~10 seconds for provisioning to finish
Grab the connection string
- In the left sidebar, click Connection Details
- Important: select Pooled connection (handles serverless and burst traffic way better than direct)
- Copy the URL it shows
- Make sure it ends with
?sslmode=require— Neon enforces TLS, your app will fail to connect without it
Paste into k8s/.env
BETTER_AUTH_SECRET — auth signing key
Generate
=.Paste into k8s/.env
NEXT_PUBLIC_APP_URL — your domain
localhost, every shared link will be broken.http://.BETTER_AUTH_URL — auth callback root
NEXT_PUBLIC_APP_URL. The only reason to
split them is if your auth lives on a different subdomain.Strongly recommended: the things buyers expect to work
Without these, the site loads but key features are broken: users can’t recover passwords, can’t sign in via Google or GitHub, can’t pay you. Set them up before launch — not after the first user complaint.Resend (transactional email)
Why: password reset, email verification, welcome emails. Without it, the “forgot password” button is purely decorative. Where to sign up: resend.com — free tier covers 100 emails per day, 3,000 per month. Plenty for early launch.Sign up + verify your own email
Add and verify your domain
- Left sidebar → Domains → Add Domain
- Enter your domain (e.g.
vibestrap.dev) - Resend shows 3 DNS records (SPF, DKIM, DMARC) — don’t close the page
- Add those DNS records at your registrar (Cloudflare, Namecheap, GoDaddy, …)
- Click Verify DNS Records; wait 5–30 min until status shows Verified
Create an API key
- Left sidebar → API Keys → Create API Key
- Permission: “Sending access” is enough
- Copy the
re_xxxkey — it’s only shown once
RESEND_FROM_EMAIL (e.g. Larry from Vibestrap) is
optional, but it noticeably improves deliverability — bare hello@… looks like a bot.Admin access
You’ll want to reach/admin yourself.
admin role on first login and from then on can access /admin.
Google OAuth
Why: roughly 60% of indie devs prefer “sign in with Google” over typing a password. The conversion lift on a signup form with this button alone is huge. Where to set up: console.cloud.google.comPick or create a Google Cloud project
Configure the OAuth consent screen
- Left menu → APIs & Services → OAuth consent screen
- User type: External → Create
- Fill App name, User support email, Developer contact email
- Save and continue through the scopes / test users screens (defaults are fine)
Create the OAuth client
- Left menu → APIs & Services → Credentials
- + Create Credentials → OAuth 2.0 Client ID
- Application type: Web application
- Name: anything (e.g. “Vibestrap”)
- Authorized JavaScript origins:
https://vibestrap.dev - Authorized redirect URIs:
https://vibestrap.dev/api/auth/callback/google(this exact path — Better Auth uses it) - Click Create → modal shows Client ID + Client Secret → copy both immediately
GitHub OAuth
Why: Vibestrap targets developers, and “sign in with GitHub” converts ~80% of devs who land on your signup page. Worth 5 minutes of setup. Where to set up: github.com/settings/developers → OAuth Apps → New OAuth AppFill the form
- Application name: Vibestrap (or whatever you want users to see)
- Homepage URL:
https://vibestrap.dev - Authorization callback URL:
https://vibestrap.dev/api/auth/callback/github - Click Register application
Grab credentials
- Copy the Client ID shown on the app page
- Click Generate a new client secret → copy it immediately (only shown once)
Stripe
Why: take money. Without this, the entire pricing page is decorative. Where to set up: dashboard.stripe.comActivate your Stripe account
Grab the API keys
- Developers → API keys
- Copy Secret key (
sk_live_...) - Copy Publishable key (
pk_live_...)
Create the product and prices
- Products → + Add product
- Name it “Vibestrap” (or whatever your product is called)
- Add prices under that product. For Vibestrap typically two:
- Standard one-time: e.g. $99
- Promo one-time: e.g. $49 (optional sale price)
- Click into each price; copy the
price_xxxID from the URL or the price detail panel
Register the webhook
- Developers → Webhooks → + Add endpoint
- Endpoint URL:
https://vibestrap.dev/api/webhooks/stripe - Events to send (toggle each):
checkout.session.completedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failed
- Click Add endpoint
- On the endpoint detail page, click Reveal next to Signing secret → copy
whsec_...
SEO + analytics — strongly recommended
These don’t affect whether your site works, but they directly affect whether anyone finds it.Google Search Console — site verification
Why: Google won’t reliably index your site without verification. No SEO traffic = no organic growth = paid ads are your only acquisition channel. Where: search.google.com/search-consoleAdd the property
- Add property → URL prefix → enter
https://vibestrap.dev - Choose HTML tag verification method
Copy just the value
<meta name="google-site-verification" content="ABC123..." />.
You only want the bit between the quotes — ABC123....Microsoft Clarity — heatmaps + session recordings
Why: free heatmaps, session recordings, and dead-click detection. The best $0 you’ll ever not-spend on user research. Where: clarity.microsoft.comCreate a project
- Sign in (Microsoft / Google / Facebook all work)
- New project → name it, paste your URL
- Skip the install instructions; Vibestrap injects the script automatically
- Copy the project ID — 10-char alphanumeric, shown on the install instructions page
PostHog — product analytics (optional)
Why: funnels, retention, feature flags. Free tier covers 1M events/month, more than enough for early-stage products. Where: posthog.comCreate a project
- Sign up; create a new project
- Project Settings → Project API Key → copy
phc_xxx - Note the host: US cloud is
https://us.i.posthog.com, EU ishttps://eu.i.posthog.com
Optional — only when you actually need them
A single table for everything else. Don’t pre-emptively wire these — they’re each “feature off until you fill in the var”.Apply + verify
You’ve filled ink8s/.env. Now push it into the cluster and prove it works.
Apply your changes
Verify the user flows (don’t trust pod status alone)
kubectl get pods showing 1/1 Running only proves the process boots. It does not
prove the database is reachable, OAuth redirects work, or Stripe webhooks fire. Walk
through this list manually:
Homepage renders
https://vibestrap.dev. Should render. If it 500s, the most common causes are
typoed DATABASE_URL, or you forgot to run pnpm db:migrate after
configuring the database (see the warning at the top of the
“Required” section).Email signup works
/register, sign up with email. Check your inbox for the welcome email.
Validates: Resend API key + verified domain.Google sign-in works
/login, click Continue with Google. Should redirect, prompt, return to
your app logged in. Validates: Google OAuth client + redirect URI.GitHub sign-in works
Forgot-password email arrives
/login, click “Forgot password”. Submit your email. Email should arrive within
30 seconds. Validates: Resend further + auth wiring.Admin dashboard reachable
ADMIN_EMAILS. Visit /admin. Should load — not 403.
Validates: ADMIN_EMAILS parsing.Pricing page → Stripe Checkout
/pricing. Click any checkout button. Should land on a Stripe Checkout page
under checkout.stripe.com. Validates: Stripe live keys + price IDs are configured.A real test purchase end-to-end
4242 4242 4242 4242 (only works
in test mode — for live mode use a real card and refund yourself, or run this whole
test against a sandbox first). Confirm:- payment shows up in Stripe dashboard
- webhook fires (Stripe → Webhooks → your endpoint shows a
200) - a row appears in
paymenttable - credits land in your account (visible in
/dashboard) - visiting
/settings/purchasesshows the GitHub invite form for the buyer-only repo