Skip to content
RbBtSn0wPublic

About

Broadcast Everywhere, Manage Once

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

OmniPost Logo

OmniPost

πŸš€ Broadcast Everywhere, Manage Once

OmniPost is a modern, all-in-one content publishing tool designed to help content creators and operators efficiently publish video content to multiple mainstream social media platforms with a single click. The project implements video upload and scheduled publishing functionality for platforms such as Douyin (TikTok), Xiaohongshu (Little Red Book), Kuaishou, and WeChat Channels.

Table of Contents

πŸ“‹ Project Overview

OmniPost is an open-source, multi-platform content publishing tool that supports video publishing automation across various mainstream platforms. The project adopts a Monorepo architecture, providing a professional web interface and RESTful API endpoints, while maintaining a flexible CLI approach and comprehensive testing infrastructure.

Primary Use Cases

  • Content creators batch-publishing videos to multiple platforms
  • Operations teams managing multi-account scheduled publishing tasks
  • Workflow automation integration with other systems

πŸ’‘ Features

  • βœ… Multi-Platform Support: Covers major Chinese social media platforms
  • βœ… Article Publishing: Support for Markdown publishing to Zhihu and Juejin (New!)
  • βœ… Browser Session Reuse: Direct use of local Chrome sessions for zero-friction login (New!)
  • βœ… Unified CLI: Powerful command-line tool for developers (New!)
  • βœ… Scheduled Publishing: Support for precise publication timing
  • βœ… Separated Frontend & Backend: Intuitive web management interface
  • βœ… API Encapsulation: Support for integration with other systems
  • βœ… Cookie Management: Multi-account cookie storage and management
  • βœ… Comprehensive Testing: Extensive test suite for reliability
  • βœ… Automated CI/CD: GitHub Actions workflows for continuous integration
  • βœ… OpenCLI Extensions: Plug-in architecture for adding new platforms via CLI tools (New!)

Platform Support Status

Platform Status
Douyin (TikTok) βœ…
WeChat Channels βœ…
Xiaohongshu (Little Red Book) βœ…
Kuaishou βœ…

πŸ”§ Tech Stack

Frontend

  • Framework: Vue 3 + Vite
  • UI Component Library: Element Plus
  • State Management: Pinia
  • Routing: Vue Router
  • HTTP Client: Axios

Backend

  • Language: Node.js 20+ (TypeScript 5.x)
  • Framework: Express.js (ESM)
  • Browser Automation: Playwright (Node.js version)
  • Database: SQLite
  • Testing Framework: Vitest

πŸš€ Supported Platforms

This project implements video upload functionality through platform-specific uploader modules:

Platform Name Primary Uploader Module
Douyin apps/backend-node/src/uploader/douyin/main.ts
WXChannels (WeChat Channels) apps/backend-node/src/uploader/wx_channels/main.ts
Xiaohongshu apps/backend-node/src/uploader/xiaohongshu/main.ts
Kuaishou apps/backend-node/src/uploader/kuaishou/main.ts
Bilibili apps/backend-node/src/uploader/bilibili/main.ts

πŸ”Œ OpenCLI Extensions

OmniPost supports dynamically adding new platform uploaders through OpenCLI extensions. Each extension is a self-contained CLI tool with a JSON manifest that declares its capabilities.

Extension Structure

apps/backend-node/extensions/<platform_slug>/
β”œβ”€β”€ cli.js              # CLI entry point (Commander-based)
└── manifest.ocs.json   # OCS capability manifest

Creating an Extension

  1. Create the directory under apps/backend-node/extensions/ using the platform slug (e.g., wx_official_account)
  2. Write manifest.ocs.json declaring the platform ID, supported actions, and required arguments:
    {
      "ocs_version": "1.0",
      "name": "my-platform",
      "version": "1.0.0",
      "platform_id": 101, // Use 100+ for dynamic local extensions
      "actions": {
        "publish_article": {
          "command": "publish",
          "args": {
            "title": "--title",
            "content": "--content"
          }
        }
      }
    }
  3. Write cli.js implementing the declared actions. The runner invokes it with node cli.js <action> --<arg> <value>.
  4. Sync extensions via the API: POST /api/opencli/sync

