Inspiration

Many subreddits run the same threads on a schedule—weekly megathreads, monthly discussions, mod announcements. Members miss them unless they remember to check the sub. Mods can’t manually ping everyone every time.

I wanted a lightweight utility: opt-in notifications when a matching post goes live—no DMs, no external services, no AI—just comments and tags inside Reddit.

What SubNotify does

SubNotify is a Devvit mod tool. Users subscribe with a comment (!subscribe or !subscribe movies). When a new post matches rules you set (flair and/or title keywords), the app comments on that post and tags subscribers in safe batches so Reddit doesn’t drop pings.

How I built it

  • Devvit Web (server-only): triggers on new posts and comments, no separate website.
  • TypeScript with a small structure: commands, events, Redis storage, settings validators.
  • Subreddit settings for moderators: JSON rules per category, cooldown, max tags per comment.
  • Safety: dedupe per post, per-category cooldown, ignore bot/AutoMod comments, chunk mentions.

Flow: onCommentCreate → parse commands → Redis subscribe/unsubscribe. onPostCreate → match rules → load subscribers → submitComment with chunked u/username tags.

What I learned

  • Devvit hosts the backend—no Vercel or always-on server; devvit upload + install is the deploy path.
  • App slug (subnotify-app) vs display name (SubNotify) vs subreddit name are different namespaces.
  • Reddit limits how many users you can tag per comment; batching and cooldowns matter for real subs.
  • Trigger payloads can differ by field names; defensive parsing for flair/title/body helps.

Challenges

  • Global app name taken — resolved with subnotify-app while keeping the SubNotify brand in the portal.
  • Cooldown during testing — first notification works; rapid test posts hit cooldown; mod menu “Notify subscribers” bypasses it for demos.
  • Command UX!help and !list as shortcuts; parser handles backticks and quoted lines from copied help text.
  • Hackathon deploy confusion — Vercel expects a public/ folder; Devvit apps are not static sites—Reddit runs the server bundle.

Built With

Share this project:

Updates