Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

52 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›°οΈ GapScope

Startup Opportunity Intelligence β€” find underserved markets using real launch data

GapScope scans live product launches, detects market gaps, scores saturation, and surfaces actionable startup opportunities β€” all powered by real-time web data and an LLM analysis pipeline.

Live Demo Β· Report Bug Β· Request Feature

Next.js React TypeScript Prisma Postgres License


πŸ“‘ Overview

GapScope is a market-intelligence dashboard that helps founders, product teams, and investors spot where the market is underserved. Instead of guessing, it pulls live data about recent product launches, runs it through an AI analysis pipeline, and turns it into structured, evidence-backed insight across five connected modules.

It was originally prototyped on a hosted AI builder, then fully re-architected to run on portable, production-grade infrastructure (see Architecture) so it deploys anywhere.


✨ Features

Module What it does
πŸ” Scanner Pulls recent product launches for a category from live web search, reads the source pages, and extracts structured product data (name, tagline, pricing, features, traction).
🧩 Gap Analysis Identifies market gaps β€” missing features, underserved segments, pricing gaps β€” with supporting evidence, severity, and competitor context.
πŸ“Š Saturation Scores how crowded each category is (competition density, overlap, launch frequency) and classifies markets from Blue Ocean to Dead Zone.
πŸ’‘ Opportunities Generates ranked, actionable startup opportunities backed by the detected gaps, complaints, and trend signals.
πŸ“ˆ Trends & Compare Detects category trend direction and growth, and runs side-by-side competitor comparisons.

Plus a Market Intelligence Dashboard that ties it all together: market health, opportunity scores, a competition-vs-opportunity quadrant map, complaint clusters, and saturation breakdowns β€” with a polished dark/light theme.


πŸ“Έ Screenshots

Replace these placeholders with your own screenshots (see Adding screenshots below).

Dashboard

Dashboard

Scanner β€” live product data

Scanner

Gap Analysis

Gap Analysis

Opportunities

Opportunities

Trends & Compare

Trends


πŸ—οΈ Architecture

GapScope runs a multi-stage pipeline for every scan/analysis:

User β†’ Next.js API route β†’ β”Œβ”€ Web Search (Tavily) ── find recent launches
                           β”œβ”€ Page Reader (Jina) ──── read source pages
                           β”œβ”€ LLM (Groq) ──────────── extract & analyze β†’ structured JSON
                           └─ Database (Postgres/Prisma) ── persist results
                                          ↓
                                   Dashboard & module UIs

Why this design: the data layer is fully decoupled behind a single module (src/lib/zai.ts) that exposes webSearch(), readPage(), chatCompletion(), and generateStructuredResponse(). Each provider sits behind an environment variable, so any piece can be swapped without touching the API routes. The LLM responses run through a robust multi-strategy JSON extractor (handles code fences, trailing commas, truncation, and wrapper objects) so the pipeline stays reliable even when models return imperfect JSON.


πŸ› οΈ Tech Stack

  • Framework: Next.js 16 (App Router) Β· React 19 Β· TypeScript
  • Styling: Tailwind CSS Β· shadcn/ui Β· custom "observatory" theme (dark + light)
  • Database: PostgreSQL (Neon) via Prisma ORM
  • AI / LLM: Groq (OpenAI-compatible API)
  • Web search: Tavily
  • Page reading: Jina Reader
  • Deployment: Vercel

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ and npm
  • A PostgreSQL database (free tier: Neon)
  • API keys: Groq Β· Tavily

Installation

# 1. Clone the repo
git clone https://github.com/sarthak070707/gapscope-market-intelligence.git
cd gapscope-market-intelligence

# 2. Install dependencies
npm install

# 3. Set up environment variables (see below)
#    create a .env file in the project root

# 4. Push the database schema
npx prisma db push

# 5. Run the dev server
npm run dev

Open http://localhost:3000.

Environment Variables

Create a .env file in the project root:

# Database (Neon Postgres connection string)
DATABASE_URL="postgresql://user:password@host/dbname?sslmode=require"

# Groq (LLM) β€” OpenAI-compatible
GROQ_API_KEY="gsk_..."
GROQ_BASE_URL="https://api.groq.com/openai/v1"
GROQ_MODEL="llama-3.3-70b-versatile"

# Tavily (web search)
TAVILY_API_KEY="tvly-..."

Note: Groq's free tier has per-minute and per-day token limits. For heavy use, the free Dev Tier raises these significantly. llama-3.1-8b-instant is a lighter-weight model option if you want to conserve tokens.


☁️ Deployment (Vercel)

  1. Push your code to GitHub.
  2. Import the repo on Vercel.
  3. Add the same environment variables (from .env) under Settings β†’ Environment Variables.
  4. Deploy.

The build is configured for serverless (prisma generate runs on install, API routes set maxDuration for longer AI calls).


πŸ“‚ Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ scan/          # Scanner β€” live product extraction
β”‚   β”‚   β”œβ”€β”€ analyze/       # Gap analysis + saturation + complaints
β”‚   β”‚   β”œβ”€β”€ opportunities/ # Opportunity generation
β”‚   β”‚   β”œβ”€β”€ trends/        # Trend detection + product comparison
β”‚   β”‚   └── dashboard/     # Aggregated dashboard data
β”‚   β”œβ”€β”€ globals.css        # Theme tokens (dark + light)
β”‚   └── page.tsx
β”œβ”€β”€ components/            # UI: panels, dashboard, charts, shadcn/ui
└── lib/
    β”œβ”€β”€ zai.ts             # Portable data + AI layer (search/read/LLM)
    └── error-handler.ts   # Retry, timeout, structured error handling

πŸ–ΌοΈ Adding Screenshots

  1. Create a screenshots/ folder in the project root.
  2. Take screenshots of each module and save them as dashboard.png, scanner.png, gap-analysis.png, opportunities.png, trends.png.
  3. Commit them:
    git add screenshots/
    git commit -m "Add screenshots"
    git push

The image links in the Screenshots section will then render automatically on GitHub.


πŸ—ΊοΈ Roadmap

  • Dedicated source connectors (Product Hunt API, Reddit, Hacker News)
  • Reduce AI calls per analysis for better token efficiency
  • Historical trend tracking over time
  • Background jobs for long-running scans
  • Multi-source data blending and confidence scoring

πŸ“„ License

Distributed under the MIT License. See LICENSE for details.


Built by Sarthak Arya

If you found this useful, consider giving it a ⭐

About

AI-powered market intelligence platform that analyzes product launches, user feedback, and market trends to identify underserved startup opportunities and competitive gaps.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages