Create Product Module 
Objective
Enhance the existing Create Product interface without modifying or breaking any existing functionality.
The module shall:
1.	Generate highly optimized SEO product articles.
2.	Enrich manually entered FAQ questions using Tavily Search.
3.	Use DeepSeek to create polished content.
4.	Generate content suitable for:
o	Main Website Product Detail Page
o	Medium Articles
o	Quora Answers
5.	Support editable article preview.
6.	Support PDF and Word export.
7.	Maintain fast performance through backend processing.
8.	Minimize Tavily API consumption through FAQ batching.
________________________________________
Existing Interface (Do Not Modify)
The following fields and functionality must remain unchanged:
•	Product Name
•	Brand
•	Category
•	Price
•	Commission
•	Revenue
•	Cookie Life
•	Badge
•	Publish Status
•	Affiliate Link
•	Short Description
•	Product Description (Detailed)
•	Keywords
•	Upload Image
•	FAQ Text Area
•	Article Content Editor
•	Save Product Button
•	Preview Button
No visual layout changes should break existing functionality.
________________________________________
Content Generation Workflow
Step 1: Admin Inputs
Product Information
•	Product Name
•	Brand
•	Category
•	Keywords
•	Short Description
•	Product Description
•	Product Image
•	FAQ Questions
Example FAQ Input:
Is this supplement safe for beginners?
How long does it take to see results?
What are the side effects?
Can women use this supplement?
When should I take it?
________________________________________
Step 2: FAQ Batching Logic
To reduce Tavily API consumption:
DO NOT search each FAQ individually.
Instead:
Combine all FAQ questions into a single contextual search request.
Example:
Product:
Optimum Nutrition Gold Standard Whey
FAQs:
•	Is it safe for beginners?
•	How long before results?
•	Side effects?
•	Can women use it?
•	Best time to take it?
Construct Tavily Query:
"Optimum Nutrition Gold Standard Whey safety, beginners, expected results timeline, side effects, women usage, best time to take"
This should consume:
1 Tavily Search Request
instead of:
5 Separate Requests
________________________________________
Step 3: Tavily Search
Backend Service:
ContentResearchService
Responsibilities:
•	Build optimized search query
•	Submit search request to Tavily
•	Retrieve:
o	Search summaries
o	Context snippets
o	Supporting sources
o	Related insights
Store response temporarily.
________________________________________
Step 4: FAQ Intelligence Layer
Convert Tavily findings into structured knowledge.
Example:
{
"safe_for_beginners": "...",
"results_timeline": "...",
"side_effects": "...",
"women_usage": "...",
"best_time_to_take": "..."
}
This layer becomes reusable content for DeepSeek.
________________________________________
DeepSeek Content Generation
System Prompt
You are an expert affiliate content strategist, SEO writer, conversion copywriter, and consumer product analyst.
Use the supplied product data and research information to create:
•	Helpful content
•	SEO optimized content
•	Human readable content
•	EEAT-style content
•	Conversion optimized content
Avoid keyword stuffing.
Provide balanced viewpoints.
Do not make unsupported medical claims.
Use proper headings and structured formatting.
________________________________________
Standard Article Structure
Every generated article shall follow:
1. Introduction
Introduce the product and user problem.
________________________________________
2. Product Overview
Explain:
•	What it is
•	Brand
•	Purpose
________________________________________
3. Key Features
Bullet format preferred.
________________________________________
4. Benefits
Explain practical benefits.
________________________________________
5. Pros and Cons
Balanced presentation.
________________________________________
6. Who Should Use It
Identify target audience.
________________________________________
7. How To Use It
Usage recommendations.
________________________________________
8. Frequently Asked Questions
Use:
Admin FAQ Questions
plus
Tavily Research Data
Generate:
Question
Answer
Question
Answer
Question
Answer
________________________________________
9. Final Verdict
Summarize value proposition.
________________________________________
10. Affiliate Call To Action
Generate persuasive but compliant CTA.
Example:
Ready to experience the benefits of [Product Name]?
Click below to view pricing and current availability.
________________________________________
SEO Optimization Requirements
Use:
•	Product Name
•	Brand
•	Keywords
Naturally throughout article.
Generate:
SEO Meta Title
Max 60 characters.
________________________________________
SEO Meta Description
Max 160 characters.
________________________________________
Suggested URL Slug
Example:
best-optimum-nutrition-gold-standard-whey-review
________________________________________
Suggested Internal Linking Opportunities
List related product categories.
________________________________________
Multi-Channel Content Generation
Preview Window shall contain:
Website Article
Full SEO article.
________________________________________
Medium Version
Generate:
•	Educational article
•	Storytelling style
•	Less promotional
•	Problem-solution format
________________________________________
Quora Version
Generate:
Question-style response.
Natural and helpful.
Affiliate mention must be subtle and contextual.
________________________________________
Social Snippet
Generate:
•	Facebook post
•	LinkedIn post
•	X/Twitter post
Optional future enhancement.
________________________________________
Preview Window Enhancements
The Preview Button shall open a rich content preview.
Tabs:
1.	Website Article
2.	Medium Version
3.	Quora Version
________________________________________
Editable Preview
All generated content must remain editable.
User can:
•	Edit text
•	Replace images
•	Adjust headings
•	Correct grammar
•	Add links
before saving.
________________________________________
Export Functionality
Add buttons:
•	Download PDF
•	Download Word
Exports must preserve:
•	Typography
•	Headings
•	Images
•	Layout
•	Tables
•	Lists
exactly as shown in preview.
________________________________________
PDF Generation
Backend Preferred:
Python
Libraries:
•	reportlab
•	WeasyPrint
WeasyPrint preferred for visual fidelity.
________________________________________
Word Export
Backend Preferred:
Python
Library:
•	python-docx
Requirements:
Preserve:
•	headings
•	images
•	formatting
•	links
________________________________________
FAQ Cache System
Purpose:
Reduce Tavily consumption.
Table:
faq_cache
Fields:
id
product_category
faq_signature
research_content
created_at
updated_at
________________________________________
Cache Lookup
Before Tavily request:
Check cache.
If match exists:
Reuse research.
If not:
Perform Tavily search.
Store results.
________________________________________
Error Handling
If Tavily fails:
Fallback:
Generate article using:
•	Product Name
•	Description
•	Keywords
•	FAQs
without external research.
Display:
"Research data unavailable. Content generated using available product information."
Generation must continue.
________________________________________
Performance Requirements
All Tavily requests:
Server-side only.
Use:
•	Async processing
•	Background jobs
•	Request timeout handling
Target:
Article generation under 15 seconds.
________________________________________
Security Requirements
Never expose:
•	Tavily API key
•	DeepSeek API key
Keys remain server-side.
Use environment variables.
________________________________________
Success Criteria
The implementation is successful when:
•	Existing Create Product UI remains intact.
•	FAQ batching reduces Tavily usage.
•	DeepSeek generates structured SEO articles.
•	Preview remains editable.
•	PDF export matches preview.
•	Word export matches preview.
•	Medium version generated.
•	Quora version generated.
•	Draft saving continues to work.
•	No existing functionality is broken.



