Inspiration
I was inspired to do this because I think it would be a fun and engaging way for users of subreddits to compete to show off how well they understood the "culture" of a given sub. Subreddits vary a lot in name/content and the actual behavior, and these things change with time too! Now redditors can show off just how well they have their finger on the pulse of their favorite subs.
What it does
Allows users to "buy" one of two selected hot or popular posts, and hopefully create a profit from their original 1000 point balance. The bigger the score difference for a winning buy, the smaller the reward (since it should have been obvious if you know the subreddit). Vice versa applies for losing buys, since you should be able to spot the difference.
Users can then share their results, view global leaderboards, and play on other subreddits for the day.
How we built it
Built with blocks using redis to back the scoreboard, as well as previously loaded posts for the subreddit and score history for submitted posts.
Challenges we ran into
I ran into a fair number of issues with the limited nature of certain parts of the devvit ecosystem. In particular:
- Missing some key react hooks
- Hooks performed erratically at times
- Inability to customize blocks css created design limitations
- The docs are not very thorough, making it quite hard to build with certain parts of the environment
Accomplishments that we're proud of
I'm proud of how we're able to store encoded data within redis, despite not getting the feeling that it should be used that way...
What we learned
Learned a good bit about using redis/KV stores which I have not used professionally or in personal projects yet.
What's next for SubTrader
TODOs would include:
- Implementing runas functionality to allow users to post their results under their own account
- Redis operates in a tenant/isolated manner, which makes it impossible to maintain a global leaderboard if this is installed on subreddits directly (as intended). Would like to add an external DB.
- Improving pagination and posts requests. Right now we seem to run out of posts rather quickly and we need a more effective way to continuously retrieve new data.
Log in or sign up for Devpost to join the conversation.