feat(domaincheck): support all TLDs with suggestion alternatives
Tessera CI/CD / Lint & Type Check (push) Successful in 1m8s
Tessera CI/CD / Tests (push) Successful in 1m13s
Tessera CI/CD / Build & Deploy (push) Successful in 2m39s

- Accept full domains (e.g. "example.xyz") not just labels
- Check the entered TLD as primary result
- Show .de, .com, .net, .org as alternative suggestions below
- Primary result highlighted with accent border
- Input without TLD still works (shows all 4 suggestions)
- Updated i18n placeholders and added "suggestions" label

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-25 14:54:30 +02:00
parent 95423497ad
commit 9f78580606
8 changed files with 95 additions and 134 deletions
@@ -3,32 +3,14 @@ import { UseModule } from '../module-registry/module.guard';
import { CheckDomainDto } from './dto/check-domain.dto';
import { DomaincheckService } from './domaincheck.service';
/**
* Controller for the Domaincheck module.
*
* POST /modules/domaincheck/check — accepts a domain label, checks TLD
* variants via DNS, and returns availability status for each.
*
* Protected by @UseModule('domaincheck') which ensures the requesting
* tenant has the domaincheck module activated (per T-03-08).
*/
@Controller('modules/domaincheck')
@UseModule('domaincheck')
export class DomaincheckController {
constructor(private readonly domaincheckService: DomaincheckService) {}
/**
* Check domain availability across TLD variants.
*
* @param dto - Contains domain label and optional TLD list
* @returns Domain and results array with tld, fqdn, and status
*/
@Post('check')
async checkDomain(@Body() dto: CheckDomainDto) {
const results = await this.domaincheckService.checkDomain(
dto.domain,
dto.tlds,
);
const results = await this.domaincheckService.checkDomain(dto.domain);
return {
domain: dto.domain,