Mape
View all case studies

European B2B Sourcing Platform

AI-Powered B2B Sourcing Marketplace for the European Mid-Market

AI MatchingMarketplaceFull-StackNext.jsSupabaseB2B SaaS

Key Result

Three AI conversational surfaces shipped to production, EU-resident throughout

The Client

A pair of operators in the European procurement space, launching an AI-first B2B sourcing platform built around a single conversational AI persona that runs every chat surface. The origin story is concrete: the founders spent months trying to find a soft-drink co-packer through web search and ChatGPT before concluding the discovery-and-qualification layer of mid-market procurement was broken. No engineering team in-house. Mape was brought in as the build partner across the full stack, not just a single layer.

The Problem

Mid-market B2B procurement in Europe sat between two product categories, both wrong for the job. On one side, directories like Thomasnet and Kompass: lots of listings, no qualification, the buyer still does all the work. On the other side, full transactional rails like Faire or JOOR: heavy onboarding, narrow vertical fit, optimised for retail re-supply rather than discovery sourcing. Nothing in between handled the actual workflow: a buyer with a non-trivial spec (volume, certifications, geography, dealbreakers) trying to find three to five qualified suppliers, screen them quickly, and start a real conversation.

For the supplier side, the pain was symmetric. Inbound enquiries through a website contact form arrived as one-line emails missing every piece of information needed to decide whether to engage. Sales teams burned hours qualifying leads that should have been disqualified at first contact. There was no structured representation of what the supplier actually does (sectors, certifications, capacity, MOQ, lead times, dealbreakers) that a buyer could search against.

Existing AI tooling, including general-purpose chatbots, was insufficient on two counts. First, no procurement-specific structured output: a free-form chat produces narrative answers, not the fielded data a matching engine needs. Second, no data wall: a buyer arriving through a supplier's branded URL must never enter the marketplace search pool. That is a contractual promise to suppliers, and it had to be enforced at the database layer, not the application layer.

The brief: build the full thing. Marketing site, auth, supplier intake, supplier-branded screening URLs, buyer marketplace intake, matching engine, lead inbox, workspace for negotiation, admin tooling. Production-ready, hosted on the client's own infrastructure, EU-resident throughout.

Our Approach

Phase 1: Foundation

Locked the stack (Next.js 15 App Router on Vercel EU, PostgreSQL on Supabase EU with RLS on every personal-data table, pgvector enabled but deferred), wrote the Postgres schema with the data wall baked in: every discovery_orders row carries a source enum (SUPPLIER_WIDGET or MARKETPLACE) that is immutable post-insert, enforced by a trigger. Built the auth flow (email confirmation, signed redirects, server-component session helper) and the marketing landing page with waitlist capture. CI gates on type-check, lint, and format on every push.

Phase 2: AI Intake Engine

Built the supplier intake as the first AI surface: a conversational interview with the AI persona, structured extraction running in parallel with the stream via Gemini 2.5 Flash, server-side completeness scoring (the LLM consistently over-reports its own coverage, so a deterministic counter sits on top), merge-on-write semantics so a failed late extraction cannot overwrite a good earlier one, and document upload with second-pass extraction for PDFs. The same engine powers the supplier-branded screening URL at /s/<slug>/screen, where a buyer is screened on behalf of a specific supplier whose profile is injected into the system prompt as context.

Phase 3: Marketplace Matching

The marketplace buyer intake at /onboarding/buyer is the third AI surface: open-ended, no single-supplier context, wired to the homepage hero search so a typed query carries through signup and lands in turn one of the chat. The matching pipeline itself runs in three layers: structured SQL filter on canonical taxonomy fields (sector, certifications, capacity, MOQ, country), Postgres tsvector plus GIN full-text retrieval (BM25-style) on supplier free_text_about and product descriptions, and a Claude Sonnet re-ranker with prompt caching on the supplier corpus prefix. Streaming UI delivers the shortlist progressively, under five seconds end to end.

Phase 4: Workspace and Launch

The strategic feature the platform is built around: a shared workspace where buyer and supplier negotiate on top of an AI-generated order draft. Every chat message is parsed for term changes; when a term moves, the system creates a new versioned draft row with per-field accept/reject state. Both parties see the same source of truth in real time. Versioning, PDF export, and the per-field state machine ship as the final layer of the build.

