reddit-checker
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v18View latest version
A comprehensive Reddit monitoring system that watches specific subreddits for posts containing target keywords and sends email notifications when matches are found.
- π Keyword Monitoring: Searches for specific keywords in post titles and content
- π§ Email Notifications: Sends detailed email alerts when matches are found
- β° Scheduled Monitoring: Runs automatically via cron jobs
- πΎ State Management: Tracks last checked timestamps to avoid duplicate notifications
- π Multiple Approaches: Supports both RSS feeds and official Reddit API
- Subreddit: r/lovable
- Keywords: auth, authentication, login, signin, signup, oauth, jwt, token
-
reddit-rss-monitor.ts(Cron Job)- Uses Reddit RSS/Atom feeds
- More reliable for basic monitoring
- No API credentials required
- Currently configured and ready to run
-
reddit-api-monitor.ts(Cron Job - Needs Setup)- Uses official Reddit API
- More detailed post data
- Requires Reddit app credentials
- Better rate limits and reliability
-
test-rss-monitor.ts(HTTP Endpoint)- Test RSS feed functionality
- Endpoints:
/?action=test- Test keyword matching/?action=status- Check last run status/?action=reset- Reset timestamps/?action=raw&subreddit=programming- View raw RSS
-
test-reddit-api.ts(HTTP Endpoint)- Test Reddit API functionality
- Endpoints:
/?action=help- Usage instructions/?action=auth&client_id=YOUR_ID- Test authentication/?action=test&client_id=YOUR_ID- Full functionality test/?action=reset- Reset stored data
reddit-monitor.ts- Original JSON API attempt (blocked by Reddit)test-reddit-monitor.ts- Test for JSON API (blocked by Reddit)
The RSS monitor is already configured and ready to run. It will:
- Check r/lovable every time the cron job runs
- Look for auth-related keywords
- Send email notifications for matches
- Track timestamps to avoid duplicates
To use the more robust API monitor:
-
Get Reddit App Credentials:
- Go to https://www.reddit.com/prefs/apps
- Create a new app (type: script)
- Note the client ID (under app name)
- Client secret is already configured:
rX_YGngVjaxRA3Y0F3STl2cuEmgHkQ
-
Test the Setup:
/test-reddit-api.ts?action=auth&client_id=YOUR_CLIENT_ID -
Update the Monitor:
- Edit
reddit-api-monitor.ts - Replace
'your_client_id'with your actual client ID
- Edit
- Test RSS: Visit
/test-rss-monitor.ts?action=test - Test API: Visit
/test-reddit-api.ts?action=test&client_id=YOUR_ID
- RSS Status:
/test-rss-monitor.ts?action=status - API Status:
/test-reddit-api.ts?action=reset
- RSS Reset:
/test-rss-monitor.ts?action=reset - API Reset:
/test-reddit-api.ts?action=reset
Edit the CONFIG object in the monitor files:
const CONFIG: MonitorConfig = {
subreddit: "lovable", // Change this
keywords: ["auth", "authentication", ...], // Add more keywords
lastChecked: 0
};
Update the keywords array in the CONFIG object.
The cron schedule needs to be set in the Val Town web UI after the files are created.
When matches are found, you'll receive emails with:
- π Match summary
- π Matched keywords
- π Post title and author
- π Score and comment count
- π Post timestamp
- π Direct link to Reddit post
- π Content preview
The system uses Val Town's blob storage to track:
reddit_rss_monitor_last_checked- RSS monitor timestampreddit_api_monitor_last_checked- API monitor timestampreddit_access_token- Cached Reddit API token
- Provide Reddit Client ID to complete API setup
- Set Cron Schedule in Val Town UI for automatic monitoring
- Test Email Notifications to ensure they're working
- Customize Keywords based on your specific needs
- Add More Subreddits by creating additional monitor instances