AI-Powered Marketplace & Gemini Vision

SaleBuy

An AI-powered C2C classifieds marketplace where sellers upload a photo and Google Gemini writes the listing — reducing ad creation time from 4 minutes to 10 seconds.

Client
SaleBuy Marketplace
Industry
C2C E-commerce & Classifieds
Timeline
14 Days
Year
2026
Type
AI Marketplace
SaleBuy — Homepage with category browsing and AI-powered listing prompt
Business Challenge

Friction in listing creation causes user drop-off

In peer-to-peer classifieds, the single biggest obstacle to marketplace liquidity is the effort required to list an item. Typing titles, descriptions, selecting categories, and describing condition on a mobile keyboard takes 3–5 minutes per product.

SaleBuy wanted to revolutionize this experience by leveraging multimodality: allowing sellers to simply snap a picture of their product and letting an AI vision model generate structured listing data automatically in real time.

Goals

  • Reduce ad creation time from 4 minutes to under 15 seconds
  • Integrate vision AI to generate title, category, and condition
  • Build full-featured marketplace with search and seller chat
  • Achieve sub-1.0s page loads on mobile listing pages
  • Deploy secure authentication and anti-spam protection

Constraints

  • 14-day delivery sprint
  • Must optimize API payload size for camera phone uploads
  • Zero tolerance for hallucinated or broken JSON data
  • API rate limits to manage LLM credit expenditure
Results

AI performance & conversion metrics

10s
Listing Time
down from 4 minutes
90%+
AI Accuracy
for title & category classification
0.9s
Mobile LCP
on mobile networks
14 Days
Build Time
concept to deployment
Solution

AI computer vision pipeline

Client-Side Image Resampling

Large 5MB mobile photos are compressed via HTML5 Canvas in the browser before hitting the server, keeping upload payloads under 1MB and cutting latency in half.

Gemini 1.5 Flash Vision Engine

Serverless Next.js API routes call Gemini 1.5 Flash to analyze product features, condition, category, and generate compelling SEO-ready item descriptions.

Deterministic JSON Parsing

Resilient server-side parsing that sanitizes markdown fences and extracts valid JSON payloads, with fallback values to ensure zero broken forms.

Real-Time Buyer/Seller Chat

Integrated messaging allowing buyers to make offers and converse with sellers securely within the marketplace platform.

Gallery

Platform interfaces

SaleBuy — Search results with filters, category tags, and location-based sorting
SaleBuy — Product detail page with seller chat, AI-generated description, and image gallery
SaleBuy — Next-Auth authentication with social login and email signup
Technology Stack

Why we chose each tool

N

Next.js 16

Server-side rendering for marketplace listing pages (critical for SEO). API routes handle Gemini integration and chat endpoints.

G

Google Gemini 1.5 Flash

The vision model analyzes product photos and returns structured JSON with title, description, category, and condition in under 2 seconds.

M

MongoDB + Mongoose

Document databases handle variable product attributes across 30+ categories without rigid schema constraints.

N

Next-Auth

Pre-built authentication with social login support, reducing friction compared to standard registration forms.

C

Canvas Image Compression

Client-side image resampling before sending to Gemini API, reducing payload sizes to under 1MB and cutting latency by 50%.

e

express-rate-limit + Helmet

Rate limiting prevents bot abuse on AI listing endpoints while Helmet security headers protect user-generated content.

Process

14-day sprint schedule

01

AI Vision Prompting

Days 1–3

Engineered vision prompts on Gemini 1.5 Flash for high-accuracy product metadata extraction.

02

Marketplace Schemas

Days 4–7

Built MongoDB schemas for ads, categories, user profiles, and chat messages with Next-Auth.

03

UI & Listing Engine

Days 8–11

Constructed mobile-first Next.js UI, canvas image compression, and real-time chat interface.

04

Testing & Deploy

Days 12–14

Stress-tested rate limiting, verified fallback parsing on 100+ test items, and deployed.

"

The AI vision listing is magic. Our users can list an item in ten seconds just by snapping a photo. GenForge turned what seemed like a futuristic concept into a production-ready application in two weeks.

SaleBuy Product Team
SaleBuy Marketplace
FAQ

Questions about this project

How does the AI auto-listing feature work?+
The seller uploads a photo of their item. The image is compressed client-side, then sent to the Gemini 1.5 Flash vision model with a structured prompt requesting JSON output (title, description, category, condition). The backend parses the response and pre-populates the listing form in under 10 seconds.
Why Gemini 1.5 Flash instead of GPT-4 Vision or Claude?+
For form pre-population, latency and cost matter most. Flash returns structured responses in 1-2 seconds with lower per-call costs, making high-volume listing flows feel instant and economically viable.
How do you handle AI output inconsistencies?+
We enforce strict system prompts requesting raw JSON, apply server-side regex cleaning to strip formatting markdown, and inject sensible default fallbacks if any fields are omitted.
What security measures protect the marketplace from spam?+
Next-Auth CSRF protection, IP-based rate limiting on AI endpoints, image mime-type validation, and Helmet headers to prevent content injection in user descriptions.
Can you build a similar AI-integrated marketplace for us?+
Yes. SaleBuy took 14 days. We need: your marketplace category structure, preferred AI models, authentication flows, and monetization rules.

Need AI features integrated into your platform?

We build full-stack web applications and marketplaces with cutting-edge AI vision, search, and workflow automation.