OpenCoreDev Releases Domain SDK 0.2.0: One TypeScript API to Add, Verify, and Remove Customer Domains Across Five Platforms
Custom domains are a standard SaaS feature.

Custom domains are a standard SaaS feature. Yet every hosting platform exposes a different API for them. OpenCoreDev has published Domain SDK , a TypeScript client that normalizes that work. Version 0.2.0 reached npm a day after the first release.
Domain SDK covers Vercel, Cloudflare for SaaS, Railway, Render, and Netlify. You add a hostname, show the exact DNS records, then track provider state until it is ready.
It does not register domains, host DNS, deploy apps, proxy traffic, or store tenant data. Your application keeps tenant authorization and state. The provider stays the source of truth.
The package is server-side only, so credentials never reach browser code. engines.node is >=20 , and Bun is supported. It is ESM-only and ships one runtime dependency, tldts .
Within that scope, the API is small. createDomainClient() returns a stateless client with seven members: add , get , refresh , list , verify , remove , and waitUntilActive . Every method accepts an AbortSignal . Add and remove are idempotent, so retries are safe.
Each adapter is a separate entry point: ./vercel , ./cloudflare , ./railway , ./render , ./netlify , and ./testing . Changing platforms means changing the import, not the workflow.
Because DNS, ownership, and TLS finish at different times, the SDK models them separately. DomainStatus carries eight values:
pending , pending_dns , pending_verification , pending_certificate , active , misconfigured , failed , unknown .
A Domain also holds verification ( pending | verified | failed | unknown ), certificate ( pending | active | expiring | failed | unknown ), and an issues array. Each issue has a code , message , optional record , and a retryable flag.
Records are typed the same way. DnsRecord has type , name , value , optional ttl , purpose , required , status , and optional description . purpose is routing , ownership , certificate , or other . status is pending , valid , invalid , or unknown .
Consequently, a Vercel hostname surfaces three separate records:
While the lifecycle is normalized, platform limits are not:
Cloudflare for SaaS requires a CNAME target, so the adapter does not claim apex support. Render alone accepts wildcard hostnames. No adapter edits customer DNS automatically.
Rather than hard-coding those limits, read client.capabilities at runtime. It exposes list , explicitVerification , managedCertificates , apexDomains , and wildcardDomains .
Source: MarkTechPost