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.
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.
| 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.
Replace these placeholders with your own screenshots (see Adding screenshots below).
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.
- 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
# 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 devOpen http://localhost:3000.
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-instantis a lighter-weight model option if you want to conserve tokens.
- Push your code to GitHub.
- Import the repo on Vercel.
- Add the same environment variables (from
.env) under Settings β Environment Variables. - Deploy.
The build is configured for serverless (prisma generate runs on install, API routes set maxDuration for longer AI calls).
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
- Create a
screenshots/folder in the project root. - Take screenshots of each module and save them as
dashboard.png,scanner.png,gap-analysis.png,opportunities.png,trends.png. - 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.
- 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
Distributed under the MIT License. See LICENSE for details.
Built by Sarthak Arya
If you found this useful, consider giving it a β




