Skip to content

feat: add saas-launch-radar recipe — autonomous SaaS pricing intellig…#219

Open
pritpatel2412 wants to merge 1 commit into
tinyfish-io:mainfrom
pritpatel2412:feat/saas-launch-radar
Open

feat: add saas-launch-radar recipe — autonomous SaaS pricing intellig…#219
pritpatel2412 wants to merge 1 commit into
tinyfish-io:mainfrom
pritpatel2412:feat/saas-launch-radar

Conversation

@pritpatel2412

@pritpatel2412 pritpatel2412 commented Jun 1, 2026

Copy link
Copy Markdown

saas-launch-radar — Autonomous SaaS Pricing Intelligence Dashboard

Summary

Adds a new cookbook recipe that autonomously scouts newly launched SaaS products in any market niche, deploys parallel TinyFish browser agents to audit their landing pages, and synthesizes structured pricing intelligence — all streamed live to the user.


What This Recipe Demonstrates

This recipe is a showcase of three TinyFish capabilities working in concert:

Layer TinyFish Endpoint What it does
Discovery client.search.query Multi-angle Search queries across Product Hunt, HN Show HN, and general web indexes
Audit client.agent.stream Parallel Browser Agents navigating directly to landing pages, bypassing cookie overlays, and extracting structured JSON
Streaming SSE via Next.js Route Handler Real-time agent telemetry piped directly to the frontend terminal window

Technical Architecture

User → Next.js Client (React)
            │
            ├─ POST /api/discover
            │       └─ TinyFish Search API (3 parallel queries)
            │               ├─ site:producthunt.com "<niche>" 2026
            │               ├─ site:news.ycombinator.com "Show HN" "<niche>" 2026
            │               └─ "<niche>" SaaS product launch 2026
            │       Returns: deduped candidates (URL + domain level)
            │
            └─ POST /api/scrape  (SSE stream per candidate)
                    └─ TinyFish Agent Stream
                            ├─ EventType.STARTED  → terminal log
                            ├─ EventType.PROGRESS → live progress update
                            └─ EventType.COMPLETE → structured JSON result
                                    { ProductName, Tagline, Description,
                                      KeyFeatures[], TargetAudience[], PricingModels[] }

Parallelism: All candidates are scraped concurrently via Promise.all, each with its own SSE stream consumed via the Streams API (response.body.getReader()).


SDK Usage

Search (Discovery)

import { TinyFish } from "@tiny-fish/sdk";

const client = new TinyFish({ apiKey });
const results = await Promise.all(
  queries.map(q => client.search.query({ query: q }).catch(() => ({ results: [] })))
);

Agent Stream (Audit)

import { TinyFish, EventType, RunStatus } from "@tiny-fish/sdk";

const agentStream = await client.agent.stream({ url, goal });

for await (const event of agentStream) {
  if (event.type === EventType.PROGRESS) {
    send({ type: "PROGRESS", purpose: event.purpose });
  } else if (event.type === EventType.COMPLETE && event.status === RunStatus.COMPLETED) {
    send({ type: "COMPLETE", status: "COMPLETED", result: event.result });
    break;
  }
}

Key Implementation Details

  • Deduplication: Candidates filtered at two levels — exact URL (normalized to origin + pathname) and root domain — preventing the same product appearing twice from different query angles
  • Social noise filtering: Google, YouTube, Twitter/X, Facebook, LinkedIn, GitHub excluded so only direct product landing pages are audited
  • Structured extraction prompt: Agent goal requests 6 exact JSON keys (ProductName, Tagline, Description, KeyFeatures, TargetAudience, PricingModels) with explicit type annotations, minimizing schema drift
  • Resilient JSON parsing: Frontend handles both raw JSON and markdown-wrapped JSON (```json ```) from the agent result, with a regex fallback
  • SSE buffer handling: Stream reader accumulates chunks and splits on \n\n to correctly handle partial SSE frames across TCP packets
  • Route config: export const maxDuration = 300 on both route handlers to support long-running agent sessions on Vercel

Stack

  • Framework: Next.js 16 (App Router)
  • Language: TypeScript
  • SDK: @tiny-fish/sdk ^0.0.8
  • UI: React 19, Tailwind CSS v4, Lucide React icons
  • Design: TinyFish brand system — #FF6700 accents, #fafaf9 stone background, border-radius: 3px boxy buttons, teal halftone dot patterns

Files Added

saas-launch-radar/
├── .env.example                        # API key template
├── .gitignore                          # Node/Next ignores, .env* excluded
├── README.md                           # Setup guide + architecture diagram + code snippets
├── package.json                        # @tiny-fish/sdk, next, react, lucide-react
├── src/app/
│   ├── layout.tsx                      # Root layout + SEO metadata
│   ├── globals.css                     # TinyFish design system tokens + utilities
│   ├── page.tsx                        # Main dashboard (626 lines)
│   └── api/
│       ├── discover/route.ts           # Search API handler
│       └── scrape/route.ts             # Agent stream SSE handler

Root README.md updated: recipe listed in Featured and Research & Market Intelligence sections.


Testing

  • Tested with niches: Developer Tools, AI Copilots, Marketing Tech
  • Handles 0-result discovery gracefully (warning shown, resets to idle)
  • Handles per-product scrape failure gracefully (marks card failed, parallel sweep continues)
  • No secrets committed — .env.example provided for setup

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: efdb15e0-9336-4f1d-93cb-706f37b7a383

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…ence dashboard

Adds a new cookbook recipe that autonomously discovers newly launched SaaS products in any market niche using TinyFish Search API (multi-angle Product Hunt, Hacker News queries), then deploys parallel TinyFish Browser Agents to audit landing pages and extract structured pricing models, features, and target audiences.

- Next.js 16 App Router with SSE streaming for real-time agent telemetry

- TinyFish SDK (Search + Agent stream) integration with proper error handling

- TinyFish brand-aligned UI: #FF6700 accents, #fafaf9 backgrounds, 3px border-radius, halftone dot patterns

- Parallel browser agent dispatch with live terminal-style progress logs

- Structured pricing matrix, feature aggregation, and audience segment display

- Clean deduplication filtering (URL + domain level)

- .env.example included for easy API key setup
@pritpatel2412 pritpatel2412 force-pushed the feat/saas-launch-radar branch from e1c5920 to 59a38b6 Compare June 4, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant