Inspiration

PreMarket started from a need to make sense of information overload. News, social media, and prediction markets each provide signals, but combining them into actionable insights was missing. We wanted a platform that aggregates these sources, calculates probabilities, and alerts users when trends reach thresholds—helping traders, researchers, and decision-makers stay ahead.

What it does

PreMarket is a trend intelligence platform that aggregates signals from news, social media, and prediction markets to forecast trends with probabilities. Users can: Browse trends across categories (AI, Finance, Climate, Policy, etc.) Subscribe to trends and set probability thresholds Receive notifications when trends hit their thresholds View similar events from Polymarket prediction markets Get AI-powered analysis using Claude Track subscribed trends in a personalized dashboard The platform calculates probabilities (20–70%) using heuristics that consider recency, engagement, source credibility, and market liquidity.

How we built it

Frontend:

  1. Next.js 14 with React and TypeScript
  2. Tailwind CSS for styling
  3. Radix UI components for accessible UI
  4. Clerk for authentication
  5. Sonner for toast notifications

Backend:

  1. Next.js API Routes for serverless endpoints
  2. Supabase (PostgreSQL) for data persistence
  3. Anthropic Claude API for AI analysis

Data Sources:

  1. NewsAPI for news articles
  2. Reddit API for social signals
  3. Twitter API v2 for trending topics
  4. Polymarket Gamma API for prediction market events

Challenges we ran into

  1. Data Quality & Noise: Filtering noise while preserving signal across sources
  2. Implemented multi-layered scoring with category detection
  3. API Rate Limits: Strict limits from Twitter, Reddit, and NewsAPI
  4. Added caching, request batching, and graceful error handling
  5. Probability Calibration: Making probabilities realistic and useful
  6. Adjusted to conservative ranges (20–70%) with weighted multipliers
  7. Keyword Matching: Finding relevant Polymarket events with varied terminology
  8. Built keyword expansion, partial matching, and Claude semantic ranking
  9. Real-time State Management: Keeping subscriptions in sync without unnecessary refreshes
  10. Used useRef to track actual state changes and trigger updates only when needed
  11. Type Safety: Ensuring consistency across API routes and components
  12. Established TypeScript interfaces and used optional chaining

Accomplishments that we're proud of

  1. Multi-source integration: Successfully combining four APIs with different formats and rate limits
  2. AI integration: Seamless Claude integration for analysis and semantic ranking
  3. Smart filtering: Category/sport detection with intelligent fallbacks
  4. User experience: Real-time updates, toast notifications, and a responsive dashboard
  5. Type safety: Full TypeScript coverage across the codebase
  6. Performance: Efficient data fetching with caching and parallel requests
  7. Error handling: Robust error handling and fallback mechanisms

What we learned

  1. API integration: Handling different authentication methods, rate limits, and response formats
  2. Probability heuristics: Designing scoring systems that balance multiple signals
  3. AI/ML concepts: Using LLMs for semantic analysis and ranking
  4. State management: Optimizing React hooks and preventing unnecessary re-renders
  5. Database design: Structuring subscriptions and trends for efficient queries
  6. Full-stack development: Building end-to-end features from API to UI
  7. Production considerations: Error handling, loading states, and user feedback

What's next for PreMarket

  1. Enhanced AI features: More sophisticated trend analysis and prediction models
  2. Mobile app: Native iOS and Android apps for on-the-go trend tracking
  3. Social features: Share trends, follow other users, and build communities
  4. Advanced analytics: Trend performance tracking, success rate metrics, and insights
  5. More data sources: Integrate additional sources (YouTube, LinkedIn, etc.)
  6. Custom alerts: Email, SMS, and push notifications with custom rules
  7. API access: Public API for developers to build on Orbit Field
  8. Marketplace: Allow users to create and share custom trend detection rules

Built With

Share this project:

Updates