Preview Window Enhancement Requirements (Replace Any References To Separate Dashboards)
Critical Architectural Requirement
The implementation must NOT create:
•	A new dashboard
•	A new admin page
•	A new route
•	A new popup
•	A new module
•	A new navigation item
•	A new workflow
The implementation must ONLY extend the existing Preview Window that is already launched from the existing Create Product interface.
The current Create Product workflow must remain unchanged.
Existing functionality must continue to work exactly as it does today.
________________________________________
Preview Window Structure
The existing Preview button shall open an enhanced Preview Workspace.
The Preview Workspace shall contain two primary areas:
Left Side
Editable Content Workspace
Contains tabs:
•	Website Article
•	Medium Article
•	Quora Answer
•	Facebook Post
•	LinkedIn Post
•	X/Twitter Post
•	TikTok Script
All content remains editable before saving.
Users can:
•	Edit text
•	Edit headings
•	Edit CTA
•	Replace images
•	Insert links
•	Remove sections
•	Adjust formatting
without regenerating content.
________________________________________
Right Side
Preview Insights Panel
This is NOT a dashboard.
This is a contextual analysis panel displayed inside the existing Preview Window.
The panel updates automatically whenever content is generated or edited.
The panel must not require additional Tavily requests.
The panel must not require additional DeepSeek requests.
All calculations must be performed locally using generated content.
Target refresh time:
Less than 500 milliseconds.
________________________________________
Preview Insights Panel
Display compact score cards using the existing design system.
Use:
•	Progress bars
•	Badges
•	Tooltips
•	Status indicators
Avoid creating a separate page or dashboard.
________________________________________
SEO Analysis Section
Display:
SEO Score
Range:
0 - 100
Analyze:
•	Heading structure
•	Keyword placement
•	Meta description quality
•	Internal linking opportunities
Display Example:
SEO Score: 92/100
Status:
Excellent
________________________________________
Readability Score
Range:
0 - 100
Analyze:
•	Sentence length
•	Paragraph length
•	Reading complexity
•	Content structure
Display Example:
Readability Score: 88/100
Status:
Easy To Read
________________________________________
Keyword Coverage
Display:
Primary Keywords Found:
8/10
Secondary Keywords Found:
6/8
Suggested Missing Keywords:
•	Keyword A
•	Keyword B
________________________________________
CTA Strength
Range:
0 - 100
Analyze:
•	CTA wording
•	Placement
•	Visibility
•	Persuasiveness
Display Example:
CTA Strength: 90/100
Status:
Strong Conversion Potential
________________________________________
Overall Content Score
Calculated from:
•	SEO Score
•	Readability Score
•	Keyword Coverage
•	CTA Strength
Display Example:
Overall Content Score:
91/100
Status:
Ready For Publishing
________________________________________
Affiliate Opportunity Analysis
This section exists inside the Preview Insights Panel.
Do NOT create a separate Affiliate Dashboard.
________________________________________
Buyer Intent Score
Range:
0 - 100
Evaluate:
•	Product-focused keywords
•	Purchase intent phrases
•	Review phrases
•	Comparison phrases
Display Example:
Buyer Intent Score:
91/100
Status:
High Purchase Intent
________________________________________
Commercial Keyword Strength
Analyze:
•	Product Name
•	Brand
•	Keywords
•	Generated Article
Display:
Commercial Strength:
Strong
Suggested Opportunities:
•	Product Review
•	Product Alternatives
•	Product Comparison
•	Best In Category
________________________________________
Product Comparison Opportunities
Automatically generate suggested future content opportunities.
Example:
•	Product A vs Product B
•	Product A Alternatives
•	Best Products For Beginners
Purpose:
Future content cluster creation.
________________________________________
Recommended Internal Links
Suggest:
•	Related products
•	Related categories
•	Existing articles
Display recommendations only.
Do not automatically insert links.
________________________________________
Recommended Related Products
Display:
Customers interested in this product may also consider:
•	Related Product A
•	Related Product B
•	Related Product C
Purpose:
Cross-selling opportunities.
________________________________________
Content Optimization Controls
This functionality must remain simple.
Do NOT expose manual word count editing.
Do NOT expose manual reading time editing.
Do NOT expose advanced SEO configuration screens.
________________________________________
Content Length Preset Selector
Place inside the Preview Insights Panel.
Options:
•	Quick Read
•	Standard
•	In-Depth
•	Authority Guide
________________________________________
Quick Read
Target:
•	800–1200 words
•	3–5 minute reading time
Best For:
•	Social traffic
•	Product summaries
________________________________________
Standard (Default)
Target:
•	1500–2500 words
•	6–10 minute reading time
Best For:
•	Most affiliate product articles
________________________________________
In-Depth
Target:
•	2500–4000 words
•	10–15 minute reading time
Best For:
•	Competitive SEO terms
________________________________________
Authority Guide
Target:
•	4000–6000+ words
•	15–25 minute reading time
Best For:
•	Pillar content
•	Cornerstone content
________________________________________
Readability Impact Preview
When users select a different content length preset:
Do NOT regenerate content immediately.
Instead display projected estimates.
Example:
Current Readability Score:
88
Estimated Readability Score:
84
Expected Reading Time:
15 Minutes
Expected Word Count:
3500
Purpose:
Allow users to understand likely impact before choosing optimization.
________________________________________
Smart Recommendation
Display:
Recommended Length:
In-Depth
Reason:
Competitor content is longer and keyword competition is high.
OR
Recommended Length:
Standard
Reason:
Provides the best balance of readability and conversion potential.
________________________________________
Optimize Content Button
Add:
Optimize Content
Function:
Uses existing generated content and available product information to:
•	Improve readability
•	Improve keyword coverage
•	Improve heading structure
•	Improve CTA placement
•	Improve internal linking suggestions
without changing the meaning of the article.
________________________________________
Export Requirements
Inside the Preview Window provide:
•	Download PDF
•	Download DOCX
Exports must preserve:
•	Typography
•	Images
•	Layout
•	Lists
•	Tables
•	Branding
•	Formatting
exactly as shown in the Preview Window.
________________________________________
Critical Non-Breaking Requirement
The implementation must not break:
•	Create Product modal
•	Save Product functionality
•	Existing Preview functionality
•	Existing image upload workflow
•	Existing article editor
•	Existing publish workflow
•	Existing draft workflow
•	Existing product management features
This enhancement extends the existing Preview Window only.
It must not introduce any separate dashboard, screen, page, or workflow.

