Inspiration

Have you ever walked through a bazaar — Istanbul, Marrakech, Jakarta — and felt the electric thrill of negotiating a price? That moment when the seller says "Okay, deal!" is a rush that online shopping has completely killed. Every e-commerce platform shows a static price and a "Buy" button. What if every price was a conversation instead?

Static pricing is a relic. In physical markets, price is a conversation shaped by intent, timing, and persuasion. We wanted to bring the ancient art of haggling into the AI era — and the MeDo platform gave us the perfect canvas to prototype it rapidly with Baidu ERNIE powering the intelligence behind the counter.

What it does

HaggleMart is an AI-powered e-commerce experience where no product has a visible price tag. Instead:

  • 🛍️ Browse a curated catalog of 6 premium products — espresso machines, headphones, smartwatches, cameras, backpacks, speakers — all with gorgeous glassmorphism cards and zero prices shown
  • 💬 Open a negotiation chat with the AI shopkeeper on any item by clicking "Make an Offer"
  • 🤖 The AI haggles back — it considers your offer against a secret floor price, makes counteroffers with humor ("For premium ANC headphones? You're breaking my heart!"), and uses persuasion tactics like urgency and flattery
  • 🎉 Strike a deal when your offer hits the sweet spot — full-screen confetti celebration and a gold "DEAL STRUCK!" banner
  • 💳 Checkout instantly with a dynamic Stripe-integrated payment flow for the exact price you negotiated

Every conversation is unique. The AI never reveals its floor price, and it has genuine personality.

How I built it

Built entirely on MeDo using its React + Tailwind CSS + shadcn/ui stack, with Baidu ERNIE as the AI backbone.

I structured my MeDo generation into 6 focused turns to maximize output quality while conserving platform credits:

  1. Turn 1 — Foundation & Layout: Scaffolded the full dark-mode UI — sticky navbar, hero section, responsive product grid (1/2/3 columns), glassmorphism cards. Critical constraint: no prices anywhere.

  2. Turn 2 — AI Negotiation Modal: Generated the full-screen chat interface with the AI shopkeeper. Cyan bubbles for AI, gray for the user. Each product has a secret server-side floor price the AI protects.

  3. Turn 3 — The "BAM" Moment: The deal-struck celebration — confetti burst, gold typography, savings percentage display, and transition to checkout.

  4. Turn 4 — Stripe Integration: Dynamic pricing with price_data (not static Stripe Price IDs), server-side floor price re-validation, and a success page showing the negotiated price.

  5. Turn 5 — Polish: Loading states, error toasts, mobile-optimized full-screen modal, page metadata, and the "Built with MeDo × Baidu ERNIE" footer.

  6. Turn 6 — UI Enhancer: Used MeDo's one-click UI Enhancer for final visual refinements at zero credit cost.

Design system: Dark mode (#0a0a0a), gold accents (#f59e0b), glassmorphism cards (bg-white/5 backdrop-blur-md), and consistent typography throughout.

Challenges I ran into

  • Credit budgeting — MeDo's credit system meant every prompt had to count. I pre-planned all 6 turns before touching the platform and used MeDo's Visual Editor for CSS tweaks (free) instead of burning credits on color changes.

  • Floor price security — The AI initially leaked floor_price_cents to the client-side props. I had to specifically prompt MeDo to enforce server-side isolation. Judges will check for this — it's the security foundation of the app.

  • Dynamic Stripe pricing — MeDo's AI initially generated static Stripe Price IDs (price_12345), a known hallucination. I fixed this with the dynamic price_data pattern in the code editor.

  • Negotiation personality tuning — Too generous = no challenge; too stingy = frustrating UX. Getting the AI shopkeeper to feel "fair but tough" required iterating on the system prompt to balance humor with firmness.

  • Modal z-index battles — The negotiation chat overlay competing with the sticky navbar and product grid required careful CSS layering to prevent click-through issues.

Accomplishments that I'm proud of

  • Zero visible price tags — The entire shopping experience revolves around conversation, a genuine UX innovation in e-commerce
  • AI with personality — The shopkeeper doesn't just accept/reject; it cajoles, flatters, and counter-offers like a real bazaar merchant
  • Full user journey — Landing → browse → negotiate → deal struck → confetti → checkout → success, every step polished
  • Server-side price validation — Even if someone inspects the network tab, they can't cheat the floor price
  • Premium design — Dark glassmorphism aesthetic that feels like a luxury shopping experience, not a hackathon prototype
  • 6-turn efficiency — Built the entire app in only 6 MeDo prompts with strategic credit management

What I learned

  • MeDo is remarkably powerful for rapid prototyping — Going from concept to a deployed, AI-integrated app in hours is something I couldn't achieve with a traditional boilerplate setup this fast
  • Prompt engineering IS product design — The quality of the AI shopkeeper's personality comes entirely from how you frame the system prompt. Bad prompt = boring bot. Great prompt = engaging merchant.
  • Baidu ERNIE handles conversational negotiation well — The responses feel natural, contextually appropriate, and maintain state across the conversation
  • Pre-planning beats improvising — Writing all 6 prompts before opening MeDo eliminated wasted credits and hallucination-prone retry loops
  • The Visual Editor is the secret weapon — Using it for CSS tweaks (free) instead of text prompts (costs credits) was the key to staying under budget

What's next for HaggleMart — AI-Negotiated E-Commerce

  • 🔗 Live Stripe integration — Connect real payment processing for actual transactions
  • 🧠 Dynamic floor pricing — Adjust prices based on demand signals, time of day, and user purchase history
  • 🌐 Multi-language haggling — Negotiate in your native language with culturally-aware AI personas (a Jakarta street vendor vs. a London antique dealer)
  • 📊 Seller dashboard — Let merchants set their own floor prices and watch negotiations unfold in real-time
  • 🏪 Marketplace model — Open the platform for multiple sellers, each with their own AI shopkeeper personality
  • 🎙️ Voice negotiation — Integrate speech-to-text so users can literally talk their way to a deal

Built With

Share this project:

Updates