AI-Powered Product Idea Generator - Automatically discover and validate product ideas from Reddit pain points.
🤖 AI-Generated Project: This project was 97% generated by AI and built in approximately 15 hours total development time.
Pain Radar is an intelligent system that monitors Reddit discussions, identifies pain points and frustrations, and generates validated product ideas using AI agents. The application uses OpenAI's GPT-4 with structured outputs to analyze Reddit posts and comments, extract actionable insights, and score product opportunities.
- 🔍 Automated Reddit Monitoring - Tracks multiple subreddits for trending discussions
- 🤖 AI-Powered Analysis - Uses GPT-4 to identify pain points and validate ideas
- 📊 Smart Scoring System - Ranks ideas based on market potential, feasibility, and demand
- 📧 Email Digests - Sends curated ideas to subscribers based on their interests
- 🎨 Modern UI - Beautiful, responsive interface built with Next.js and Tailwind CSS
- 🔐 Secure Authentication - Powered by Supabase Auth
- Frontend: Next.js 15, React, Tailwind CSS, shadcn/ui
- Backend: Next.js API Routes, TypeScript
- AI: OpenAI GPT-4 with Structured Outputs
- Database: Supabase (PostgreSQL)
- Queue: Redis (for job processing)
- Email: Resend
- Deployment: Vercel
- Node.js 18+ and npm
- Supabase account
- OpenAI API key
- Reddit API credentials (optional, for authenticated requests)
- Resend API key (for email functionality)
- Redis instance (Upstash recommended)
-
Clone the repository
git clone https://github.com/yourusername/pain-radar.git cd pain-radar -
Install dependencies
npm install
-
Set up environment variables
- Copy
.env.exampleto.env(if provided) - Fill in all required environment variables
- Copy
-
Run database migrations (if applicable)
# Set up Supabase locally or use the hosted version # Run migrations to create necessary tables
-
Start the development server
npm run dev
Since Vercel's free tier only triggers cron jobs every 5 minutes, we recommend using an external service:
-
Sign up at cron-job.org (free)
-
Create a new cron job with the following settings:
- URL:
https://your-app.vercel.app/api/queue/process - Schedule:
* * * * *(every minute) - HTTP Method:
POST - Custom Headers: Add header
x-cron-secretwith the value from yourCRON_SECRETenvironment variable
- URL:
-
Enable the job and verify it's running
If you're on a Vercel paid plan, the built-in cron job will work automatically:
// vercel.json
{
"crons": [
{
"path": "/api/queue/process",
"schedule": "* * * * *"
}
]
}The endpoint is already configured with security headers and requires the CRON_SECRET to authenticate requests.
All cron endpoints require the x-cron-secret header for authentication:
-
POST /api/queue/process- Processes jobs in the queue (recommended for production)- Handles both coordinator and post_processor jobs
- Implements proper job queuing and error handling
-
POST /api/cron/generate- Generates ideas from Reddit (legacy, for direct generation)- Fetches Reddit posts and generates ideas in a single request
-
POST /api/cron/email- Sends email digests to subscribers- Configure separately if you want automated email digests
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linter
npm run lintTo generate TypeScript types from your Supabase schema:
supabase gen types typescript --linked > types/supabase.ts
# or
npx supabase gen types typescript --linked > types/supabase.tspain-radar/
├── agents/ # AI workflow orchestration
├── app/ # Next.js app directory
│ ├── (auth)/ # Authentication pages
│ ├── (dashboard)/ # Dashboard pages
│ ├── (marketing)/ # Landing pages
│ └── api/ # API routes
├── components/ # React components
├── lib/ # Utility libraries
│ ├── auth/ # Authentication logic
│ ├── email/ # Email sending
│ ├── openai/ # OpenAI integration
│ ├── queue/ # Job queue operations
│ ├── reddit/ # Reddit API client
│ └── supabase/ # Supabase clients
├── types/ # TypeScript type definitions
└── public/ # Static assets
- Reddit Monitoring: The system monitors configured subreddits for trending posts
- AI Analysis: Each post is analyzed by GPT-4 to extract pain points and validate potential ideas
- Idea Generation: The AI generates structured product ideas with scores and reasoning
- Queue Processing: Jobs are queued and processed one at a time to manage API limits
- Email Delivery: Subscribers receive curated ideas based on their topic preferences
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
This project was built with the assistance of AI (Claude/GPT-4), demonstrating the power of AI-assisted development in creating full-stack applications.