AI Blog Writer
Relevant source files
The following files were used as context for generating this wiki page:
The AI Blog Writer is a modular content generation system within the ALwrity platform designed to automate the creation of high-quality, SEO-optimized blog posts. It transforms high-level topics or research data into structured outlines, detailed section content, and metadata-rich articles suitable for direct publishing to platforms like WordPress or Wix. Sources: README.md, backend/services/blog_writer/README.md
The system follows a multi-phase workflow: Research, Outline Generation, Content Creation, and Optimization. It utilizes advanced LLM providers (including Google Gemini, OpenAI, and Anthropic) and real-time web research tools to ensure factual accuracy and competitive positioning. Sources: backend/services/blog_writer/README.md:27-33, frontend/src/components/BlogWriter/BlogWriter.tsx:431-440
Service Architecture
The AI Blog Writer utilizes a modular service-oriented architecture to separate concerns between research coordination, outline structuring, and content generation. Sources: backend/services/blog_writer/README.md:16-25
Core Components
| Component | Responsibility |
|---|---|
| BlogWriterService | Main orchestrator coordinating research, outline, and content modules. |
| ResearchService | Manages keyword analysis, competitor intelligence, and content angle discovery. |
| OutlineService | Handles generation, refinement, and optimization of the blog structure. |
| ContentModule | Generates section-specific markdown content and refinements. |
| OptimizationModule | Performs SEO analysis, readability checks, and metadata generation. |
Sources: backend/services/blog_writer/README.md:16-25, backend/services/blog_writer/README.md:73-81
Data Flow Diagram
The following diagram illustrates the linear progression from initial research to a finalized blog post.
Outline Generation Logic
The OutlineGenerator uses research intelligence to build a comprehensive "Content Strategy Brief." This brief includes keyword difficulty, content gaps, and market positioning to inform the AI's structural decisions. Sources: backend/services/blog_writer/outline/outline_generator.py:22-45
Strategic Requirements
The generator adheres to specific architectural standards:
- Narrative Arc: Guides readers from problem to solution.
- Word Count Distribution: Allocates approximately 12% for the Introduction, 76% for Main Content, and 12% for the Conclusion.
- SEO Integration: Strategically places primary, secondary, and long-tail keywords.
- Engagement: Includes storytelling elements and actionable takeaways.
Sources: backend/services/blog_writer/outline/outline_generator.py:114-145
Outline Structure Schema
Outlines are generated as structured JSON to ensure consistency in the frontend editor.
{
"title_options": ["Option 1", "Option 2"],
"outline": [
{
"heading": "Section Title",
"subheadings": ["Sub 1", "Sub 2"],
"key_points": ["Point A", "Point B"],
"word_count": 300,
"keywords": ["keyword1"]
}
]
}
Sources: backend/services/blog_writer/outline/outline_generator.py:157-184
Content Generation and Quality Assurance
The system supports two generation modes: Draft (optimized for speed/cost) and Polished (optimized for quality and depth). Sources: frontend/src/components/BlogWriter/BlogWriter.tsx:484-490
Hallucination Detection
ALwrity incorporates a specialized quality check that identifies factual claims within the generated text. It cross-references these claims with supporting URLs and provides a "HITL" (Human-In-The-Loop) interface to apply fixes or citations directly to the markdown. Sources: frontend/src/components/BlogWriter/BlogWriter.tsx:340-370
SEO Analysis
The runSEOAnalyze action evaluates the full draft against target keywords, returning an SEO score and specific recommendations for improvement. Sources: frontend/src/components/BlogWriter/BlogWriter.tsx:317-328
Content Rewriting and Updating
The "AI Blog Rewriter & Updater" module specializes in revitalizing existing content. It performs age analysis, publication date detection, and fact-checking against current web data. Sources: ToBeMigrated/ai_writers/blog_rewriter_updater/README.md:9-18
Transformation Modes
| Mode | Purpose |
|---|---|
| SEO Optimization | Enhances content for search engines with targeted keywords. |
| Tone Shift | Changes writing style (e.g., Professional to Conversational). |
| Modernization | Updates outdated information with current trends. |
| Fact Check | Specifically targets and corrects outdated or incorrect data points. |
Sources: ToBeMigrated/ai_writers/blog_rewriter_updater/README.md:32-40
Technical Implementation Details
Configuration Options
Users can customize the generation through the OutlineConfig or through the interactive Co-Pilot sidebar. Sources: ToBeMigrated/ai_writers/ai_outline_writer/README.md:14-25, frontend/src/components/BlogWriter/BlogWriter.tsx:441-470
- Content Types: Tutorial, Listicle, Case Study, Comparison, etc.
- Depth: Basic, Intermediate, Advanced, Expert.
- Style: Modern, Professional, Technical, Inspirational.
- Image Integration: Supports engines like Gemini-AI, Dalle3, and Stability-AI.
Research Depth Levels
- Basic: Standard Google Search for general information.
- Comprehensive: Uses Tavily AI for multi-source integration.
- Expert: Uses Metaphor/Exa AI for specialized, conceptual similarity.
Sources: ToBeMigrated/ai_writers/ai_outline_writer/README.md:154-162, backend/services/blog_writer/README.md:27-33
The AI Blog Writer serves as a central hub for content production, leveraging modular backend services and an interactive React frontend to move from research to publication efficiently. Its focus on AI-grounding and SEO-first architecture distinguishes it as an enterprise-grade tool for solopreneurs. Sources: README.md:7-15, backend/services/blog_writer/README.md:46-52