Implement Stage 3: Enhance content generation and metadata features

- Updated AI prompts to include metadata context, cluster roles, and product attributes for improved content generation.
- Enhanced GenerateContentFunction to incorporate taxonomy and keyword objects for richer context.
- Introduced new metadata fields in frontend components for better content organization and filtering.
- Added cluster match, taxonomy match, and relevance score to LinkResults for improved link management.
- Implemented metadata completeness scoring and recommended actions in AnalysisPreview for better content optimization.
- Updated API services to support new metadata structures and site progress tracking.
This commit is contained in:
IGNY8 VPS (Salman)
2025-11-19 20:07:05 +00:00
parent bae9ea47d8
commit 746a51715f
14 changed files with 892 additions and 23 deletions

View File

@@ -777,6 +777,11 @@ export interface ContentIdea {
estimated_word_count: number;
created_at: string;
updated_at: string;
// Stage 3: Metadata fields
site_entity_type?: string | null;
cluster_role?: string | null;
taxonomy_id?: number | null;
taxonomy_name?: string | null;
}
export interface ContentIdeaCreateData {
@@ -887,6 +892,7 @@ export interface TasksFilters {
cluster_id?: string;
content_type?: string;
content_structure?: string;
entity_type?: string; // Stage 3: Entity type filter
page?: number;
page_size?: number;
ordering?: string;
@@ -927,6 +933,11 @@ export interface Task {
post_url?: string | null;
created_at: string;
updated_at: string;
// Stage 3: Metadata fields
entity_type?: string | null;
taxonomy_id?: number | null;
taxonomy_name?: string | null;
cluster_role?: string | null;
}
export interface TaskCreateData {
@@ -2103,6 +2114,45 @@ export async function fetchSiteBlueprintById(id: number): Promise<SiteBlueprint>
return fetchAPI(`/v1/site-builder/blueprints/${id}/`);
}
// Stage 3: Site Progress API
export interface SiteProgress {
blueprint_id: number;
blueprint_name: string;
overall_status: 'in_progress' | 'complete' | 'blocked';
cluster_coverage: {
total_clusters: number;
covered_clusters: number;
details: Array<{
cluster_id: number;
cluster_name: string;
role: string;
coverage_status: string;
validation_messages: string[];
tasks_count: number;
content_count: number;
hub_pages: number;
supporting_pages: number;
attribute_pages: number;
is_complete: boolean;
}>;
};
taxonomy_coverage: {
total_taxonomies: number;
defined_taxonomies: number;
details: any[];
};
validation_flags: {
clusters_attached: boolean;
taxonomies_defined: boolean;
sitemap_generated: boolean;
all_pages_generated: boolean;
};
}
export async function fetchSiteProgress(blueprintId: number): Promise<SiteProgress> {
return fetchAPI(`/v1/site-builder/blueprints/${blueprintId}/progress/`);
}
export async function createSiteBlueprint(data: Partial<SiteBlueprint>): Promise<SiteBlueprint> {
return fetchAPI('/v1/site-builder/blueprints/', {
method: 'POST',