All Projects
LiveSolo Engineer & ArchitectFlagship · Advanced

Vanijya AI

AI-powered commerce for India's street vendors.

Vanijya AI gives India's 63 million street vendors and kirana store owners the negotiation intelligence, price discovery, and multilingual communication tools that were previously only available to large enterprises — bridging the information asymmetry that keeps small traders trapped in poverty cycles.

Live Demo GitHub
Vanijya AI

The Story

Why this exists.

The Problem

India's informal traders negotiate blind. They don't know the current wholesale price of tomatoes in the nearest mandi. They can't communicate fluently with suppliers from other states who speak different languages. They make pricing decisions based on habit and guesswork — not data. Meanwhile, the buyer walking into their shop has a smartphone with real-time pricing data and zero reason to share it.

Why It Matters

India's informal economy employs over 400 million people. A 10% improvement in their negotiation outcomes — enabled by price intelligence and AI communication tools — translates into hundreds of dollars of annual income recovery per vendor. Multiply that by millions and it becomes one of the highest-leverage economic interventions possible.

The Solution

A Next.js platform powered by Gemini AI and Serp API that gives vendors real-time commodity price intelligence, AI-powered multilingual negotiation scripts, smart deal evaluation, and a direct buyer-seller connection layer — all accessible from a basic Android phone.

Product Features

What it does.

Real-Time Price Intelligence

Serp API scrapes live commodity prices from government mandi portals, wholesale markets, and e-commerce platforms. Vendors see the current buy/sell price range for any commodity before entering a negotiation.

Real-Time Price Intelligence

AI Negotiation Coach

Gemini AI generates negotiation scripts tailored to the commodity, current market price, vendor position, and buyer persona — in the vendor's preferred language. Hindi, Kannada, Tamil, Telugu, Marathi supported.

Multilingual Communication

Real-time translation and communication tools that let vendors interact with suppliers and buyers across language barriers — Gemini handles translation with commercial context preservation.

Multilingual Communication

Smart Deal Evaluator

Enter a deal offered by a supplier — Vanijya AI scores it against current market prices and signals whether to accept, counter, or walk away. Plain-language explanation in the vendor's language.

Direct Buyer-Seller Network

A verified directory of buyers and suppliers in the vendor's commodity category and region — removing brokers and reducing the margin leakage from intermediaries.

System Architecture

How every layer connects.

FrontendNext.js + TypeScriptVendor dashboard, price feed, negotiation interface
AIGemini 1.5 FlashNegotiation scripts, deal evaluation, multilingual output
Price DataSerp APIReal-time commodity price scraping from mandi portals
DatabaseMongoDB AtlasVendor profiles, commodity history, deal records
DeploymentVercelEdge CDN, serverless API routes

Technical Deep Dive

Under the hood.

Price Intelligence Pipeline

When a vendor queries the price of a commodity, Serp API fetches live results from Agmarknet (government mandi portal), IndiaMART wholesale listings, and regional news. The raw results are fed to Gemini with a structured extraction prompt that returns: current wholesale price range, trend direction (rising/stable/falling), and the recommended buy/sell window. The entire pipeline completes in under 3 seconds.

// Price intelligence pipeline
const serpResults = await serpApi.search({
  q: `${commodity} wholesale price today India ${state}`,
  num: 5,
});
const priceData = await gemini.generateContent({
  contents: [{
    parts: [{ text: PRICE_EXTRACTION_PROMPT + JSON.stringify(serpResults) }]
  }],
  generationConfig: { responseMimeType: "application/json" }
});

Multilingual Negotiation Script Generation

The negotiation coach prompt is engineered with four components: (1) commodity and current market price context, (2) the vendor's target price and acceptable floor, (3) the buyer/supplier persona, (4) language and cultural register instruction. Gemini returns a structured negotiation script with an opening offer, expected counter, and final position — all phrased naturally in the target language. Cultural negotiation norms (e.g. relationship-building before price discussion in South India) are baked into the prompt.

Engineering Decisions

Challenge → Decision → Result.

Gemini 1.5 Pro vs. Flash for a latency-sensitive mobile use case

Decision

Gemini 1.5 Flash

Why

Vendors use this on 4G or 3G connections. Flash's 2x faster response time at equivalent quality for structured extraction tasks makes it the right choice for real-time use.

Result

Price intelligence response time under 3s on 4G — Pro averaged 6s.

Live price data — web scraping vs. official API

Decision

Serp API over official government APIs

Why

Agmarknet's official API has 24-hour data lag and requires registration. Serp API returns live search results including the government portal, private marketplaces, and news — fresher and richer data.

Result

Price data freshness under 1 hour vs. 24-hour lag on official API.

Performance & Scale

By the numbers.

< 3sPrice Query Responseon 4G mobile
6Languages SupportedHindi, Kannada, Tamil, Telugu, Marathi, English
200+Commodities Coveredfruits, vegetables, grains, spices
< 1hrPrice Data Freshnessvs. 24hr official API lag

Deployment & Infrastructure

Production setup.

Deployment

Next.js on Vercel Edge CDN. MongoDB Atlas for vendor and deal data. Serp API for price scraping. Gemini 1.5 Flash for AI features.

CI/CD

GitHub Actions — TypeScript + ESLint check on PR. Auto-deploy to Vercel on merge to main.

Monitoring

Vercel Analytics for performance. MongoDB Atlas for query health. Custom logging for Gemini API latency.

Challenges & Failures

What broke — and how I fixed it.

Challenge

Serp API returning inconsistent commodity name matches across regions.

Fix

Added a Gemini-powered query normalisation step — vendor inputs any commodity name in any language, Gemini normalises to a standard search query before hitting Serp API.

Challenge

Negotiation scripts sounding unnatural in regional languages.

Fix

Added cultural register calibration to the prompt — included example phrases from each language community to guide Gemini's tone and formality level.

What I Learned

Key takeaways.

Future Roadmap

Where this is going.

v2.0 — 2026

  • Voice interface for vendors who prefer speaking over typing
  • WhatsApp bot integration — access Vanijya AI without installing anything
  • Offline price cache — last 7 days of prices available without connectivity

Screenshots

The product.

Vanijya AI dashboard

Vendor price intelligence and negotiation dashboard

Multilingual negotiation

AI negotiation coach in regional language

Technology Stack

Built with.

Frontend

Next.jsTypeScript

AI

Gemini 1.5 Flash

Data

Serp API

Database

MongoDB Atlas

Deployment

Vercel

Ready to dive in?

This isn't just a project.
It's a system I designed,
engineered, and shipped.

Live Demo Explore the code← All Projects