Skip to content

[SaaS #1] Infrastructure: wildcard domain, Vercel, Supabase Auth, Resend #87

@macwilling

Description

@macwilling

Overview

Manual infrastructure steps required before any code changes. Must be completed first — all subsequent SaaS issues depend on this.

Context

Moving TaskFlow to a true multi-tenant SaaS on billabledesk.com. Each tenant will get their own subdomain: {slug}.billabledesk.com (admin) and {slug}.billabledesk.com/portal (client portal). This issue covers all the infra/DNS/service configuration — no code changes.

Checklist

Domain

  • Purchase billabledesk.com
  • Point nameservers to Cloudflare (or add to existing Cloudflare account)

DNS (Cloudflare)

  • Add A / CNAME record: billabledesk.com → Vercel
  • Add wildcard CNAME: *.billabledesk.com → Vercel (proxied or grey-cloud for SSL)

Vercel

  • Add billabledesk.com as a custom domain on the project
  • Add *.billabledesk.com as a wildcard custom domain (Vercel Pro supports wildcard domains)
  • Verify SSL provisioned for both

Supabase Auth

  • Auth → URL Configuration → Site URL: set to https://billabledesk.com
  • Auth → URL Configuration → Redirect URLs: add https://*.billabledesk.com/auth/callback
    • Supabase supports wildcard redirect URLs for subdomains

Resend

  • Add and verify billabledesk.com as a sending domain in Resend
  • Update RESEND_DOMAIN environment variable in Vercel to billabledesk.com
  • Update local .env accordingly

Environment Variables (Vercel dashboard)

Depends On

Nothing — this is first.

Blocks

All other SaaS issues (#88 - #96)

Metadata

Metadata

Assignees

Labels

saas-migrationTrue multi-tenant SaaS migration

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions