Add backend-generated sitemap with website manifest sync and nginx SEO proxy support.

Stores synced route config from /meshkee/sitemap-config.json, serves sitemap.xml and robots.txt per tenant, and invalidates cache on CMS writes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-22 15:15:32 +03:30
co-authored by Cursor
parent c7d5204b49
commit 2e8d7c1cfd
27 changed files with 1167 additions and 3 deletions
+8
View File
@@ -13,6 +13,7 @@ import { AuthUser } from '../auth/auth.types';
import { PermissionsService } from '../auth/permissions.service';
import { BusinessSettingsService } from '../business-settings/business-settings.service';
import { PrismaService } from '../prisma/prisma.service';
import { SitemapService } from '../sitemap/sitemap.service';
import { TenantService } from '../tenant/tenant.service';
import {
CreatePortfolioCommentDto,
@@ -47,6 +48,7 @@ export class PortfoliosService {
private readonly permissions: PermissionsService,
private readonly tenant: TenantService,
private readonly businessSettings: BusinessSettingsService,
private readonly sitemap: SitemapService,
) {}
async list(businessIdRaw: string, query: ListPortfoliosDto, actor: AuthUser) {
@@ -181,6 +183,8 @@ export class PortfoliosService {
return portfolio;
});
await this.sitemap.invalidateForBusiness(businessId);
return {
message: 'Portfolio created successfully',
portfolio: await this.serializePortfolio(created),
@@ -344,6 +348,8 @@ export class PortfoliosService {
return portfolio;
});
await this.sitemap.invalidateForBusiness(businessId);
return {
message: 'Portfolio updated successfully',
portfolio: await this.serializePortfolio(updated),
@@ -392,6 +398,8 @@ export class PortfoliosService {
this.prisma.portfolios.delete({ where: { id: portfolioId } }),
]);
await this.sitemap.invalidateForBusiness(businessId);
return { message: 'Portfolio deleted successfully' };
}