TrendPublish: An AI‑Powered Trend Discovery & Content Publishing System Built on Deno 🚀

In today’s rapidly evolving digital world, content creators and marketers face a common challenge: how to identify emerging trends, transform raw data into polished content, and publish it efficiently. TrendPublish rises to meet that need. This open‑source system, built with Deno + TypeScript, automates the entire content pipeline—data collection, AI‑assisted processing, and scheduled publishing—specifically aimed at platforms like WeChat Official Accounts (e.g., AISPACE Technology Space).

This article is a complete English translation and adaptation of the original Chinese documentation, designed for readers with junior‑college level education and above. It is structured for clarity, SEO relevance (for both Google and Baidu), and readability. Technical instructions remain accurate, and the tone remains human‑centered and factual.


Table of Contents

  1. Project Overview
  2. Key Features
  3. Environment Setup & Installation
  4. Multi‑source Data Collection
  5. AI‑Powered Content Processing
  6. Automatic Publishing & Notifications
  7. Template Engine & Customization
  8. Deployment Options
  9. Advanced Usage & Extension
  10. Best Practices & Future Roadmap

1. Project Overview

TrendPublish is a complete content‑automation toolkit intended for technical and semi‑technical audiences responsible for WeChat Official Account operations. Its main goals are:

  • Streamline trend detection: Pull data from sources like Twitter/X and websites.
  • Utilize multiple AI models: Generate summaries, extract key points, craft titles, and filter content using vector embeddings.
  • Automate article publishing: Support WeChat Official Account scheduling with predefined templates.
  • Send multi‑channel notifications: Provide updates via Bark, DingTalk, or Feishu.
  • Stay open and extensible: Modify data sources, AI models, and templates as needed.

The system is fully open‑source under the MIT License. An example WeChat account using TrendPublish is “AISPACE 科技空间“. The project supports Windows, macOS (Intel/M1/ARM), and Linux—and also offers Docker and CI/CD deployment options.


2. Key Features

TrendPublish is built around five major capabilities:

  1. Multi‑source Data Collection
  2. AI‑powered Content Processing
  3. Automated Publishing
  4. Notification Integration
  5. Template-based Output & Extensibility

Each module is designed for both power and ease of configuration, balancing flexibility with zero‑touch automation.


3. Environment Setup & Installation

3.1 Supported Environment

  • Runtime: Deno v2.0.0 or higher
  • Language: TypeScript
  • Operating Systems: Windows, macOS (Intel and Apple Silicon), Linux

3.2 Install Deno

Linux/macOS:

curl -fsSL https://deno.land/install.sh | sh

Windows (PowerShell):

irm https://deno.land/install.ps1 | iex

Run deno --version to confirm v2.0.0+.

3.3 Clone the Project

git clone https://github.com/OpenAISpace/ai-trend-publish
cd ai-trend-publish

3.4 Environment Variables

Duplicate .env.example to .env, then set:

  • JINA_API_KEY for Jina AI scraping and embeddings
  • API keys for DeepseekAI, Qwen, Iflytek, etc.
  • WeChat Official Account credentials
  • Notification service credentials as needed

Configuration details are in docs/jina_integration_guide.md.

3.5 Build & Run

# For development (hot reload)
deno task start

# Run tests
deno task test

Build executables for each platform:

deno task build:win
deno task build:mac-x64
deno task build:mac-arm64
deno task build:linux-x64
deno task build:linux-arm64

Or build all at once:

deno task build:all

4. Multi‑source Data Collection

A core strength is gathering content from diverse sources:

4.1 Twitter/X Scraper

Using the official Twitter API (v2), TrendPublish fetches tweets based on keywords or followed accounts for trend and text analysis.

4.2 Website Scraper (FireCrawl)

The FireCrawl component extracts structured content, outputting clean JSON according to defined schemas—a major simplification over pure HTML parsing.

4.3 Custom Data Sources

Users can specify additional sources (RSS feeds, websites). The scraping module dynamically applies configured rules to harvest content.


5. AI‑Powered Content Processing

Collected raw data undergoes a multi‑step AI pipeline:

5.1 Summary Generation

The system uses multiple models (DeepseekAI, Qwen, Iflytek) to generate summaries. Results can be merged to reduce bias and increase coverage.

5.2 Key Information Extraction

The AI identifies critical elements such as main subjects, dates, data points, and actors—making summaries more accurate and reader‑friendly.

5.3 Intelligent Title Creation

