Home
Softono

Artipub

Open source BSD-3-Clause TypeScript
3.2K
Stars
542
Forks
36
Issues
74
Watchers
6 months
Last Commit

 About Artipub

Article publishing platform that automatically distributes your articles to various media channels

Platforms

Web Self-hosted Docker

Languages

TypeScript

Links

Need Help Installing Artipub?

We provide expert installation service for this software. Our team will install, configure, and secure Artipub on your server. plans start at just $30.

ArtiPub AI - AI-Powered Article Publishing Platform

ArtiPub AI - AI-Powered Article Publishing Platform

ArtiPub AI is a revolutionary AI-powered article publishing platform that leverages advanced language models to automatically optimize and distribute your content across multiple platforms with maximum engagement potential.

๐Ÿš€ What's New in ArtiPub AI

ArtiPub has been completely rebuilt from the ground up with modern AI technology:

  • ๐Ÿค– AI-Powered Content Optimization: Uses advanced LLMs to automatically adapt your content for each platform's unique audience and requirements
  • ๐Ÿง  Intelligent Publishing Strategy: AI analyzes your content and determines optimal publishing schedules and platform selection
  • โšก Modern Tech Stack: Built with Next.js 15, TypeScript, Tailwind CSS, and shadcn/ui for a superior user experience
  • ๐ŸŽฏ Smart Scheduling: AI determines the best times to publish for maximum engagement
  • ๐Ÿ“Š Real-time Analytics Dashboard: Monitor your publishing tasks with live updates and detailed insights
  • ๐Ÿ” AI Spec Discovery: Automatically discover publishing workflows for new platforms without manual configuration

๐Ÿ”„ Migration from Browser Automation

The new ArtiPub AI replaces the previous browser automation approach with intelligent AI agents:

  • Before: Used Puppeteer to automate browser interactions
  • After: Uses AI to understand platform requirements and optimize content accordingly
  • Benefits: More reliable, faster, and produces better-optimized content

๐Ÿค– AI-Powered Workflow Management

ArtiPub now features an innovative multi-stage automation workflow system with AI-powered spec discovery:

1. AI Spec Discovery (NEW!)

  • Automatic Discovery: AI agents analyze platforms and automatically discover publishing workflows
  • Multi-Page Support: Follows navigation across multiple pages to discover complete workflows
  • Vision AI Detection: Uses computer vision to understand UI layout and identify elements visually
  • Element Detection: Intelligently identifies input fields, buttons, and editors
  • Selector Generation: Creates robust selectors with fallback strategies
  • Confidence Scoring: Each discovered element has a confidence score
  • Human Supervision: Optional human review at none/optional/required levels
  • Test Validation: Validates workflows with test articles before deployment

2. Workflow Specification (Markdown)

  • Describe automation workflows in human-readable markdown format
  • Specifications include platform details, interaction steps, selectors, and validation rules
  • Easy to understand, modify, and version control
  • AI can read and understand the specifications
  • Can be auto-generated by AI Spec Discovery

3. AI Code Generation

  • AI automatically generates TypeScript automation code from workflow specifications
  • Follows existing patterns (BaseSpider class) for consistency
  • Includes error handling, logging, and retry logic
  • Reduces manual coding and potential errors

4. AI Workflow Guardian

  • Continuously monitors workflow execution
  • Detects failures and analyzes root causes
  • Automatically fixes broken workflows when platform UIs change
  • Updates selectors and retry strategies as needed
  • Maintains audit log of all changes

5. Workflow Execution Engine

  • Executes workflows with intelligent retry strategies
  • Handles errors gracefully with fallback options
  • Reports detailed execution status
  • Tracks statistics and performance metrics

Benefits of Workflow Management System

  • Zero Configuration: AI discovers workflows automatically for new platforms
  • Maintainability: Workflows are documented and versioned
  • Adaptability: AI automatically adapts to platform changes
  • Reliability: Automated error detection and recovery
  • Scalability: Easy to add new platforms - just provide the URL
  • Transparency: All changes are logged and auditable

โœจ Key Features

AI-Powered Content Optimization

  • Automatically adapts titles, content, and metadata for each platform
  • Platform-specific formatting (Markdown for Juejin, HTML for others)
  • SEO optimization with keyword analysis
  • Audience-targeted content variations

Intelligent Multi-Platform Publishing

  • Supported Platforms: ็ŸฅไนŽ (Zhihu), ๆŽ˜้‡‘ (Juejin), CSDN, ็ฎ€ไนฆ (Jianshu), SegmentFault, ๅผ€ๆบไธญๅ›ฝ (OSCHINA)
  • Smart platform recommendation based on content analysis
  • Automated scheduling with optimal timing
  • Real-time publishing status tracking

Modern User Interface

  • Clean, intuitive design with shadcn/ui components
  • Real-time publishing dashboard
  • Mobile-responsive design
  • Dark mode support

๐Ÿ›  Technology Stack

  • Frontend: Next.js 15, React 18, TypeScript
  • UI Framework: Tailwind CSS, shadcn/ui
  • AI Integration: AI SDK with support for OpenAI and Anthropic
  • State Management: React Hooks
  • Styling: Modern design system with consistent theming

๐Ÿ“ธ Screenshots

Main Interface

ArtiPub AI Homepage

Publishing Dashboard

Publishing Dashboard

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/crawlab-team/artipub
cd artipub

