Skip to content

HQ Coach subdomain templates#740

Open
kyrixdev wants to merge 8 commits intoDomain-Connect:masterfrom
kyrixdev:master
Open

HQ Coach subdomain templates#740
kyrixdev wants to merge 8 commits intoDomain-Connect:masterfrom
kyrixdev:master

Conversation

@kyrixdev
Copy link

@kyrixdev kyrixdev commented Feb 1, 2026

Description

Domain Connect templates for HQ Coach (https://hq.coach), a fitness coaching CRM platform that allows coaches and gym owners to manage their clients, forms, payments, and email communications.

These templates enable one-click custom domain setup for HQ Coach users through DNS providers that support Domain Connect (e.g., GoDaddy).

Templates:

  • hq.coach.forms.json — CNAME record for client forms, check-ins, and assessments (e.g., forms.yourdomain.comproxy.hq.coach)
  • hq.coach.payment.json — CNAME record for payment links and invoices (e.g., pay.yourdomain.comproxy.hq.coach)
  • hq.coach.email.json — SPF, DKIM (via Resend), DMARC, and domain verification records for sending emails from the user's own domain (e.g., no-reply@yourdomain.com)

All templates use the synchronous flow with digital signatures (syncPubKeyDomain: "hq.coach"). The RSA public key is published at _dck1.hq.coach. syncRedirectDomain is also set since we use redirect_uri for callback handling.

Type of change

  • New template
  • Bug fix (non-breaking change which fixes an issue in the template)
  • New feature (non-breaking change which adds functionality to the template)
  • Breaking change (fix or feature that would cause existing template behavior to be not backward compatible)

How Has This Been Tested?

  • Schema validated using JSON Schema template.schema
  • Template functionality checked using Online Editor
  • Template is checked using template linter
  • Template file name follows the pattern <providerId>.<serviceId>.json
  • resource URL provided with logoUrl is actually served by a webserver

Checklist of common problems

  • digital signatures are used and syncPubKeyDomain specified — set to hq.coach, public key published at _dck1.hq.coach
  • syncRedirectDomain is specified when intended to use redirect_uri parameter in the synchronous flow — set to hq.coach
  • no TXT record with SPF content — email template uses SPFM type for proper SPF merging; forms/payment templates have no SPF records
  • txtConflictMatchingMode is set on TXT records which shall be unique on a label — DMARC record has "txtConflictMatchingMode": "Full", Resend verification record has "Prefix" with "txtConflictMatchingPrefix": "resend-verification="
  • variables are set to the smallest scope needed — only %resendVerification% in email template, scoped within fixed format resend-verification=%resendVerification%; forms/payment have no custom variables at all
  • no variables as a host name to apply template on subdomain — forms/payment use hostRequired: true with standard host parameter and "host": "@"; email uses hostRequired: false (records apply to root domain)
  • no explicit usage of %host% variable in host attribute — all record hosts use @ or fixed strings (resend._domainkey, _dmarc, _resend)
  • essential setting is used on records which the user shall be able to change or remove manually — DMARC record has "essential": "Always" so users can adjust their DMARC policy without dropping the whole template

Example variable values

hq.coach.forms.json (no custom variables, only standard host):

{
"testData": {
"with-host": {
"variables": {
"domain": "example.com",
"host": "forms"
},
"results": [
{
"type": "CNAME",
"name": "forms",
"ttl": 3600,
"data": "proxy.hq.coach"
}
]
}
}
}

hq.coach.payment.json (no custom variables, only standard host):

{
"testData": {
"with-host": {
"variables": {
"domain": "example.com",
"host": "pay"
},
"results": [
{
"type": "CNAME",
"name": "pay",
"ttl": 3600,
"data": "proxy.hq.coach"
}
]
}
}
}

hq.coach.email.json:

{
"testData": {
"email-setup": {
"variables": {
"domain": "example.com",
"resendVerification": "re_abc123def456"
},
"results": [
{
"type": "TXT",
"name": "_resend",
"ttl": 3600,
"data": ""resend-verification=re_abc123def456""
},
{
"type": "SPFM",
"name": "@",
"data": "include:amazonses.com"
},
{
"type": "CNAME",
"name": "resend._domainkey",
"ttl": 3600,
"data": "resend._domainkey.resend.com"
},
{
"type": "TXT",
"name": "_dmarc",
"ttl": 3600,
"data": ""v=DMARC1; p=none; rua=mailto:dmarc@hq.coach""
}
]
}
}
}

@github-actions
Copy link

github-actions bot commented Feb 1, 2026

Linter OK:

Linter result for hq.coach.email.json
{"level":"warn","template":"hq.coach.email.json","error":"Key: 'Record.TxtCMM' Error:Field validation for 'TxtCMM' failed on the 'oneof' tag","code":"DCTL1005","dctl_note":"template field validation","time":1770464768}
Linter result for hq.coach.forms.json
Linter result for hq.coach.payment.json

@kyrixdev
Copy link
Author

kyrixdev commented Feb 1, 2026

Hi maintainers! 👋

These templates are for HQ Coach (https://hq.coach), a fitness coaching CRM platform that allows coaches and gym owners to manage their clients.

Use Case:
Our users (fitness coaches, gym owners) want to use their own custom domains for:

  • Forms (forms.theirdomain.com) - Client check-in forms, assessments, and intake forms
  • Payments (pay.theirdomain.com) - Payment links and invoices

Currently, users have to manually configure DNS records, which is error-prone and time-consuming for non-technical users. With Domain Connect, we can offer one-click domain setup that works seamlessly with GoDaddy and other supported providers.

Template Details:

  • Both templates create a simple A record pointing to our server IP
  • multiInstance: true allows users to configure multiple subdomains if needed
  • We've tested the flow and it works correctly once the templates are available

Thank you for reviewing! Please let me know if any changes are needed.

Updated the JSON structure for HQ Coach payment service to include host requirement and changed record type from A to CNAME.
@pawel-kow pawel-kow added PR description incomplete The PR description template was not filled in at all, altered or filled in improperly. Checklist of common problems not complete See PR template and mark *all* checkboxes, even if not applicable. Explain any discrepancies. labels Feb 1, 2026
@pawel-kow
Copy link
Member

@kyrixdev Would you mind filling in PR description properly and in fact review and test the template as indicated?

@kerolasa
Copy link
Collaborator

kerolasa commented Feb 2, 2026

Are you expecting this template to be applied using sync (pubkey auth) or async (oauth) flow?

@kyrixdev
Copy link
Author

kyrixdev commented Feb 7, 2026

Are you expecting this template to be applied using sync (pubkey auth) or async (oauth) flow?

We are using the synchronous flow with pubkey authentication (sync).

All three templates now specify syncPubKeyDomain: "hq.coach" and syncRedirectDomain: "hq.coach". The RSA public key is published as a TXT record at _dck1.hq.coach.

Templates have also been updated based on review feedback:

  • host attribute uses @ with hostRequired: true (forms/payment) instead of %host%
  • syncRedirectDomain added since we use redirect_uri for callbacks
  • Email template uses SPFM instead of TXT for SPF, proper txtConflictMatchingMode on DMARC, and essential: "Always" on DMARC
  • Added the email template (hq.coach.email.json) for Resend email domain setup

This JSON file contains configuration details for the HQ Coach email service, including provider information and DNS records for email sending.
Added syncPubKeyDomain and syncRedirectDomain fields. Updated host value in records.
Added syncPubKeyDomain and syncRedirectDomain fields. Updated host in records to '@'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Checklist of common problems not complete See PR template and mark *all* checkboxes, even if not applicable. Explain any discrepancies. PR description incomplete The PR description template was not filled in at all, altered or filled in improperly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants