diff --git a/backend/brand_style.py b/backend/brand_style.py index 123f42d..2ed1c47 100644 --- a/backend/brand_style.py +++ b/backend/brand_style.py @@ -1,6 +1,7 @@ from typing import Dict import json from pathlib import Path +from config import Config class BrandStyle: @@ -15,17 +16,72 @@ class BrandStyle: def _load_style(self) -> Dict: path = Path("data/style_guidelines/style.json") if path.exists(): - return json.loads(path.read_text()) + try: + return json.loads(path.read_text()) + except json.JSONDecodeError: + print(f"Warning: Invalid JSON in {path}, using default style") + return self._create_default_style(path) else: - # Create default style if doesn't exist - default_style = { - "tone": "professional", - "phrases": ["innovative", "results-driven", "empowering", "transformation"], - "avoid": ["cheap", "guarantee", "spam", "scam"] + return self._create_default_style(path) + + def _create_default_style(self, path: Path) -> Dict: + """Create default style guide structure""" + default_style = { + "brand_name": "Adriana James", + "brand_voice": { + "primary_tone": "empowering", + "secondary_tones": ["authentic", "professional", "inspiring"], + "personality_traits": [ + "confident but approachable", + "results-oriented", + "transformational", + "direct yet compassionate" + ] + }, + "writing_style": { + "sentence_structure": "Mix of short punchy sentences and longer explanatory ones", + "vocabulary_level": "Accessible yet sophisticated", + "perspective": "Second person (you/your) to create connection", + "active_voice_percentage": 85 + }, + "preferred_phrases": [ + "transform your", "breakthrough results", "unlock your potential", + "proven strategies", "next-level success", "game-changing", + "step into your power", "authentic leadership" + ], + "avoid_phrases": [ + "cheap", "free trial", "limited time only", "guarantee", + "magic bullet", "overnight success", "easy money" + ], + "call_to_action_style": { + "urgency_level": "moderate", + "action_verbs": ["discover", "unlock", "transform", "master", "elevate"], + "format": "Clear, specific, benefit-focused" + }, + "target_audience": { + "primary": "ambitious professionals and entrepreneurs", + "demographics": "30-50 years old, career-focused", + "pain_points": ["feeling stuck", "lack of clarity", "imposter syndrome"], + "aspirations": ["leadership roles", "business growth", "personal fulfillment"] + }, + "brand_values": [ + "authenticity over perfection", + "growth through challenge", + "sustainable success", + "empowerment through education" + ], + "content_guidelines": { + "storytelling": "Use personal anecdotes and client success stories", + "social_proof": "Include testimonials and case studies naturally", + "educational_value": "Always provide actionable insights", + "emotional_connection": "Address fears and aspirations directly" } - path.parent.mkdir(parents=True, exist_ok=True) - path.write_text(json.dumps(default_style, indent=2)) - return default_style + } + + # Create directory and save default style + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(default_style, indent=2)) + return default_style def _load_template(self, name: str) -> str: path = Path(f"data/style_guidelines/{name}_template.txt") @@ -47,32 +103,64 @@ class BrandStyle: if hasattr(request, 'dict'): # It's a Pydantic model request_dict = request.dict() - tone = request.tone or self.style['tone'] + tone = request.tone or self.style.get('brand_voice', {}).get('primary_tone', 'professional') content_type = request.content_type else: # It's already a dict request_dict = request - tone = request_dict.get('tone', self.style['tone']) + tone = request_dict.get('tone', self.style.get('brand_voice', {}).get('primary_tone', 'professional')) content_type = request_dict.get('content_type', 'general') - + + # Load the comprehensive style guide content + brand_voice = self.style.get('brand_voice', {}) + writing_style = self.style.get('writing_style', {}) + target_audience = self.style.get('target_audience', {}) + content_guidelines = self.style.get('content_guidelines', {}) + cta_style = self.style.get('call_to_action_style', {}) + return f""" -You are a marketing assistant for Adriana James. Follow these brand guidelines: +You are a marketing copywriter for {self.style.get('brand_name', 'Adriana James')}. -TONE: {tone} -STYLE: Professional, authentic, and empowering +BRAND VOICE & PERSONALITY: +- Primary tone: {brand_voice.get('primary_tone', 'empowering')} +- Secondary tones: {', '.join(brand_voice.get('secondary_tones', []))} +- Personality traits: {', '.join(brand_voice.get('personality_traits', []))} -PREFERRED PHRASES: {', '.join(self.style['phrases'])} -AVOID USING: {', '.join(self.style['avoid'])} +WRITING STYLE REQUIREMENTS: +- Sentence structure: {writing_style.get('sentence_structure', 'Mix of short punchy sentences and longer explanatory ones')} +- Vocabulary level: {writing_style.get('vocabulary_level', 'Accessible yet sophisticated')} +- Perspective: {writing_style.get('perspective', 'Second person (you/your)')} +- Use active voice {writing_style.get('active_voice_percentage', 85)}% of the time -CONTENT TYPE: {content_type} -TEMPLATE GUIDANCE: {self.templates.get(content_type, self.templates['general'])} +TARGET AUDIENCE CONTEXT: +- Primary audience: {target_audience.get('primary', 'ambitious professionals')} +- Demographics: {target_audience.get('demographics', '30-50 years old, career-focused')} +- Main pain points: {', '.join(target_audience.get('pain_points', []))} +- Key aspirations: {', '.join(target_audience.get('aspirations', []))} -Create marketing copy that: -1. Reflects Adriana James' brand voice -2. Is engaging and authentic -3. Includes a clear value proposition -4. Has a compelling call-to-action when appropriate -5. Feels personal and relatable +PREFERRED LANGUAGE: +- Use these phrases: {', '.join(self.style.get('preferred_phrases', []))} +- NEVER use these: {', '.join(self.style.get('avoid_phrases', []))} -Remember: Focus on transformation, empowerment, and results while maintaining professionalism. +CONTENT GUIDELINES: +- Storytelling approach: {content_guidelines.get('storytelling', 'Use personal anecdotes and client success stories')} +- Social proof: {content_guidelines.get('social_proof', 'Include testimonials naturally')} +- Educational value: {content_guidelines.get('educational_value', 'Always provide actionable insights')} +- Emotional connection: {content_guidelines.get('emotional_connection', 'Address fears and aspirations directly')} + +CALL-TO-ACTION STYLE: +- Urgency level: {cta_style.get('urgency_level', 'moderate')} +- Preferred action verbs: {', '.join(cta_style.get('action_verbs', []))} +- Format: {cta_style.get('format', 'Clear, specific, benefit-focused')} + +BRAND VALUES TO REFLECT: +{chr(10).join(f"- {value}" for value in self.style.get('brand_values', []))} + +CONTENT TYPE: {content_type.upper()} +SPECIFIC TEMPLATE GUIDANCE: +{self.templates.get(content_type, self.templates.get('general', ''))} + +REQUESTED TONE FOR THIS PIECE: {tone} + +Create marketing copy that embodies Adriana James' authentic, empowering brand voice while following all the above guidelines. Focus on transformation, breakthrough results, and sustainable success. """ diff --git a/data/style_guidelines/email_template.txt b/data/style_guidelines/email_template.txt index db4abba..cecf4f5 100644 --- a/data/style_guidelines/email_template.txt +++ b/data/style_guidelines/email_template.txt @@ -1 +1,42 @@ -Write a professional email that engages the reader and includes a clear call-to-action. \ No newline at end of file +EMAIL TEMPLATE GUIDELINES FOR ADRIANA JAMES: + +STRUCTURE: +1. Subject Line: Clear, benefit-focused, no hype +2. Opening: Personal connection or relevant story +3. Body: Problem → Solution → Proof → Action +4. Closing: Warm, professional sign-off + +SUBJECT LINE EXAMPLES: +- "The mindset shift that changed everything" +- "What successful leaders do differently" +- "Your breakthrough moment is closer than you think" + +OPENING PATTERNS: +- Share a brief client success story +- Reference a common challenge the audience faces +- Ask a thought-provoking question +- Share a personal insight or observation + +BODY STRUCTURE: +- Identify the specific problem/challenge +- Present the solution with clear benefits +- Provide social proof (testimonials, case studies) +- Include 1-2 actionable tips readers can implement immediately + +CALL-TO-ACTION GUIDELINES: +- Use action-oriented language +- Focus on the benefit, not the action +- Create moderate urgency without being pushy +- Examples: "Discover your leadership potential", "Unlock your next breakthrough" + +TONE REMINDERS: +- Confident but not arrogant +- Direct but compassionate +- Professional but personable +- Focus on transformation and empowerment + +AVOID: +- Generic opening lines +- Overly promotional language +- Multiple CTAs that confuse the reader +- Jargon or complex terminology \ No newline at end of file diff --git a/data/style_guidelines/general_template.txt b/data/style_guidelines/general_template.txt index 84dac8f..fc161e5 100644 --- a/data/style_guidelines/general_template.txt +++ b/data/style_guidelines/general_template.txt @@ -1 +1,57 @@ -Generate marketing copy that is compelling, authentic, and aligned with brand values. \ No newline at end of file +GENERAL MARKETING COPY GUIDELINES FOR ADRIANA JAMES: + +CORE MESSAGING FRAMEWORK: +Who: Ambitious professionals ready for transformation +What: Proven strategies for breakthrough success +Why: Because you deserve to unlock your full potential +How: Through authentic leadership and strategic action + +BRAND POSITIONING: +"The go-to expert for ambitious professionals who want to break through barriers and create sustainable success through authentic leadership and proven strategies." + +KEY MESSAGE PILLARS: +1. Transformation is possible at any stage +2. Authentic leadership drives real results +3. Strategy + Mindset = Breakthrough success +4. Sustainable growth over quick fixes + +CONTENT THEMES: +- Leadership development and authentic presence +- Career advancement and professional growth +- Mindset shifts that create breakthrough results +- Work-life integration and sustainable success +- Building confidence and overcoming imposter syndrome + +STORYTELLING ELEMENTS: +- Personal journey from struggle to success +- Client transformation stories with specific results +- Industry insights from real-world experience +- Lessons learned from failures and setbacks +- Behind-the-scenes moments that build connection + +PROOF POINTS TO INCLUDE: +- Specific client results and transformations +- Years of experience and expertise +- Testimonials and success stories +- Industry recognition and credentials +- Media appearances and speaking engagements + +COMMON OBJECTIONS TO ADDRESS: +- "I don't have time for personal development" +- "I've tried other programs and nothing worked" +- "I'm not sure I'm ready for this level of change" +- "How do I know this will work for my situation?" + +LANGUAGE PATTERNS: +- Use "you" to create direct connection +- Include specific numbers and results when possible +- Balance aspiration with practical action steps +- Address both logical and emotional motivations +- Create urgency through opportunity, not scarcity + +BRAND DIFFERENTIATORS: +- Focus on sustainable success over quick wins +- Emphasis on authentic leadership vs. manipulation +- Strategic approach combined with mindset work +- Personal attention and customized strategies +- Proven track record with measurable results \ No newline at end of file diff --git a/data/style_guidelines/social_template.txt b/data/style_guidelines/social_template.txt index c7629be..b4f35d2 100644 --- a/data/style_guidelines/social_template.txt +++ b/data/style_guidelines/social_template.txt @@ -1 +1,56 @@ -Create an engaging social media post that captures attention and encourages interaction. \ No newline at end of file +SOCIAL MEDIA TEMPLATE GUIDELINES FOR ADRIANA JAMES: + +PLATFORM-SPECIFIC APPROACH: +LinkedIn: Professional insights, industry trends, leadership tips +Instagram: Behind-the-scenes, inspirational quotes, client transformations +Facebook: Community building, longer-form storytelling, engagement + +POST STRUCTURE: +1. Hook: Attention-grabbing first line +2. Context: Brief background or story +3. Insight: Key takeaway or lesson +4. Action: What the reader should do next + +HOOK EXAMPLES: +- "Here's what I learned from 100+ client conversations..." +- "The biggest myth about success that's holding you back:" +- "Plot twist: Your biggest weakness might be your superpower." + +CONTENT TYPES: +- Success stories (client transformations) +- Behind-the-scenes moments +- Industry insights and trends +- Personal reflections and lessons +- Actionable tips and strategies +- Inspirational quotes with context + +ENGAGEMENT STRATEGIES: +- Ask thought-provoking questions +- Use polls and interactive features +- Share controversial but valuable opinions +- Create "fill in the blank" posts +- Use storytelling to create emotional connection + +HASHTAG STRATEGY: +- Mix of branded and industry hashtags +- Focus on engagement over reach +- Include 3-5 relevant hashtags maximum +- Examples: #AuthenticLeadership #ProfessionalGrowth #CareerBreakthrough + +CALL-TO-ACTION PATTERNS: +- "What's your experience with this?" +- "Share your thoughts in the comments" +- "DM me if you want to dive deeper" +- "Tag someone who needs to see this" + +VISUAL GUIDELINES: +- Clean, professional aesthetic +- Consistent color palette +- High-quality images and graphics +- Include personal photos to build connection + +TONE FOR SOCIAL: +- More conversational than email +- Use emojis sparingly but effectively +- Share vulnerabilities and lessons learned +- Celebrate others' successes \ No newline at end of file