Skip to content

xyd945/ProbHub

Repository files navigation

ProbHub - Problems worth solving 💡

Discover real problems people are discussing on the internet. ProbHub aggregates and normalizes problem discussions from Hacker News, StackExchange, GitHub, and more using AI-powered extraction.

🚀 Features

  • Multi-Source Aggregation: Hacker News + StackExchange (12 sites including personal finance, workplace, parenting, travel, cooking, fitness, and more)
  • AI-Powered Normalization: Uses LLM to extract and structure real-world problems from discussions
  • Smart Filtering: Tag-based filtering with infinite scroll for seamless browsing
  • Pinterest-Style UI: Modern masonry grid layout with responsive design
  • Automated Ingestion: Vercel Cron jobs for scheduled data collection

🛠 Tech Stack

  • Frontend: Next.js 14 (App Router), React, TypeScript, Tailwind CSS
  • Database: Supabase (PostgreSQL)
  • ORM: Drizzle ORM
  • LLM: OpenAI-compatible API (Deepseek, OpenAI, etc.)
  • Deployment: Vercel

📋 Prerequisites

  • Node.js 18+ and npm
  • Supabase account (sign up free)
  • LLM API key (Deepseek, OpenAI, or compatible)

⚙️ Setup Instructions

1. Clone and Install

git clone <your-repo-url>
cd ProbHub
npm install

2. Set Up Supabase

  1. Create a new project at supabase.com
  2. Go to Project Settings → API
  3. Copy the following values:
    • Database URL (Connection pooling URL recommended)
    • Project URL
    • anon public key
    • service_role secret key

3. Configure Environment Variables

cp .env.example .env

Edit .env and fill in your credentials:

DATABASE_URL=postgresql://postgres:[PASSWORD]@db.[PROJECT_REF].supabase.co:5432/postgres
NEXT_PUBLIC_SUPABASE_URL=https://[PROJECT_REF].supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=[YOUR_ANON_KEY]
SUPABASE_SERVICE_ROLE_KEY=[YOUR_SERVICE_ROLE_KEY]

LLM_BASE_URL=https://api.deepseek.com/v1
LLM_API_KEY=[YOUR_DEEPSEEK_API_KEY]
LLM_MODEL=deepseek-chat

4. Set Up Database Schema

npm run db:push

This will create all necessary tables in your Supabase database.

5. Run Development Server

npm run dev

Open http://localhost:3000 in your browser.

🗄️ Database Schema

The platform uses the following main tables:

  • sources - External data sources (HN, StackExchange, etc.)
  • raw_events - Raw API responses from sources
  • problems - Normalized problem records with full-text search
  • tags & problem_tags - Tagging system
  • problem_signals - User interaction tracking

🔄 Ingestion Pipeline

Manual Ingestion (for testing)

curl -X POST http://localhost:3000/api/ingest/hackernews

Automated Ingestion (Vercel)

Once deployed to Vercel, cron jobs run automatically every 15 minutes to fetch new problems from Hacker News.

📦 Available Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint
npm run db:generate  # Generate migration files
npm run db:push      # Push schema to database
npm run db:studio    # Open Drizzle Studio (DB GUI)

🚀 Deployment

Deploy to Vercel

  1. Push your code to GitHub
  2. Import project in Vercel
  3. Add environment variables from .env
  4. Deploy!

Vercel will automatically:

  • Build the Next.js app
  • Run cron jobs for ingestion
  • Handle serverless functions

📖 Project Structure

src/
├── app/                    # Next.js pages (App Router)
│   ├── api/               # API routes
│   ├── problems/          # Problems list & detail pages
│   └── sources/           # Sources overview page
├── components/            # Reusable React components
├── lib/
│   ├── db/               # Database client & schema
│   ├── llm/              # LLM client & normalizers
│   ├── connectors/       # Source connectors (HN, etc.)
│   └── config.ts         # App configuration
└── types/                # TypeScript type definitions

🎯 Milestones

✅ Completed

  • Multi-Source Integration

    • Hacker News connector (Ask HN posts)
    • StackExchange connector (12 sites: personal finance, workplace, parenting, travel, cooking, fitness, law, UX, etc.)
  • Core Features

    • AI-powered problem extraction using LLM
    • Pinterest-style masonry grid layout
    • Tag-based filtering system
    • Infinite scroll with skeleton loading
    • Automated ingestion via Vercel Cron
  • UI/UX

    • Responsive design (mobile, tablet, desktop)
    • Hero section highlighting value proposition
    • Clean, modern interface with dark mode support

🚧 In Progress

  • Search functionality (full-text search)
  • Sorting options (Top, New, Trending)

📅 Future Features

  • reddit connector (api request is pending)
  • User accounts & problem bookmarking
  • Problem voting & comments
  • Advanced filtering (date range, engagement metrics)
  • Weekly digest emails
  • API for third-party integrations
  • Other cool ideas, please raise an issue!

📄 License

MIT

🤝 Contributing

Contributions welcome! Please open an issue or PR.


Built with ❤️ for problem solvers and entrepreneurs

About

Like GitHub, but everything is broken.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published