What We Built

  • Three-surface AI intake engine, all running on a single shared conversational primitive: supplier profile intake, supplier-branded buyer screening at /s/<slug>/screen, and marketplace buyer intake at /onboarding/buyer
  • Three-layer matching pipeline (structured filter, Postgres BM25 retrieval, Claude Sonnet re-ranker with prompt caching), streaming a ranked shortlist into the UI in under five seconds
  • Real-Europe map component with 42 country outlines projected via equirectangular from a public-domain GeoJSON at build time, with city pins for Amsterdam, Berlin, Paris, London, Madrid, Rome and 17 other hubs plotted at their actual geographic coordinates
  • Data-wall enforcement at the database layer: discovery_orders.source enum locked by a Postgres trigger, RLS policies scoped on target_supplier_org_id and source, with belt-and-braces filters at every application read path
  • Structured extraction layer running Gemini 2.5 Flash in parallel with the streaming response, with merge-on-write semantics and server-side completeness scoring so the progress bar stays honest
  • Determinism log on every AI call (prompt hash, model version, temperature, token counts, latency) so an output produced last month is still reproducible after a model upgrade
  • Signed-cookie guest session layer for the supplier-branded screening flow, HMAC-derived from the Supabase service-role secret, so a buyer can run a screening without an account but cannot hop between supplier transcripts
  • Workspace with AI-drafted order: chat messages parsed for term changes, versioned order_drafts rows with per-field {proposed_by, accepted_by_buyer, accepted_by_supplier} state, PDF export
  • Supplier dashboard with lead inbox, lead detail view with accept/reject server actions, and a sticky-sidebar layout that survives high lead volume
  • Brand-neutral codebase: the platform name and AI persona live in a single config file, so a future rename is one pull request

The Result

The platform is live in production on the client's own Supabase and Vercel projects. A supplier can sign up, complete the intake, and ship a branded screening URL the same day. A guest buyer can land on that URL, run a five-minute screening with the AI persona, and submit a structured report that lands in the supplier's lead inbox with full contact and qualification detail. A marketplace buyer can sign in, describe what they need to source, and get a ranked shortlist with one-tap "Continue with this supplier" flow that creates the discovery order with source = MARKETPLACE and routes both parties into the workspace.

Latency on the AI surfaces was tuned against measured Gemini extraction times (average 10.4 seconds, max 19 seconds on a long transcript). Extraction runs in parallel with the assistant stream rather than after, and the progress bar polls on a cascade out to thirty seconds so a slow extraction still lands visibly.

Brand identity, including a 3D character generated through image-to-image with Gemini 2.5 Flash Image from the founders' reference sheet, ships consistently across the marketing landing, in-product avatars, the screening chat, the marketplace intake, and the workspace.

Operational metrics (supplier count, marketplace order volume, country coverage) are tracked in the client's analytics layer and will be added to this case study once the early-access cohort closes.

Technology

  • Next.js 15 (App Router, server components, server actions): full-stack framework for the marketing site, dashboard, and API routes
  • TypeScript (strict mode): used across every file, including AI prompts and projection math
  • Tailwind CSS v4 with Base UI primitives (shadcn base-nova preset): design system foundation
  • Motion 12 and Sonner: animation and toast notifications used across chat, dashboard, and lead actions
  • Supabase (EU Frankfurt, PostgreSQL, Auth, Storage, RLS, pgvector reserved): the system of record. Migrations checked into the repo and applied via the Supabase CLI
  • Vercel AI SDK v6 with @ai-sdk/google and @ai-sdk/anthropic: streaming plus structured output abstraction. All calls routed through a single internal client that writes a determinism log row for every invocation
  • Gemini 2.5 Flash: supplier and buyer intake conversations, structured extraction (generateObject with a Zod schema), and document extraction
  • Gemini 2.5 Flash Image: mascot and reference asset generation through image-to-image with the founders' character sheet as input
  • Claude Sonnet 4.7: re-ranking layer for matching, with prompt caching on the supplier corpus prefix so the per-query cost stays bounded as the corpus grows
  • Postgres tsvector + GIN indexes: BM25-style retrieval layer for the matching pipeline, no external search service required
  • Zod 4: schema validation for AI extraction, with .default() per field for backward compatibility across schema revisions
  • Infisical: secret management across dev and production
  • GitHub Actions: type-check, lint, and format gates on every push

Want results like this?

Book a free 30 minute call. We'll map your processes and tell you honestly which ones are worth automating.

Book a Free Consultation
AI-Powered B2B Sourcing Marketplace for the European Mid-Market | European B2B Sourcing Platform | Mape