How betastreetomnis/xhs_ai_publisher works
Main Components Identification
a) Frontend Layer (easy_ui.py)
• This as a UI component using a rectangle with rounded corners
• Subcomponents for:
• Login Interface
• Content Generation Interface
• Image Preview
• Article Preview
b) API Server Layer (api_server.py)
• As a hexagonal service component
• This serves as the middleware between the UI and the automation layer
c) Automation Layer (write_xiaohongshu.py)
• As a service component
• Integration points with external systems
External Systems Integration
Connections to external services:
• Xiaohongshu Platform
• Large Language Model API (for content generation)
• Image Generation/Storage Service
Data Flow Representation
• User input → Frontend → API Server
• API Server → Large Language Model
• API Server → Image Service
• Automation Layer → Xiaohongshu Platform
Component Details
┌─────────────────┐
• Frontend │
• (easy_ui.py) │
• ┬────────┘
• ↓
┌─────────────────┐
• API Server │
• (api_server.py) │
• ┬────────┘
• ↓
┌─────────────────┐ ┌─────────────┐
• Automation │ → │ Xiaohongshu │
• Layer │ │ Platform │
• ┘ └─────────────┘
Additional Elements
a) Data Storage:
• Cookie storage for login sessions
• Temporary image storage
b) External APIs:
• Large Language Model connection
• Image generation service
• Xiaohongshu API endpoints
Process Flows
Numbered sequence indicators for key processes:
Technical Details to Note
Annotations for:
• Python 3.12 runtime
• Selenium WebDriver integration
• Tkinter UI framework
• Browser automation components