Content Intelligence Workflow (Critical Architecture Requirement)
Objective
Minimize API consumption.
Minimize response time.
Maximize article quality.
Avoid unnecessary Tavily and DeepSeek requests.
The system must treat Tavily and DeepSeek as separate services with distinct responsibilities.
________________________________________
Tavily Responsibilities
Tavily Purpose
Tavily is the Research Engine.
Tavily is NOT the article writer.
Tavily is NOT the SEO optimizer.
Tavily is NOT the FAQ answer writer.
Tavily's sole responsibility is:
•	Discover current web information 
•	Gather supporting facts 
•	Gather relevant context 
•	Identify common user concerns 
•	Retrieve authoritative sources 
•	Provide research material 
________________________________________
Tavily Input
The system shall construct ONE optimized research query using:
Product Name
Example:
Optimum Nutrition Gold Standard Whey
Brand
Example:
Optimum Nutrition
Category
Example:
Supplements
Keywords
Example:
whey protein, muscle recovery, protein powder
All FAQ Questions Combined
Example:
Is it safe for beginners?
How long does it take to see results?
What are the side effects?
Can women use it?
When should it be taken?
________________________________________
FAQ Batching Rule
The system must combine all FAQs into one contextual research request.
Example:
Optimum Nutrition Gold Standard Whey review, safety for beginners,
expected results timeline, side effects, women usage,
best time to take, benefits, drawbacks, user concerns
Perform:
ONE Tavily request
NOT:
Five separate Tavily requests.
________________________________________
Tavily Output
Tavily returns:
•	Research summaries 
•	Key findings 
•	Context snippets 
•	Source URLs 
•	Related information 
The output must be transformed into a structured research object.
Example:
{
  "product_overview": "...",
  "benefits": "...",
  "safety": "...",
  "usage": "...",
  "side_effects": "...",
  "comparison_points": "...",
  "sources": []
}
________________________________________
Tavily Cache Rules
Before performing a Tavily request:
Check cache.
If matching product research exists:
Use cached research.
Do not call Tavily.
Cache key should consider:
•	Product Name 
•	Brand 
•	Category 
•	FAQ Signature 
________________________________________
Tavily Reuse Rules
The following actions must NEVER trigger another Tavily request:
•	Editing article text 
•	Editing headings 
•	Editing images 
•	Switching Preview tabs 
•	Exporting PDF 
•	Exporting DOCX 
•	Viewing Medium content 
•	Viewing Quora content 
•	Viewing Social content 
Research should occur once per generation cycle.
________________________________________
DeepSeek Responsibilities
DeepSeek Purpose
DeepSeek is the Content Generation Engine.
DeepSeek is NOT responsible for web searching.
DeepSeek must consume:
•	Product information 
•	FAQ information 
•	Tavily research 
•	SEO keywords 
•	Content length preference 
and transform them into high-quality content.
________________________________________
DeepSeek Input Package
DeepSeek receives:
Product Metadata
•	Product Name 
•	Brand 
•	Category 
•	Keywords 
•	Product Description 
•	Short Description 
Research Package
Tavily research object.
FAQ Questions
Original admin-entered FAQ questions.
Content Length Preset
•	Quick Read 
•	Standard 
•	In-Depth 
•	Authority Guide 
________________________________________
Single Generation Rule
DeepSeek should generate ALL content variants in a single request.
Generate:
Website Article
Primary SEO article.
________________________________________
Medium Article
Educational version.
________________________________________
Quora Answer
Question-answer version.
________________________________________
Facebook Post
Social version.
________________________________________
LinkedIn Post
Professional version.
________________________________________
X/Twitter Post
Short-form version.
________________________________________
TikTok Script
Video script version.
________________________________________
Critical Optimization Rule
The system must NOT send separate DeepSeek requests for:
•	Website Article 
•	Medium Article 
•	Quora 
•	Facebook 
•	LinkedIn 
•	Twitter 
•	TikTok 
All outputs must be generated from a single DeepSeek response.
This reduces:
•	Token consumption 
•	Cost 
•	Latency 
________________________________________
Recommended DeepSeek Output Structure
DeepSeek should return structured JSON.
Example:
{
  "websiteArticle": {},
  "mediumArticle": {},
  "quoraAnswer": {},
  "facebookPost": {},
  "linkedinPost": {},
  "twitterPost": {},
  "tiktokScript": {},
  "seoMetadata": {},
  "contentInsights": {}
}
________________________________________
Preview Window Workflow
When user clicks Preview:
Step 1
Validate fields.
________________________________________
Step 2
Check Tavily cache.
________________________________________
Step 3
If cache miss:
Perform ONE Tavily research request.
________________________________________
Step 4
Create research object.
________________________________________
Step 5
Send ONE DeepSeek request.
________________________________________
Step 6
Receive all generated content variants.
________________________________________
Step 7
Populate Preview Workspace:
•	Website tab 
•	Medium tab 
•	Quora tab 
•	Facebook tab 
•	LinkedIn tab 
•	Twitter tab 
•	TikTok tab 
________________________________________
Step 8
Calculate Preview Insights Panel metrics locally.
Do NOT use Tavily.
Do NOT use DeepSeek.
________________________________________
Step 9
Allow editing.
________________________________________
Step 10
Export PDF or DOCX without regeneration.
________________________________________
Optimize Content Workflow
When user clicks Optimize Content:
Do NOT call Tavily.
Do NOT repeat research.
Reuse existing research object.
Perform ONE DeepSeek optimization request only if necessary.
Otherwise perform local optimization where possible.
________________________________________
Performance Targets
Target API Consumption Per Article Generation
Tavily:
1 Request Maximum
DeepSeek:
1 Request Maximum
Total External Requests:
2 Requests Maximum
for a complete article generation cycle.
________________________________________
Success Criteria
A complete article generation cycle should:
•	Use one Tavily request 
•	Use one DeepSeek request 
•	Produce all content variants 
•	Populate all Preview tabs 
•	Populate Preview Insights Panel 
•	Support editing 
•	Support exporting 
without additional external API calls unless the user explicitly requests regeneration.
________________________________________
This section will save you a significant amount of API usage and processing time because it gives Cline a strict architecture:
1 Tavily request → 1 DeepSeek request → Multiple content outputs → Local analysis → Editable preview.
That is the most efficient design for the system you've described.

