An AI-powered Reddit aggregator that synthesizes answers to your questions from relevant Reddit discussions.
RedditAgg takes any question you have, searches for relevant Reddit threads, extracts key information from posts and comments, and uses AI to synthesize a coherent, sourced answer. It combines Google Custom Search, Reddit's API, and Groq's Llama 3 70B model to deliver contextual answers with confidence scores and source attribution.
Instead of manually searching Reddit and reading through dozens of threads, get a synthesized answer in seconds with links to the original discussions.
- Intelligent Search - Uses Google Custom Search to find the most relevant Reddit threads
- Content Extraction - Fetches posts and top-voted comments from Reddit
- AI Summarization - Generates initial summaries using Llama 3 70B via Groq
- Relevance Filtering - Filters out off-topic results automatically
- Multi-Source Synthesis - Combines insights from multiple threads into one answer
- Confidence Scoring - Calculates confidence (50-95%) based on source quality
- Source Attribution - Provides clickable links to all original Reddit discussions
- Markdown Rendering - Clean, formatted output with proper styling
| Category | Technology |
|---|---|
| Framework | Next.js 15.3 (App Router) |
| Frontend | React 19, TypeScript 5 |
| Styling | Tailwind CSS 4, Typography plugin |
| Reddit API | snoowrap 1.23 |
| AI Model | Groq SDK (Llama 3 70B) |
| Search | Google Custom Search API |
- Node.js 18+
- Reddit OAuth credentials (Client ID, Secret, Username, Password)
- Google Custom Search API key and CSE ID
- Groq API key
# Clone the repository
git clone https://github.com/coleschaffer/RedditAgg.git
cd RedditAgg
# Install dependencies
npm installCreate a .env.local file:
# Reddit API
REDDIT_CLIENT_ID=your_client_id
REDDIT_CLIENT_SECRET=your_client_secret
REDDIT_USERNAME=your_username
REDDIT_PASSWORD=your_password
# Google Custom Search
GOOGLE_API_KEY=your_google_api_key
GOOGLE_CSE_ID=your_cse_id
# Groq AI
GROQ_API_KEY=your_groq_api_key# Development
npm run dev
# Production
npm run build && npm startOpen http://localhost:3000 to use the app.
RedditAgg/
├── src/app/
│ ├── api/summarize/
│ │ └── route.ts # Main API endpoint
│ ├── page.tsx # Frontend UI
│ ├── layout.tsx # Root layout
│ └── globals.css # Global styles
├── public/ # Static assets
├── tailwind.config.ts # Tailwind configuration
└── package.json
- User Input - Enter any question in the search box
- Search - Google Custom Search finds relevant Reddit threads
- Fetch - snoowrap retrieves posts and top 3 comments per thread
- Summarize - Groq AI generates summaries for each post
- Filter - Irrelevant summaries are filtered out
- Synthesize - Final answer is generated combining all sources
- Display - Markdown answer with confidence score and source links
Adjustable constants in the API route:
MAX_GOOGLE_RESULTS_TO_CHECK- Top search results to examine (default: 10)MAX_REDDIT_POSTS_TO_PROCESS- Maximum posts to fetch (default: 5)MAX_COMMENTS_PER_POST- Top comments per post (default: 3)
MIT License