Inspiration

Every Reddit moderator has been there: you open the AutoModerator wiki page, stare at 200 lines of YAML, and have no idea where to start. AutoMod is one of the most powerful tools on Reddit — it can automatically remove spam, flag brigaders, filter low-effort posts, and protect communities at scale. But its configuration syntax is notoriously unforgiving. One wrong indentation breaks the entire ruleset silently.

Most mods either copy-paste rules blindly from other subreddits without understanding them, or don't use AutoMod at all. That's a massive gap — especially for smaller communities that don't have a technical mod on the team.

RuleWizard was built to close that gap.

What it does

RuleWizard is a no-code AutoModerator rule builder that lives directly inside Reddit as a Devvit custom post. Moderators can:

  • Build rules visually using a drag-and-drop condition/action editor — no YAML syntax knowledge required
  • Start from templates — a built-in library of pre-built rules for common sub types (gaming, support, news, NSFW, general)
  • Preview generated YAML in real time as they build, so they can learn the syntax gradually if they want
  • Simulate rules against a sample post or comment before deploying — paste in content and see exactly which rules would trigger and why
  • Deploy directly to their subreddit's AutoModerator config with one click

The result: a mod with zero technical knowledge can have a production-ready AutoMod ruleset running in under 5 minutes.

How we built it

RuleWizard is built entirely on Reddit's Developer Platform (Devvit):

  • Custom Post + WebView — the entire UI runs as a React app inside a Devvit WebView, communicating with the backend via postMessage contracts defined in message.ts
  • YAML Generator (yaml.ts) — a pure TypeScript function that maps structured Rule objects to valid AutoModerator YAML, handling edge cases like OR-logic rules (which require duplicate rule blocks in AutoMod)
  • Redis — all rulesets are stored per-subreddit using Devvit's built-in KV store, with no external database needed
  • Rule Simulator — runs entirely server-side in index.tsx, evaluating each condition against a sample post object and returning match results to the WebView
  • AppInstall trigger — seeds the template library, creates the pinned dashboard post, and sends a welcome modmail automatically on install

The frontend uses React with Recharts for any data display, styled with a dark theme matching Reddit's native UI.

Challenges we ran into

AutoMod YAML is deceptively complex. The format looks simple until you hit edge cases: OR-logic requires duplicating entire rule blocks, certain fields only apply to posts vs. comments, and the indentation rules are strict. Getting the YAML generator to output 100% valid syntax across all condition combinations took significant iteration and testing.

WebView ↔ Devvit message passing. Building a reliable two-way communication layer between the React frontend and the Devvit backend required careful typing of all message contracts upfront. Any mismatch between what the WebView sends and what index.tsx expects causes silent failures — we learned to define message.ts first and treat it as the single source of truth.

Wiki write permissions. Writing to config/automoderator requires the app to have wiki edit permissions on the subreddit. We had to handle the permission error gracefully and guide mods through enabling it, rather than assuming it would always succeed.

Scope creep. The simulator feature alone could have been its own project. We had to consciously cut features (version history, rule conflict detection, collaborative editing) to ship something polished within the hackathon window.

Accomplishments that we're proud of

  • The YAML generator handles all 7 condition fields and 8 action types correctly, including the tricky OR-logic duplication
  • The rule simulator gives line-level feedback — it doesn't just say "this rule triggered," it highlights exactly which condition matched and why
  • The entire app installs in one click with zero configuration required to get started — the template library is ready immediately
  • We shipped a tool that is genuinely useful to non-technical moderators, not just a developer demo

What we learned

Building on Devvit taught us to think in an event-driven, stateless model. Every interaction is a message — there's no persistent connection between the WebView and the backend, which forces clean separation of concerns. We also learned that defining type contracts (message.ts) before writing any implementation code saves enormous debugging time in a constrained environment like Devvit.

On the product side: the best mod tools are the ones that make the right thing easier than the wrong thing. AutoMod is powerful but hard — RuleWizard doesn't replace it, it just removes the barrier to using it correctly.

What's next for RuleWizard

  • Rule conflict detection — warn mods when two rules contradict each other
  • Import existing AutoMod config — parse an existing YAML ruleset back into the visual editor so mods can edit rules they inherited
  • Community rule sharing — let mods publish rule templates to a public library for other communities to discover and install
  • Rule analytics — track how often each rule fires using Devvit triggers, so mods can see which rules are doing work and which are dead weight
  • Multi-mod collaboration — pending Devvit support for real-time shared state, allow mod teams to edit rulesets together

Built With

Share this project:

Updates