Twikoo Comment System

website·Indexed 29 days ago

https://twikoo.js.org/

A simple, safe, and free comment system consisting of a serverless backend and a frontend. Supports deployment via Tencent CloudBase, Vercel, Railway, Netlify, Hugging Face, AWS Lambda, Cloudflare Workers, EdgeOne Makers, and Docker via Baota Panel. Includes integration with MongoDB Atlas and a push notification library called pushoo for services like Telegram, DingTalk, and WeCom.

Tokens
17K
Snippets
59
Records
131
Agent score
70%

What's inside Twikoo

  1. Overview of Twikoo Comment System

    Twikoo is a concise, secure, and free website comment system. It features a built-in management panel accessible via password login, supports custom background images and blogger identification, and provides real-time notifications via email and instant message push. It is designed for easy deployment and high compatibility across different platforms.
  2. Overview of pushoo push library

    pushoo is an instant-messaging push library that provides a unified notice() interface to send notifications across various inconsistent push platforms. It handles differences in parameter delivery (URL, form data, JSON) and content formatting (Markdown vs plain text) automatically.
  3. Twikoo user and comment features

    Twikoo provides a comprehensive set of commenting features including replies, likes, dislikes, and real-time draft saving. It supports light and dark themes automatically. Technical features include KaTeX formulas, language-specific code highlighting, and the ability to insert images and emojis (both configurable). It also integrates with various image beds such as CloudBase, 7bu, S.EE, Lsky Pro, PicList, EasyImage, Chevereto, and S3-compatible storage (e.g., R2, MinIO).
  4. Twikoo Overview and Key Features

    Twikoo is a simple, safe, and free comment system designed for static websites. Key capabilities include:

    • User Interaction: Supports replies, likes, dislikes, and real-time draft saving in the comment box.
    • Rich Content: Supports KaTeX formulas, code highlighting by language, and image insertion (via clipboard or supported image beds like Cloudflare R2, MinIO, S3, and others).
    • Security: Prevents XSS injections, supports manual moderation, and allows limiting comments per IP every 10 minutes. It integrates with Akismet and Tencent Cloud Content Security for spam detection.
    • Notifications: Provides email alerts for visitors and bloggers, and supports various notification channels for bloggers including WeChat (via Server酱), QQ (via Qmsg or go-cqhttp), DingTalk, Lark, Telegram, Discord, Bark, PushDeer, and WxPusher (via pushoo).
    • Customization: Allows custom background images for the comment box, custom 'blogger' labels, email templates, placeholders, emoji lists (OwO format), and configurable required/optional fields for nickname, email, and website.
    • Management: Includes a password-protected built-in admin panel for managing comments and configurations, with an option to hide the admin entry via a secret code. Supports importing comments from Valine, Artalk, and Disqus.
  5. Compare Twikoo deployment options

    Twikoo supports multiple deployment environments. Key considerations include cost, accessibility in mainland China, and feature availability:

    PlatformRecommendationKey Notes
    Netlify★★★★☆Generous free tier, good speed in mainland China.
    Tencent Cloud CloudBase★★★☆☆Fast in mainland China; requires paid plan for CORS settings and custom domains.
    Vercel★★★☆☆Free, but slow/unstable in mainland China without a custom domain.
    Baota Panel★★★☆☆For users with their own servers; uses Docker.
    Hugging Face★★★☆☆Requires PRO plan ($9/mo) for Docker Spaces.
    AWS Lambda★★★☆☆Standard global cloud platform.
    Cloudflare Workers★★☆☆☆Fast cold starts; requires CLI; SMTP must use HTTP channels; no Akismet/Tencent content audit.
    EdgeOne Makers★★☆☆☆ZIP upload via console; requires custom domain; limited email/AI/spam features.
    Railway★★☆☆☆Limited free tier; effectively requires Hobby plan ($5/mo).
  6. Manage user avatars

    Twikoo uses Gravatar for avatars. Users should register their avatar at gravatar.com using the same email address they use when commenting. Users with QQ email addresses can also use their QQ avatars automatically.
  7. Integrate Twikoo into a website

    Twikoo consists of two mandatory components that must both be deployed to function: a cloud function (backend) and a frontend. It is critical to ensure that both the cloud function and the frontend are running the same version to maintain compatibility.
  8. Understand Twikoo architecture for deployment

    Twikoo consists of two primary components that must both be deployed to integrate the service into a website: cloud functions (backend) and the front-end. It is critical to ensure that the versions of the cloud functions and the front-end remain consistent to avoid compatibility issues.
  9. Compare Twikoo serverless deployment options

    Twikoo supports several serverless and self-hosted deployment targets. Key options include:

    • Netlify: Generous free tier and decent speed from mainland China.
    • Vercel: Good free tier, but slower or unreachable from mainland China unless a custom domain is bound.
    • Tencent CloudBase: Fast inside mainland China; requires a paid plan (Personal or above) for CORS settings and increased timeouts.
    • AWS Lambda: Recommended for users already within the AWS ecosystem.
    • EdgeOne Makers (Tencent Cloud): Restricted capabilities; limited email channels, no spam filtering, and no AI features.
    • Self-hosted (Node/Docker): Requires a server and a valid HTTPS certificate.
  10. Manage Twikoo comments and settings

    Twikoo includes an embedded management panel accessible via password login. This panel allows administrators to view, hide, or delete comments and modify system configurations. The management portal can be hidden and revealed using a secret code. Additionally, Twikoo supports importing existing comments from Valine, Artalk, and Disqus.
  11. Change user profile avatars in Twikoo

    Twikoo users can set their avatars by registering at https://weavatar.com with an email address. When commenting, the user must use the same email address. Alternatively, visitors can use a QQ email address (numeric) to automatically use their QQ avatar.
  12. Configure OneBot (NapCat, Lagrange) notifications

    OneBot is a QQ robot protocol standard. Deploy an implementation (like NapCat or Lagrange.OneBot) and enable the HTTP server. The pushoo token should be the API call address. Note that for onebot, pushoo moves user_id and group_id from the URL to the JSON request body, while access_token remains in the URL.
    // Private message example
    http://your-ip-or-domain:port/send_private_msg?user_id=QQ_NUMBER
    
    // Group message example
    http://your-ip-or-domain:port/send_group_msg?group_id=GROUP_NUMBER&access_token=YOUR_TOKEN