feat: add custom domain support with SSL, DNS verification, and billing

Users can assign a custom domain to their app with automatic SSL via
cert-manager. Includes DNS verification flow (CNAME check), Persian
instructions, admin-configurable pricing via PlatformSetting, and
integration into the deploy wizard cost calculation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
keyhan
2026-05-14 00:36:29 +03:30
parent d87b50c6a4
commit 435cf92817
18 changed files with 1082 additions and 89 deletions
+18
View File
@@ -95,6 +95,24 @@ export class BillingController {
return this.billingService.calculateCost(dto);
}
// ─── Custom Domain Pricing ─────────────────────────────────────
@Get('settings/custom-domain-price')
@ApiOperation({ summary: 'Get custom domain monthly price' })
async getCustomDomainPrice() {
return this.billingService.getCustomDomainPrice();
}
@Patch('settings/custom-domain-price')
@Roles(UserRole.ADMIN)
@ApiOperation({ summary: 'Set custom domain monthly price (Admin)' })
async setCustomDomainPrice(@Body() body: { monthlyPrice: number }) {
if (body.monthlyPrice === undefined || body.monthlyPrice < 0) {
throw new BadRequestException('monthlyPrice must be a non-negative number');
}
return this.billingService.setCustomDomainPrice(body.monthlyPrice);
}
// ─── Wallet (User) ───────────────────────────────────────────────
@Get('wallet')