# Install dependencies
npm install

# Start the development server
npm run dev

The application will be available at http://localhost:3000.

Production Build

npm run build
npm start

๐ŸŽฏ Usage

  1. Create Article: Write your article with title and content (Markdown supported)
  2. Select Platforms: Choose which platforms to publish to
  3. AI Optimization: Let AI analyze and optimize your content
  4. Publish: AI handles the publishing process with intelligent scheduling
  5. Monitor: Track progress in the real-time dashboard

๐Ÿงช AI Features in Detail

Content Optimization

  • Platform Adaptation: AI modifies content style for each platform's audience
  • SEO Enhancement: Automatic keyword optimization and meta descriptions
  • Engagement Optimization: A/B testing variations for better performance

Publishing Strategy

  • Platform Analysis: AI recommends best platforms for your content type
  • Timing Optimization: Determines optimal publishing times
  • Batch Processing: Handles multiple platforms simultaneously

๐Ÿ”ง Configuration

AI Provider Setup

The platform supports multiple AI providers. Configure in your environment:

# OpenAI
OPENAI_API_KEY=your_key_here

# Anthropic
ANTHROPIC_API_KEY=your_key_here

Workflow Management

ArtiPub uses a specification-driven approach for automation workflows. Workflow specifications are stored in docs/automation-workflow/.

AI-Powered Workflow Discovery (NEW!)

The easiest way to add a new platform is to let AI discover the workflow automatically:

import { workflowManagement } from '@/lib/workflow-management';

// Start AI-powered discovery with vision AI and multi-page support
const sessionId = await workflowManagement.discoverWorkflow(
  'https://newplatform.com/editor',
  {
    supervisionMode: 'optional', // none | optional | required
    useVisionAI: true,           // Enable vision-based detection
    multiPage: true,             // Follow multi-page workflows
    maxPages: 5,                 // Maximum pages to discover
    testArticle: {
      title: 'Test Article',
      content: 'Test content for validation'
    }
  }
);

// Monitor discovery progress
const session = workflowManagement.getDiscoverySession(sessionId);
console.log(`Progress: ${session.progress}% - ${session.currentStep}`);

// When complete, apply the discovered workflow
if (session.status === 'completed') {
  const workflow = await workflowManagement.applyDiscoveredWorkflow(sessionId);
  console.log(`Workflow ready: ${workflow.spec.platform.name}`);
  console.log(`Pages: ${session.discoveredPages?.length}`);
}

How AI Discovery Works:

  1. Platform Analysis: AI analyzes the platform's editor page structure
  2. Vision AI (Optional): Uses computer vision to understand UI layout visually
  3. Multi-Page Navigation: Follows navigation across multiple pages automatically
  4. Element Detection: Identifies input fields, buttons, and editors with confidence scores
  5. Selector Generation: Creates robust selectors with fallback strategies
  6. Workflow Building: Determines the optimal sequence of steps across all pages
  7. Validation: Tests the workflow with a sample article (if provided)
  8. Human Review: Optional supervision to verify AI's discoveries
  9. Export: Generates markdown specification for version control

Supervision Modes:

  • none: Fully automatic, no human intervention
  • optional: AI discovers, human reviews before activation
  • required: Human must approve each discovery step

Creating a New Workflow Manually

  1. Create Workflow Specification (Markdown):

    ### Platform Information
    - **Platform ID**: myplatform
    - **Base URL**: https://platform.com
    - **Editor URL**: https://platform.com/editor
    
    ### Workflow Steps
    
    #### Step 1: Navigate to Editor
    - Action: navigate
    - URL: https://platform.com/editor
    
    #### Step 2: Input Title
    - Action: fill
    - Selector: input[name="title"]
    - Value: {{article.title}}
    
  2. Load and Generate Code:

    import { workflowManagement } from '@/lib/workflow-management';
    
    // Load workflow from markdown
    const workflow = await workflowManagement.loadWorkflowFromMarkdown(
      'myplatform',
      markdownContent
    );
    
    // The system automatically generates TypeScript code
    console.log(workflow.generatedCode.code);
    
  3. Execute Workflow:

    const result = await workflowManagement.executeWorkflow('myplatform', {
      article: {
        id: '123',
        title: 'My Article',
        content: 'Article content...'
      },
      platform: 'myplatform'
    });
    

Workflow Maintenance

The AI Workflow Guardian automatically:

  • Monitors workflow execution
  • Detects when platform UIs change
  • Updates selectors and recovery strategies
  • Creates new workflow versions with fixes
  • Logs all maintenance actions

Version Management

// Get all versions for a platform
const versions = workflowManagement.getAllVersions('zhihu');

// Rollback to a previous version
workflowManagement.rollbackToVersion('zhihu', '1.0.0');

// Export workflow as markdown
const markdown = workflowManagement.exportWorkflowAsMarkdown('zhihu');

Platform Integration

Configure platform-specific settings in src/lib/types.ts:

export const PLATFORMS: Platform[] = [
  {
    id: 'zhihu',
    name: 'zhihu',
    displayName: '็ŸฅไนŽ',
    // ... configuration
  }
  // ... more platforms
];

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

๐Ÿ“„ License

This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Original ArtiPub project by the Crawlab team
  • AI SDK by Vercel
  • shadcn/ui for the beautiful component library
  • Next.js team for the amazing framework

ArtiPub AI - Revolutionizing content publishing with artificial intelligence