Skip to content

Singh-dps/findicator

Repository files navigation

BuzzStock - AI-Powered Stock Hype Validator

BuzzStock Next.js Gemini AI Neon

Separate hype from reality. Cross-reference Reddit sentiment with NSE fundamentals.

Live Demo | Dashboard | Screener


The Problem

80% of retail traders in India follow social media for stock tips. Reddit, Twitter, and Telegram are filled with pump-and-dump schemes disguised as "analysis."

Traditional screeners only show fundamentals - they can't tell you if a stock is being artificially pumped by coordinated social media campaigns.

Real Example:

"XYZ to the moon! 10x guaranteed!" - r/IndianStreetBets (1.2k upvotes)

Buzz Score: 95 | Fundamental Score: 28 | Divergence: 67

Stock crashed 40% shortly after


The Solution

BuzzStock is an AI-powered hype validator that cross-references social media sentiment with hard fundamentals to help retail investors make informed decisions.

Key Innovation: Hype Divergence Score

Hype Divergence = |Buzz Score - Fundamental Score|
  • High divergence = Stock may be overhyped (or undervalued)
  • Low divergence = Social sentiment aligns with fundamentals

Features

Core Features

  • Reddit Sentiment Analysis - Scrapes r/IndianStreetBets, r/IndianStockMarket, r/DalalStreetTalks
  • Sarcasm Detection - Gemini AI identifies ironic "to the moon" comments
  • NSE Integration - Real-time price, volume, P/E, 52-week range
  • News Aggregation - AI extracts catalysts from recent articles
  • Any Stock Analysis - Analyze ANY NSE-listed stock, not just blue chips

V2 Features (Live)

  • Watchlists - Track your favorite stocks
  • Price Alerts - Get notified on price/divergence thresholds
  • Historical Charts - Visualize score trends over time
  • PDF Export - Generate shareable reports
  • Dark/Light Mode - Theme toggle

How It Works

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Reddit    │────▶│   NSE API   │────▶│  News API   │
│  Scraping   │     │   Quotes    │     │  Articles   │
└─────────────┘     └─────────────┘     └─────────────┘
       │                   │                   │
       └───────────────────┼───────────────────┘
                           ▼
                 ┌─────────────────┐
                 │   Gemini AI     │
                 │  - Sentiment    │
                 │  - Sarcasm      │
                 │  - Catalysts    │
                 └─────────────────┘
                           │
                           ▼
                 ┌─────────────────┐
                 │ Score Calculation│
                 │  - Buzz: 0-100  │
                 │  - Fund: 0-100  │
                 │  - Divergence   │
                 └─────────────────┘

Pipeline Steps

  1. Symbol Validation - Verify stock exists on NSE
  2. Market Data - Fetch real-time quotes and fundamentals
  3. Reddit Scrape - Search Indian stock subreddits
  4. News Fetch - Aggregate recent articles
  5. AI Analysis - Gemini processes sentiment with sarcasm detection
  6. Score Calculation - Generate Buzz, Fundamental, and Divergence scores

Tech Stack

Frontend

  • Next.js 14 - App Router, Server Components
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first styling
  • Framer Motion - Smooth animations
  • shadcn/ui - Radix UI primitives
  • Recharts - Historical data visualization

Backend & Data

  • Google Gemini 2.5 flash lite - Sentiment analysis, sarcasm detection
  • Neon PostgreSQL - Serverless database
  • Drizzle ORM - Type-safe queries
  • stock-nse-india - NSE market data
  • SSE Streaming - Real-time pipeline updates

Data Sources

Source Purpose
NSE India Stock quotes, fundamentals
Reddit API Social sentiment
News API Article aggregation
Gemini AI NLP analysis

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm
  • Neon PostgreSQL account
  • Google Gemini API key
  • News API key

Installation

# Clone the repository
git clone https://github.com/Singh-dps/findicator.git
cd findicator

# Install dependencies
pnpm install

# Set up environment variables
cp apps/web/.env.example apps/web/.env.local
# Edit .env.local with your API keys

# Push database schema
cd apps/web
pnpm db:push

# Seed the database
pnpm db:seed

# Start development server
pnpm dev

Environment Variables

DATABASE_URL="postgresql://..."
GEMINI_API_KEY="your_gemini_key"
NEWS_API_KEY="your_news_api_key"

Project Structure

findicator/
├── apps/
│   └── web/                    # Next.js 14 application
│       ├── src/
│       │   ├── app/            # App Router pages
│       │   │   ├── (landing)/  # Landing page
│       │   │   ├── (app)/      # Dashboard, Screener
│       │   │   └── api/        # API routes
│       │   ├── components/     # React components
│       │   └── lib/            # Utilities
│       │       ├── scoring.ts  # Hype-Validator pipeline
│       │       ├── reddit.ts   # Reddit scraping
│       │       ├── gemini.ts   # AI analysis
│       │       ├── nse.ts      # NSE data fetching
│       │       └── news.ts     # News aggregation
│       └── ...
├── packages/                   # Shared packages (future)
└── turbo.json                  # Turborepo config

API Endpoints

Endpoint Method Description
/api/stocks GET List all tracked stocks
/api/stocks/[symbol] GET Get stock details
/api/stocks/[symbol]/analyze GET Run full analysis (SSE)
/api/validate GET Validate NSE symbol
/api/analyze POST Analyze custom stocks (SSE)
/api/cron/refresh/stream GET Refresh all scores (SSE)

Understanding the Scores

Buzz Score (0-100)

Social hype level based on:

  • Reddit mention frequency
  • Comment sentiment
  • Engagement metrics
  • Sarcasm-adjusted scoring

Fundamental Score (0-100)

Financial health based on:

  • P/E ratio analysis
  • Market capitalization
  • 52-week position
  • Price stability metrics

Technical Score (0-100)

Price action analysis:

  • Moving average crossovers (50/200 DMA)
  • Momentum indicators
  • Volume confirmation
  • 52-week range position

Hype Divergence

|Buzz Score - Fundamental Score|
  • 0-20: Aligned - sentiment matches fundamentals
  • 20-40: Moderate divergence - worth investigating
  • 40+: High divergence - proceed with caution

Deployment

The app is deployed on Vercel with:

  • Automatic deployments from main branch
  • Edge functions for API routes
  • Neon PostgreSQL for database
# Deploy to Vercel
cd apps/web
npx vercel --prod

Contributing

This is a hackathon project, but contributions are welcome!

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT License - see LICENSE for details.


Team

Built with caffeine and Claude for Hackathon 2024.


Try BuzzStock Now

Stop gambling on hype. Make informed decisions.

About

hackathon ez win

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages