CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat: DNS auto-configuration for Cloudflare, GoDaddy, and Porkbun #4043

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/ecstatic-hopper-77iamvmainopened Jun 20, 20260/6 tasks
ccantynzcommented Jun 20, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/88


Summary

  • One-click DNS setup for Cloudflare, GoDaddy, and Porkbun — AlecRae pushes all 4 required records (TXT verification, SPF, DKIM CNAME, DMARC) directly to the provider's API, no copy-pasting
  • Per-record result badges show whether each record was Added / Updated / Already set / Failed
  • Manual fallback with step-by-step instructions still available below the auto-configure section for providers without API support (Namecheap, Google Domains, Other)
  • Security: credentials are used in-memory for a single API call and never stored or logged

Backend (apps/api/src/lib/dns-providers/)

  • types.ts — shared AutoConfigRecord/Result types + inferApexDomain() helper
  • cloudflare.ts — zone lookup by progressive label stripping, upsert per-record (existed/created/updated), proxied=false for DKIM compatibility
  • godaddy.ts — PUT per-record via GoDaddy API, relative name conversion (@ for apex)
  • porkbun.ts — retrieve-all-then-create/edit pattern, credentials in POST body
  • routes/domains.ts — new POST /:id/dns-autoconfig endpoint with Zod discriminated union validation

Frontend

  • apps/web/lib/api.tsdomainsApi.autoConfig() + response types
  • apps/web/app/(dashboard)/domains/page.tsxDnsSetupWizard rebuilt: auto-configure section at top (credential inputs, "Configure Automatically →" button, result display), manual instructions section below

Test plan

  • Add a domain on a Cloudflare-managed zone, enter an API token with Zone:DNS:Edit, click "Configure Automatically" — all 4 records appear in Cloudflare DNS
  • Repeat for GoDaddy (key + secret) and Porkbun (key + secretApiKey)
  • Verify that credentials are NOT stored anywhere after the call completes
  • Confirm that selecting a non-auto provider (Namecheap, Other) shows only the manual instructions
  • Confirm the "Check Now" footer button still works for manual users
  • Confirm per-record badges show correct status (created/updated/existed/failed)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GYakKc6rtYKmTgknsK1AiY


Generated by Claude Code

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts