Paddle payment integration + Claude-powered auto build log pipeline
Added Paddle as a first-class payment provider alongside the existing Stripe/Toss setup.
A single runtime env var controls which provider activates.
Then wired up a pipeline where every git push triggers Claude CLI to generate a build log.
Which is exactly what you’re reading right now.
Paddle integration
The hard constraint: don’t touch the existing Stripe/Toss code.
The solution was an effectiveProvider runtime flag in paywall/page.tsx.
Set NEXT_PUBLIC_PAYMENT_PROVIDER=paddle and all non-KR traffic routes to Paddle. Unset it and you get the country-default behavior.
New API routes:
- /api/checkout/paddle/create Creates a Paddle checkout session.
- /api/checkout/paddle/webhook Handles payment completion callbacks.
Passed typecheck and next build clean.
The automation pipeline
This was the more interesting story.
git push
→ husky pre-push hook
→ Claude CLI generates build log markdown
→ GitHub Actions syncs to portfolio repo
The key design decision was gtimeout 60 wrapping the Claude CLI call.
If it hangs, the push shouldn’t block. Failure exits gracefully with || echo "skip".
Two bugs burned time:
-
macOS doesn’t have
timeout. Had to installcoreutilsforgtimeout. -
The Claude CLI path failed with a relative reference. Hardcoded to
/Users/jidong/.local/bin/claude.
Deploy thrash
Five consecutive fix commits just to get the Vercel deployment working.
The monorepo root needed to point at apps/web.
The framework preset had to be nextjs explicitly in vercel.json.
Env vars had to be set before the build could succeed.
Classic deploy thrash. But at least each commit is cleanly labeled fix(deploy):.
Launch readiness audit
Prompted with: “No guessing — every claim needs a file path or an actual HTTP response.”
Claude ran pnpm dev:web, hit every API endpoint, tested rate limits to exhaustion.
Confirmed 429 on the 5th request.
Checked all 8 locales on desktop and iPhone 12 viewport.
Zero P0 issues found.
The automation pipeline was way more fun than the payment integration.
This post being auto-generated is the proof.
댓글 0