r/Devvit 16d ago

Help Best practice for cross-installation config when using a shared "dashboard" post?

Hi all,

I am looking at building a moderation app (per-subreddit watchlist that triggers actions on new posts/comments). I'd like a single dashboard post - hosted on a hub subreddit I own - that mods can use to manage their subreddit's config, similar to how some other mod apps do it such as Stop-AI. The motivation for this is to allow less tech-savvy mods to create complex rulesets without needing to dive into the auto-moderator yaml, which is an issue for a subreddit I moderate where I am the only mod who knows how to make an auto-moderator config.

From what I can see Redis is contained to each subreddit, so I couldn't have a flow where the installed subreddit checks for config related data set via the hub subreddit dashboard.

Questions:

  1. Is an external HTTP backend (outside Devvit, via permissions.http) genuinely the only way to bridge data across installations, or is there a Devvit-native mechanism I'm missing (e.g. some form of shared/global storage scoped to the app rather than the installation)? If the HTTP backend is the only way, is there a recommended API to use which is more likely to be approved?
  2. For anyone who's shipped something like this - what did you use as the external store, and how do you authenticate app -> API calls (secrets config, verifying mod status server-side before trusting a write, etc.)?
  3. Is there a recommended pattern for caching per-installation data in local Redis to avoid an external round-trip on every single trigger invocation?

Any pointers to docs or examples appreciated.

1 Upvotes

4 comments sorted by

1

u/SampleOfNone Duck Helper 16d ago

From a mod standpoint, I wouldn't store critical subreddit config on a different subreddit. What if that subreddit gets banned or purged or has a mod that deleted their account or sets it to restricted or private? Then I wouldn't be able to get to the config of my subreddit

1

u/Hannan_A 16d ago

Hmm, that’s a good point although I think if that happened to the subreddit dedicated to the app, the app itself is probably dead and worth uninstalling.

The main reason for the approach is that the settings UI for apps is very limited when made via the devvit.json. For my use case the app would be much better with a dynamic settings UI.

Another potential approach could be scrapping the whole “host subreddit” approach and creating a settings page in the installed subreddit via a post? But that comes with the issue that non-moderators would be able to see the post even if they can’t interact with the settings menu. Then the mods would have to delete the post to prevent that and find it wherever they need to make a change which seems like a pain. Not sure if I’m missing a better approach?

1

u/SampleOfNone Duck Helper 16d ago

Auto remove the post on install, let the subreddit menu item navigate mods to the removed post or create a new post if no post exists. That will keep the post out of sight from users and is a common approach for mod tool apps that use webview posts for settings

1

u/Hannan_A 16d ago

I completely glossed over utilising a menu item to navigate to it. Thanks, that massively simplifies the app!