Titles are generated via AI, and users can apply template preferences for tone, length, or formatting.

5.4 Deduplication & Ordering

Using Jina AI embeddings, TrendPublish filters out overlapping content and ranks summaries to present the most relevant output first.


6. Automatic Publishing & Notifications

6.1 WeChat Official Account Publishing

Once content is prepared:

  1. .env must include WeChat account credentials
  2. Add your server IP to the WeChat IP whitelist in its web console
  3. The system uses WeChat API to push articles; a cron‑style scheduler manages timing

6.2 Notification Integration

You receive status updates through:

  • Bark – for iOS push notifications
  • DingTalk / Feishu – for enterprise messaging
  • These alerts cover start/end of tasks and error reports

7. Template Engine & Customization

TrendPublish uses EJS templates for output formatting.

7.1 Built‑in Templates

Predefined templates are provided for different article types, visible at the documentation site. They cover common WeChat structures and aesthetics.

7.2 Creating Custom Templates

To create your own:

  1. Study the data structures in src/modules/render/interfaces
  2. Add .ejs files to src/templates
  3. Register the template in renderer code (e.g. WeixinArticleTemplateRenderer)
  4. Run a test with:
npx ts-node -r tsconfig-paths/register src/modules/render/test/test.weixin.template.ts

This workflow supports modular and fast styling changes.


8. Deployment Options

TrendPublish supports three deployment methods:

8.1 Native Server Deployment

  1. Install Deno on the target machine
  2. Clone the repository
  3. Copy .env and populate it
  4. Run:
deno task start

For robust management, use PM2:

npm install -g pm2
pm2 start --interpreter="deno" --interpreter-args="run --allow-all" src/main.ts
pm2 save
pm2 startup  # enables auto-start at boot

8.2 Docker Deployment

Build the Docker image:

docker build -t ai-trend-publish .

Run in detached mode:

docker run -d --env-file .env --name ai-trend-publish-container ai-trend-publish

Or provide environment variables inline:

docker run -d \
  -e KEY1=VALUE1 \
  -e KEY2=VALUE2 \
  --name ai-trend-publish-container \
  ai-trend-publish

8.3 CI/CD via GitHub Actions

  • Push to main triggers build and deployment

  • Use GitHub Secrets to store environment variables:

    • SERVER_HOST, SERVER_USER, SSH_PRIVATE_KEY, etc.

This ensures fast and reliable updates in production.


9. Advanced Usage & Extension

TrendPublish is designed to be a platform, not a one‑size‑fits‑all script.

9.1 Adding New Data Sources

Create a scraper module, register it, and add relevant entries to configuration. Sources can be RSS feeds, blogs, or other APIs.

9.2 Integrating New AI Models

Add additional LLMs (e.g. Anthropic, GPT‑4, Cohere) into the pipeline. Set model names in .env, link API keys, and modify processing routines to include them.

9.3 Extending Notifications

Want Slack, email, or SMS alerts? Implement notification hooks in the task scheduler and integrate them with additional providers.

9.4 GUI or Desktop Interface

There’s an ongoing effort to add an exe‑based GUI for users who prefer a visual dashboard over command‑line interaction.


10. Best Practices & Future Roadmap

10.1 Recommendations for Users

  • Adjust data‑collection frequency and AI model mix according to your content strategy
  • Run periodic deduplication to maintain writing freshness
  • Use preview/test publishing before enabling automatic posting
  • Schedule notifications for long‑running tasks to monitor system health

10.2 Planned Features

  • Popular AI academic paper recommendations
  • Highlight useful AI tooling
  • FireCrawl automated renewal
  • AI‑driven image insertion
  • Packaging as standalone GUI executable

These additions will improve both technical depth and content richness over time.


Final Summary

TrendPublish builds a powerful automation chain:

Data collection → AI processing → Template-based article → Scheduled publishing & notifications

It delivers modularity, extensibility, and content freshness, making it a robust toolkit for tech‑savvy WeChat content teams. Whether you’re a developer, marketer, or editor aiming to streamline your workflow, TrendPublish is an accessible, scalable solution for consistent content production.


Project Link
GitHub · OpenAISpace/ai-trend-publish

If you’d like a deeper walkthrough on deployment, customization, or real‑world use cases, feel free to reach out—I’m glad to assist.


Note: This post preserves all technical commands, environment setup steps, and workflow instructions from the original source. It avoids speculation or external content, ensuring accuracy and trustworthiness.