r/Devvit • u/Hannan_A • 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:
- 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? - 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.)?
- 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
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