DEV Community

Cover image for RivalIQ: Giving Small Online Sellers Their Own AI-Powered Competitor Intelligence
Aman Jain
Aman Jain

Posted on

RivalIQ: Giving Small Online Sellers Their Own AI-Powered Competitor Intelligence

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.

What I Built

Imagine you're a small online seller.

You list a stainless steel water bottle for ₹799. But how do you know whether that price is competitive?

You could manually search shopping platforms, compare dozens of listings, inspect product specifications and calculate price differences. Or you could pay for an expensive analytics platform.

I wanted to explore a third option.

Meet RivalIQ — an open-source, AI-powered competitor intelligence tool built for independent e-commerce sellers.

RivalIQ takes a product name, selling price and optional cost, then helps sellers understand the competitive landscape.

It can:

  • Discover real shopping listings using SerpApi.
  • Identify potentially comparable products using attribute matching.
  • Calculate price differences and benchmarks from eligible listings.
  • Generate evidence-linked insights using Google's open-weight Gemma model.
  • Recommend actions focused on the seller's own product.
  • Save reports to MongoDB Atlas for later review.
  • Run a guided analysis workflow using the open-source Mastra framework.

The distinction that matters most to me is evidence versus assumptions.

A 500 ml plastic bottle shouldn't automatically be treated as equivalent to a 1 litre stainless steel bottle just because both appear in shopping results.

RivalIQ attempts to separate genuine comparisons from broader market observations. When there isn't enough reliable data, it says so.

Who would pay for it?

My target customers are independent online sellers, small e-commerce businesses and marketplace merchants who need competitive intelligence but cannot justify expensive enterprise tools.

A potential business model would be a subscription offering recurring competitor monitoring, saved reports and pricing alerts.

That's the side hustle opportunity: turning an open-source prototype into an affordable intelligence service for smaller merchants.

It's still a prototype, not a commercial product with paying customers.

Demo

Here's a walkthrough of RivalIQ, including its competitor discovery, AI analysis and guided workflow.

Watch the RivalIQ demo on Loom

The demo uses a sample Milton stainless steel water bottle with a selling price of ₹799 and cost of ₹500.

The analysis demonstrates how RivalIQ turns retrieved listings into a structured report and seller-focused guidance.

The application currently runs locally with Ollama. A public hosted deployment is not required to watch the demonstration.

Code

GitHub: MrCyberlord/RivalIQ

The project is publicly available under the MIT license.

It includes the React frontend, FastAPI backend, Mastra orchestration service, tests, setup instructions and architecture documentation.

How I Built It

I used several technologies, but each has a specific responsibility.

React + TypeScript + Vite powers the user interface where sellers enter product details, inspect competitor evidence and reopen saved reports.

Python + FastAPI handles the core intelligence pipeline: input validation, shopping discovery, attribute matching, pricing calculations, AI integration and persistence.

SerpApi retrieves real Google Shopping listings. RivalIQ preserves source references so sellers can inspect the underlying evidence rather than relying on unexplained AI conclusions.

Gemma 3 4B through Ollama is the AI engine. It helps formulate a broader discovery query and generates structured market insights. The model runs locally, without requiring a hosted LLM API for inference.

Mastra powers an optional guided workflow with four stages: validate seller inputs, generate the report, inspect evidence quality and assemble a seller action brief.

MongoDB Atlas stores completed reports so users can reopen previous analyses without rerunning AI inference or consuming search credits.

Sentry provides backend tracing and performance visibility, with privacy-conscious telemetry.

TabPFN, through the official hosted client, is integrated as an experimental option for predictive pricing. It requires sufficient independent comparable-product observations and explicit consent before cloud processing. I haven't presented it as a working prediction where the necessary data isn't available.

A lesson I learned: AI shouldn't be the final authority

One of the most interesting problems emerged during testing.

An AI-generated recommendation could suggest reducing the price of a competitor's listing rather than advising the seller about their own product.

That sounds small, but it makes the advice practically useless.

So I added a validation layer in FastAPI that checks recommendations for seller direction, source citations, unsupported numerical price targets and exaggerated outcome claims.

Invalid recommendations receive clearly identified deterministic replacements. The system also changes its guidance based on how many comparable offers are available.

The architecture follows a simple principle:

Let AI interpret evidence, but let deterministic code enforce the rules.

The resulting workflow combines the flexibility of a language model with conventional software validation.

Testing and performance

The project passed 256 backend tests and 22 orchestration/frontend tests during the Milestone 5.1 verification, alongside TypeScript checks and production builds.

A previous live guided workflow completed in approximately 83 seconds on local hardware. Local model generation accounts for a substantial part of the processing time.

That is an important limitation and an obvious area for future optimization.

Why Does Open Innovation Matter?

I wanted to build something useful without making access to an expensive proprietary AI service a prerequisite.

Gemma's open weights made it possible to experiment with local inference, inspect how the model behaved and adjust the surrounding validation logic.

Mastra provided an open-source orchestration framework without requiring a hosted Mastra account.

Together with FastAPI, React and the rest of the ecosystem, these tools made it possible to build a complete application that I can study, modify and extend.

Open innovation doesn't eliminate every external dependency. RivalIQ still uses SerpApi for shopping data and optionally integrates hosted services for storage, monitoring and prediction.

But it gives me control over a crucial part of the product: the intelligence pipeline itself.

For a solo developer exploring a side hustle, that flexibility matters.

Prize Categories

I'm submitting RivalIQ for consideration in the applicable open-source AI and partner categories, particularly:

  • Best Use of Gemma — Local Gemma-powered market analysis.
  • Mastra — Guided workflow orchestration with validated steps.
  • MongoDB Atlas — Persistent intelligence reports and history.
  • Sentry — Backend performance tracing and observability.
  • TabPFN — Experimental, consent-based predictive pricing integration, with data sufficiency safeguards.

I have not deployed RivalIQ on Render, so I'm not claiming a Render deployment.

What's Next?

RivalIQ is a working prototype, but there is plenty of room to grow.

I'd like to explore scheduled competitor monitoring, improved product matching, faster inference and better pricing intelligence as more real observations become available.

The long-term goal is simple:

Make useful competitor intelligence accessible to sellers who don't have enterprise-sized budgets.

This Hacktoberfest challenge gave me an opportunity to turn that idea into something tangible.

Thanks for reading! I'd love to hear what you'd improve or which feature would be most useful to a small online seller.

Top comments (0)