The backend will automatically discover the extension and make it available for publishing through the standard task pipeline.

πŸ’Ύ Installation Guide

System Requirements

  • Node.js >= 20.0.0
  • npm >= 9.0.0
  • Modern browser (Chrome, Firefox, Safari, or Edge)

1. Clone the Repository

git clone https://github.com/RbBtSn0w/omni-post.git
cd omni-post

2. Install Dependencies

Important: The maintained development path is the Node.js monorepo workspace. Use the root workspace scripts rather than ad-hoc installs inside subdirectories.

# Recommended Node.js workspace setup
npm install
npx playwright install chromium

🎯 Developer Workflow (New Monorepo Setup)

Starting from v1.2.0, OmniPost uses a strict monorepo workspace configuration. Here are the core commands you should use:

  • Initialize project: npm install (Installs workspace dependencies)
  • Run dev servers: npm run dev:node and npm run dev:frontend
  • Run all tests: npm run test (Primarily Vitest across maintained packages)
  • Lint all code: npm run lint
  • Check workspace integrity: npm run check:workspace (Validates package naming and scripts)
  • Clean build artifacts: npm run clean (Safely removes dist/ and coverage/, preserving data/ and .env)

2.1 Workspace Commands

# Run lint/test across all workspaces
npm run lint
npm run test

# Clean workspace artifacts
npm run clean

# Validate workspace contract
npm run check:workspace

# Measure install time (SC-001 baseline)
time npm install

3. Install Playwright Browser Driver

npx playwright install chromium

4. Initialize Database

If this is a fresh installation, initialize the database (not needed if upgrading):

npm run db:init -w apps/backend-node

5. πŸ›  Upgrade Notice (v1->v2)

If you are upgrading from a version older than v1.3.1, please run the one-time data migration script to sync your historical WeChat Channels (Tencent) tasks to the new WXChannels standard:

cd apps/backend-node
node scripts/migrate-wx-channels.mjs

6. Start the Services

# Start the backend and frontend
npm run dev:node
npm run dev:frontend

# Or individually
npm run dev:node          # Node.js Backend (http://localhost:5409)
npm run dev:frontend      # Vue 3 Frontend (http://localhost:5173)

🏁 Quick Start

  1. After starting the services, navigate to http://localhost:5173
  2. Add account credentials and log in within the web interface
  3. Upload video files and fill in metadata (title, tags, etc.)
  4. Select target platforms and publishing time
  5. Click publish, and the system will automatically execute the publishing task

πŸ“ Project Structure

omni-post/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ backend-node/            # Node.js TypeScript Backend (Primary)
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ app.ts          # Express Application
β”‚   β”‚   β”‚   β”œβ”€β”€ routes/         # HTTP Route Layer
β”‚   β”‚   β”‚   β”œβ”€β”€ services/       # Business Logic & Task Execution
β”‚   β”‚   β”‚   └── uploader/       # TS Playwright Uploaders
β”‚   β”‚   β”œβ”€β”€ extensions/         # OpenCLI extension plugins
β”‚   β”‚   └── tests/              # Vitest suite
β”‚   β”‚
β”‚   └── frontend/               # Vue.js 3 Frontend (Shared)
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ views/          # Page components (Dashboard, Publish, etc.)
β”‚       β”‚   β”œβ”€β”€ components/     # Reusable components
β”‚       β”‚   β”œβ”€β”€ stores/         # Pinia state management
β”‚       β”‚   β”œβ”€β”€ api/            # API service layer
β”‚       β”‚   β”œβ”€β”€ router/         # Vue Router configuration
β”‚       β”‚   β”œβ”€β”€ composables/    # Composition API utilities
β”‚       β”‚   β”œβ”€β”€ utils/          # Helper functions
β”‚       β”‚   └── assets/         # Static assets
β”‚       β”œβ”€β”€ tests/              # Frontend test suite
β”‚       β”œβ”€β”€ vite.config.js      # Vite configuration
β”‚       └── vitest.config.js    # Vitest configuration
β”‚
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ shared/                 # Shared logic (SSOT for types/constants)
β”‚   β”œβ”€β”€ shared-config/          # Standardized lint/TS configs
β”‚   └── cli/                    # Node-based CLI automation tool
β”‚
β”œβ”€β”€ .github/
β”‚   └── workflows/              # GitHub Actions CI/CD
β”‚       β”œβ”€β”€ test.yml           # Automated testing
β”‚       └── lint-backend.yml   # Backend code quality
β”‚
β”œβ”€β”€ package.json                # Monorepo root configuration
β”œβ”€β”€ ARCHITECTURE.md             # Architecture documentation
β”œβ”€β”€ CONTRIBUTING.md             # Contribution guidelines
β”œβ”€β”€ README_CN.md                # Chinese README
β”œβ”€β”€ README.md                   # English README (this file)
└── LICENSE                     # MIT License

Key Directories

Backend Structure (Node.js Primary)

  • routes/: API endpoint definitions (account.ts, publish.ts, article.ts, browser.ts, file.ts)
  • services/: Business logic layers (task-service.ts, publish-service.ts, publish-executor.ts, login-service.ts, cookie-service.ts)
  • uploader/: Platform-specific upload implementations (main.ts entry points)
  • utils/: Network utilities and file helpers (path.ts, response.ts)
  • db/: Database management and migrations (migrations.ts)

Frontend Structure

  • views/: Main pages (Dashboard, AccountManagement, PublishCenter, TaskManagement, MaterialManagement)
  • components/: UI components (GroupSelector)
  • stores/: Pinia stores (user, account, task, group, app)
  • api/: specific API clients (account.js, task.js, material.js, user.js)
  • Shared Package (@omni-post/shared):
    • SSOT: Single Source of Truth for platform IDs, task interfaces, and enum mappings.
    • logic/: Common validation and transformation utilities.
    • tests/: Vitest suite ensures cross-platform logic consistency.

Development & Testing

Running Tests

Code Quality & Linting

# Run all linters
npm run lint

# Lint frontend
npm run lint:frontend

# Clean build artifacts
npm run clean

Available Commands

# Development
npm run dev              # Start both backend and frontend

# Building
npm run build            # Build frontend for production
npm run preview          # Preview production build

# Information
npm run info            # Display project information

🀝 Contributing Guidelines

We welcome contributions in all forms! For detailed information, please refer to CONTRIBUTING.md.

Contribution Workflow

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Create a Pull Request

Development Standards

  • Frontend: Follow Vue 3 best practices and ES6+ conventions
  • Backend: Follow Node.js/TypeScript best practices
  • Testing: Ensure tests pass with npm test
  • Code Quality: Run linters before committing with npm run lint

Commit Message Convention

Use clear, descriptive commit messages following this pattern:

<type>(<scope>): <subject>

<body>

Types: feat, fix, docs, style, refactor, test, chore

πŸ“Š Project Statistics

  • Language: TypeScript (Backend), JavaScript/Vue (Frontend)
  • Test Coverage: Extensive unit and integration tests
  • Architecture: Monorepo with Workspaces
  • License: MIT
  • Status: Active Development

πŸ™ Acknowledgments

This project is inspired by dreammis/social-auto-upload and has been completely redesigned and rewritten. Thanks to the original project team for their pioneering work!

πŸ“œ License

This project is licensed under the MIT License.


Getting Help


If this project has been helpful to you, please give it a ⭐ Star to show your support!

Last Updated: March 2026

About

Broadcast Everywhere, Manage Once

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages