A simplified, comprehensive Reddit monitoring system that consolidates all monitoring functionality into a single script. No more cron jobs or constant notifications!
- Unified Monitoring: Single script handles all Reddit monitoring
- Multiple Methods: Uses Reddit API with JSON and RSS fallbacks for reliability
- Multi-Subreddit Support: Monitors 11 subreddits simultaneously
- Dual Notifications: Sends both Slack and email notifications
- Manual Execution: Run only when you want - no automated scheduling
- Robust Error Handling: Continues monitoring even if some subreddits fail
- Comprehensive Logging: Detailed console output for debugging
βββ unified-reddit-monitor.ts # π― MAIN SCRIPT - Run this manually (HTTP) β
READY
βββ test-reddit-api.ts # API testing tool (HTTP) - Legacy
βββ test-main-monitor.ts # Manual testing tool (HTTP) - Legacy
βββ test-slack.ts # Slack webhook testing tool (HTTP) - Legacy
βββ config-manager.ts # Configuration management (HTTP) - Legacy
βββ reddit-api-monitor.ts # Old API monitor (NO CRON) - Legacy
βββ reddit-monitor.ts # Old JSON monitor (NO CRON) - Legacy
βββ reddit-rss-monitor.ts # Old RSS monitor (NO CRON) - Legacy
βββ test-rss-monitor.ts # RSS testing tool (HTTP) - Legacy
βββ README.md # This file
Simply visit the HTTP endpoint to run the monitor:
GET /unified-reddit-monitor.ts
GET /unified-reddit-monitor.ts?action=run # Run the monitor (default)
GET /unified-reddit-monitor.ts?action=status # Show current configuration
GET /unified-reddit-monitor.ts?action=reset # Reset last checked timestamp
GET /unified-reddit-monitor.ts?action=help # Show help information
- Subreddits: 11 subreddits monitored
r/lovable,r/AppBusiness,r/appdev,r/AppDevelopersr/ChatGPTCoding,r/indiehackers,r/microsaas,r/replitr/ReplitBuilders,r/vibecoding,r/ViralApps
- Keywords:
- Authentication:
auth,authentication,login,user sessions - Monetization:
stripe,subscriptions,monetization,paywall,feature gating - Analytics:
analytics - Business:
how do I make money with my app
- Authentication:
- Post Limit: 25 posts per subreddit per check
- Notifications: Both Slack and Email enabled
- Execution: Manual only - no automated scheduling
- Client ID:
151sZ8h5TaHVZGZZn0rOhA - Client Secret:
rX_YGngVjaxRA3Y0F3STl2cuEmgHkQ
Run the unified monitor manually when you want to check for new posts:
GET /unified-reddit-monitor.ts
GET /unified-reddit-monitor.ts?action=status # View current settings
GET /unified-reddit-monitor.ts?action=reset # Reset last checked timestamp
GET /unified-reddit-monitor.ts?action=help # Show help and usage
These are kept for backward compatibility but not needed for normal operation:
GET /test-reddit-api.ts?action=help # Test Reddit API connection
GET /test-slack.ts?action=simple # Test Slack notifications
GET /config-manager.ts # View configuration details
When matches are found, you'll receive notifications via:
- Header:
π¨ Unified Reddit Monitor Alert: X new matching posts in Y subreddits - Rich Attachments for each matching post including:
- Post title (clickable link to Reddit)
- Matched keywords
- Author information
- Score and comment count
- Publication date
- Content preview
- Subreddit footer
- Webhook URL:
https://hooks.slack.com/services/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
- Subject:
π¨ Unified Reddit Monitor Alert: X new matches in Y subreddits - Content: Formatted text with all post details
- Format: Both plain text and HTML versions
- Post Titles: Full text search for keywords across all 11 subreddits
- Post Content: Self-text content of posts across all subreddits
- Frequency: Manual execution only (no automated scheduling)
- Scope: New posts since last check across all monitored subreddits
- Methods: Reddit API (primary), JSON API (fallback), RSS feeds (last resort)
- Case-insensitive matching
- Partial word matching (e.g., "auth" matches "authentication")
- Multiple keyword detection per post
- Configurable keyword list
To modify the configuration, edit the CONFIG object in unified-reddit-monitor.ts:
const CONFIG: MonitorConfig = {
keywords: [
'auth', 'authentication', 'login', 'user sessions',
'stripe', 'subscriptions', 'monetization',
'paywall', 'feature gating', 'analytics',
'how do I make money with my app',
'YOUR_NEW_KEYWORD' // Add here
],
// ... other settings
};
const CONFIG: MonitorConfig = {
subreddits: [
"lovable", "AppBusiness", "appdev", "AppDevelopers",
"ChatGPTCoding", "indiehackers", "microsaas", "replit",
"ReplitBuilders", "vibecoding", "ViralApps",
"YOUR_NEW_SUBREDDIT" // Add here
],
// ... other settings
};
const CONFIG: MonitorConfig = {
postLimit: 50, // Check 50 posts per subreddit instead of 25
useSlack: true, // Enable/disable Slack notifications
useEmail: false, // Enable/disable email notifications
// ... other settings
};
- Reddit API credentials are configured and working
- Access tokens are cached and automatically refreshed
- All API calls use proper authentication headers
- β Reddit API authentication working
- β Post fetching functional across multiple subreddits
- β Keyword matching operational
- β Slack notifications configured and tested
- β Timestamp tracking working
- β Multi-subreddit monitoring (11 subreddits)
- β All Slack webhook formats working (simple, Reddit posts, errors)
- Set Cron Schedule: Configure the automatic run frequency in Val Town UI
- Monitor Slack: Check for notification messages when matches are found across all subreddits
- Customize as Needed: Adjust keywords or add/remove subreddits based on requirements
-
Authentication Errors
- β Resolved: Credentials are properly configured
-
No Matches Found
- β Verified: System successfully finds matches (tested with 4 matches)
-
Email Not Received
- Check spam folder
- Verify Val Town email configuration
- Check monitor logs for errors
- Use
test-reddit-api.tsto verify API connectivity - Use
test-main-monitor.tsto run the monitor manually - Check Val Town logs for detailed error information
- API Connection: β Successful
- Authentication: β Working
- Post Fetching: β Retrieved posts from multiple subreddits
- Keyword Matching: β Found matches with updated keyword list
- Multi-Subreddit Support: β Now monitoring 11 subreddits simultaneously
- Slack Integration: β
All notification types working
- Simple messages: β Working
- Reddit post notifications: β Working with subreddit identification
- Error notifications: β Working
The project includes an RSS-based monitor (reddit-rss-monitor.ts) as a backup option if the API approach encounters issues. The RSS monitor has similar functionality but uses Reddit's RSS feeds instead of the official API.