-
-
Launch ModStat directly from your subreddit’s Mod Tools menu.
-
Zero-configuration onboarding built directly into the subreddit experience.
-
Track moderation trends, busiest days, and removal analytics at a glance.
-
Identify repeat offenders and monitor moderator activity instantly.
-
Analyze manual and AutoMod rule enforcement separately.
-
Track AutoModerator rules and detect false positives automatically.
-
View every removal reason in a clean real-time moderation feed.
-
Receive fully automated weekly moderation reports directly in Modmail.
-
Enable detailed AutoMod analytics with a single action_reason line.
Inspiration
While browsing Reddit's native insights page, I noticed an interesting gap - Reddit tells you how many posts get removed, but never why. There's no breakdown of which rules are being enforced most, no way to see which moderator is handling what, and absolutely no visibility into AutoModerator's behavior. Mod teams are flying blind, reacting to problems instead of understanding patterns.
The thing that frustrated me most was AutoModerator. It can remove hundreds of posts a week, but Reddit gives you zero insight into which automod rules are triggering most, or how many of those removals were false positives that human mods later approved. You need external tools, spreadsheets, or just gut instinct to tune your automod config. That felt like a solvable problem.
What I Learned
- How to extract structured removal reasons from Reddit's moderation event pipeline using Devvit triggers and the mod log API
- Better API handling patterns - rate limiting, caching with Redis, graceful fallbacks when data isn't available
- How to build reactive UI in a Devvit WebView using React with real-time data from Redis
- The complexity of Reddit's moderation ecosystem - every subreddit configures things differently, so building something universal required a lot of defensive coding
- How AutoModerator actually works under the hood and why extracting its removal reasons is harder than it sounds
How I Built It
ModStat is built entirely on Reddit's Devvit platform with no external servers or databases.
Frontend
React dashboard running inside a Devvit custom post (WebView). Displays weekly analytics including:
- Removal reasons breakdown
- Mod activity
- Repeat offenders
- Day-of-week patterns
- AutoModerator false positive rates.
Backend
TypeScript server using Hono for routing, with three core API routes:
/initfor loading stats,/generate-digestfor sending the weekly report,/reset-weekfor clearing data.
Data layer
Devvit's built-in Redis KV store. Every removal is stored as a structured entry with counters for reasons, mods, days, and offenders - all keyed by week so historical comparisons work automatically.
Event pipeline
Devvit's onModAction trigger catches every removal in real time. For human removals:
- The reason is extracted from the sticky comment body. For AutoModerator removals:
- The reason is fetched from the mod log's details field using
getModerationLog. A reconciliation job runs hourly to patch any entries that didn't get a reason immediately.
Weekly digest
A Devvit scheduler fires every Monday morning and sends a formatted Markdown report directly to the subreddit's modmail inbox - automatically, with no action required from mods.
Challenges
the hardest part was extracting correct removal reasons because Reddit's event payload doesn't include this info directly. Instead:
- It has to be inferred from sticky comments,
the mod log,
or the
addremovalreasonaction. Each path has edge cases such as macros resolving to meaningless text, subreddits with no linked rules, Toolbox-style freeform reasons, and AutoModerator which uses a different flow than human mods. AutoModerator reason extraction specifically took significant investigation: The removal event payload contains no reason; sticky comments don't work for automod; queryinggetModerationLogwith type:'removelink'andmoderatorUsernames: ['AutoModerator']is key - the details field on that log entry contains the automod rule category (e.g., "Spam / Prohibited Content"). Redis storage design involved creating a key structure supporting weekly aggregation, everything needed for week-over-week comparisons, persona-post lookups, and merge logic between automod/reddit filters without hitting rate limits or creating stale data - this took several iterations. Real-time consistency was complex: automod removes posts; human mods later approve or confirm them; the original entry must be updated or deleted accordingly. Building mappings (redditId → entryId) and queue confirmation logic across 6 cases was challenging. Handling Reddit’s inconsistent moderation ecosystem meant designing ModStat to gracefully degrade across various configurations rather than assuming uniformity.
Built With
- appinstall)
- automoderatorfilterpost
- devvit-(reddit-developer-platform)
- devvit-scheduler
- devvit-triggers-(modaction
- hono
- react
- reddit-mod-log-api
- reddit-modmail-api
- redis
- typescript
Log in or sign up for Devpost to join the conversation.