feat(deploy): add DNS verification with modal before proceeding to next step

Add standalone DNS check endpoint and verify DNS on Next click in the
deploy wizard (step 2). Show error modal with CNAME instructions when
DNS is not configured instead of disabling the Next button. Also make
the custom domain clickable in the app detail header.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
keyhan
2026-05-14 01:20:57 +03:30
parent e8be7fbf03
commit 583c4c4c90
5 changed files with 320 additions and 29 deletions
@@ -21,7 +21,7 @@ import { FileInterceptor } from '@nestjs/platform-express';
import { ApiTags, ApiOperation, ApiBearerAuth, ApiConsumes } from '@nestjs/swagger';
import { ApplicationsService } from './applications.service';
import { DomainService } from './domain.service';
import { CreateApplicationDto, UpdateApplicationDto, ScaleResourcesDto, SetCustomDomainDto } from './dto/application.dto';
import { CreateApplicationDto, UpdateApplicationDto, ScaleResourcesDto, SetCustomDomainDto, CheckDnsDto } from './dto/application.dto';
import { RolesGuard } from '../common/guards/roles.guard';
import { Roles } from '../common/decorators/roles.decorator';
import { UserRole, DatabaseType } from '../common/enums';
@@ -267,6 +267,12 @@ export class ApplicationsController {
// ── Custom Domain ─────────────────────────────────────────────
@Post('domain/check-dns')
@ApiOperation({ summary: 'Standalone DNS check (no app needed — for deploy wizard)' })
async checkDnsStandalone(@Body() dto: CheckDnsDto) {
return this.domainService.checkDnsStandalone(dto.domain, dto.appName);
}
@Get(':id/domain')
@ApiOperation({ summary: 'Get custom domain info and DNS setup instructions' })
async getDomainInfo(@Param('id') id: string, @Request() req: any) {