Overview
Reply Tidy is a webhook system for moderating Threads (Instagram) comments with OpenAI. The handler verifies, enqueues, and returns 200 in milliseconds, well inside Meta’s 10-second window. Then a Postgres-backed worker makes moderation decisions. Keyword rules run first for free; remaining comments go to OpenAI’s omni-moderation-latest endpoint in a single batched call, and per-user category thresholds decide HIDE vs REVIEW vs ALLOW.
- Website: https://replytidy.com
- Blog: https://replytidy.com/blog
- GitHub: https://github.com/briansunter/comment-cop
Features
- Instant webhook acknowledgement inside Meta’s timeout, with dual-format envelope support
- Batched AI moderation via OpenAI
omni-moderation-latestwith per-user category thresholds - Per-user moderation settings: shadow mode (WOULD_HIDE), author allow/blocklists
- Human review queue with approve, hide, unhide, false-positive, and requeue actions
- Long-lived token exchange at sign-in with automatic refresh within 7 days of expiry
- Postgres worker queue using
FOR UPDATE SKIP LOCKEDwith deduplication and exponential backoff - Crash-recoverable manual hide/unhide via committed, expiring claim tokens
- Full moderation evidence (
moderation_source,moderation_reason, categories JSONB) and timed audit redaction - Bounded custom rules: up to 100 stored, 50 active, 10 AI rules, five concurrent AI evaluations
Technology Stack
- TypeScript on Bun
- TanStack Start + Drizzle ORM + Better Auth
- PostgreSQL (Docker) worker queue
- OpenAI
omni-moderation-latest - Threads Graph API (
graph.threads.net)