Universal Reddit Devvit application for the Sortling campus guide ecosystem. Enabling students to take interactive club matching quizzes and browse verified campus directories directly within Reddit Custom Posts.
Sortling Reddit App brings interactive campus club discovery to Reddit. Built with Reddit's Devvit SDK, webroot HTML5 webviews, and asynchronous REST API fallback handlers, it streams quiz questions and club recommendations inside subreddit feeds.
Note
This repository contains the TypeScript Devvit application and HTML5 webview entrypoint (devvit/webroot/index.html). It connects to the central Sortling REST API (https://sortling-bot.onrender.com/api/) to execute recommendation queries.
graph TD
A[Reddit User] -->|Open Custom Post| B(Devvit Webview index.html)
B -->|POST /api/sessions/start| C[Sortling Central REST API]
C -->|Return Question JSON| B
B -->|Render Webview Quiz| A
A -->|Select Option| B
B -->|POST /api/sessions/answer| C
C -->|Calculate Matches| D[DeterministicRecommendationEngine]
D -->|Return Top 3 Recommendations| B
B -->|Render Results Card| A
- 📱 Native Reddit Custom Posts: Embeds interactive custom posts automatically on
AppInstallorAppUpgradeevents. - ⚡ High-Speed HTML5 Webview: Clean, responsive UI styled with Sortling brand tokens (
#000543background,#ffffffcontrols). - 🔄 Resilient REST API Fallback: Connects to the central Sortling backend with graceful fallback handling for continuous uptime.
- 🎯 Full Feature Parity: Supports interactive multi-step matching quizzes, club detail lookups, and hackathon registries.
- 🛡️ Devvit Menu Actions: Subreddit moderator menu shortcut (
Create Sortling Campus Guide Post) to generate custom posts on demand.
Devvit Entrypoint(main.ts): Configures Reddit API triggers, installs custom post handlers, and defines moderator menu items.Webview Application(index.html): Single-page web app rendering Home, Quiz, Results, and Directory views with asynchronous fetch controllers.Configuration(devvit.json): Manifest specifying app permissions (Reddit API, HTTP), webroot entrypoints, and target subreddits.
-
Clone the repository and install dependencies:
git clone https://github.com/sorts-me/Reddit.git cd Reddit/devvit npm install -
Playtest locally on Reddit:
npx @devvit/cli playtest r/sortling_dev
-
View live app logs:
npx @devvit/cli logs r/sortling_dev --since 1h
-
Upload and publish new version to Reddit:
npx @devvit/cli upload
Licensed under the Apache License 2.0.