README.md

April 10, 2026 · View on GitHub

x402 Bazaar — Frontend

The web interface for the API marketplace where AI agents pay with USDC, not API keys.

Website CLI License Stars Chain

License: MIT TypeScript React Vercel Website


What is x402 Bazaar?

x402 Bazaar is an autonomous API marketplace built on the HTTP 402 Payment Required standard. Developers browse services, register their own APIs, and connect their wallets to pay in USDC -- all from a glassmorphism web interface with full bilingual support (English / French).

Key Features

  • Service Catalog -- Browse, search, and filter 112+ API services with real-time data from the backend.
  • Register Your API -- Submit your own API service to the marketplace with an on-chain USDC payment.
  • Wallet Connect -- MetaMask and Coinbase Wallet via wagmi/viem with automatic network detection (Base, SKALE on Base, Polygon).
  • ChainSelector -- 3-way toggle (Base / SKALE on Base / Polygon) for multi-chain payment routing.
  • MCP Installation Guide -- Step-by-step setup for Claude Desktop, Cursor, VS Code, and Claude Code.
  • Agent Integration Docs -- Code examples in JavaScript and Python for building x402 agents.
  • One-Line CLI -- npx x402-bazaar init prominently featured for instant setup.
  • Bilingual (EN/FR) -- Full i18n with localStorage persistence and toggle in the navbar.
  • Glassmorphism UI -- Glass cards, glow effects, gradient buttons, animated hero, scroll reveal animations.
  • Responsive -- Mobile-first design with burger menu and compact wallet display.
  • SEO Optimized -- Meta tags, Open Graph, Twitter Cards, sitemap.xml, robots.txt, structured data.

Quick Start

git clone https://github.com/Wintyx57/x402-frontend.git
cd x402-frontend
npm install
cp .env.example .env   # Set VITE_API_URL
npm run dev

Open http://localhost:5173 in your browser.

Pages

RoutePageDescription
/HomeHero with CLI one-liner, live stats, service categories, how-it-works flow
/servicesServicesSearchable service catalog with glass cards, sorting, x402 Native badges
/services/:idService DetailIndividual service page with full description and reviews
/registerRegisterService registration form with USDC payment flow
/developersDevelopersAPI documentation, protocol reference, code examples
/integrateIntegrateIntegration guides for MCP, ChatGPT, LangChain, and CLI
/mcpMCPMCP server installation for Claude Desktop, Cursor, VS Code, Claude Code
/playgroundPlaygroundInteractive API playground to test endpoints live
/compareCompareSide-by-side price comparison across services
/docsDocsFull platform documentation
/statusStatusService uptime and health monitoring
/analyticsAnalyticsPublic usage analytics and traffic stats
/budgetBudgetBudget calculator for API cost planning
/faqFAQFrequently asked questions
/creatorsCreatorsGuide and benefits for API creators/providers
/quickstartQuickstartQuick start guide to integrate x402 in minutes

Project Structure

src/
  main.tsx                 Entry point (WagmiProvider, QueryClient, BrowserRouter, LanguageProvider)
  App.tsx                  Route definitions
  config.ts                API URL + USDC contract ABI
  wagmi.ts                 Wallet config (Base + Base Sepolia, injected + coinbaseWallet)
  index.css                Tailwind v4 + custom utilities (glass, glow, gradients, animations)

  i18n/
    translations.ts        EN + FR translation strings (~110 keys per language)
    LanguageContext.tsx     React Context + useTranslation() hook + localStorage

  components/
    Navbar.tsx             Sticky glass navbar + 3 dropdowns + burger menu mobile + language toggle
    ConnectButton.tsx      Wallet connect/disconnect + responsive compact mode
    ServiceCard.tsx        Glass card with glow hover + x402 Native badge
    CategoryIcon.tsx       Category icon mapper for service cards
    LanguageToggle.tsx     FR/EN toggle pill
    ScrollToTop.tsx        Scroll reset on route change

  pages/
    Home.tsx               Hero glow orbs, animated stats, categories, how-it-works
    Services.tsx           Service grid + glass search input + skeleton loading
    Register.tsx           Glass form + USDC payment flow + validation
    Developers.tsx         API docs with scroll reveal + code examples
    Integrate.tsx          Agent integration guide (JS + Python, use cases)
    MCP.tsx                MCP server setup guide (CLI + manual accordion)
    Playground.tsx         Interactive API playground
    Compare.tsx            Side-by-side price comparison
    Docs.tsx               Full platform documentation
    Status.tsx             Service uptime monitoring
    Analytics.tsx          Public usage analytics
    Budget.tsx             Budget calculator
    FAQ.tsx                Frequently asked questions
    Creators.tsx           Guide for API providers
    Quickstart.tsx         Quick start guide

  hooks/
    useReveal.ts           IntersectionObserver for scroll animations

Tech Stack

LayerTechnology
FrameworkReact 19
BuildVite 7
StylingTailwind CSS v4
Walletwagmi + viem (Base + SKALE on Base + Polygon)
RoutingReact Router v7
StateTanStack React Query
i18nCustom React Context (EN/FR)
DeploymentVercel (auto-deploy on push)
Domainx402bazaar.org (Namecheap + Vercel DNS)

Environment Variables

VariableDescription
VITE_API_URLBackend API URL (default: https://x402-api.onrender.com)
VITE_NETWORKmainnet or testnet

Scripts

npm run dev       # Start dev server (localhost:5173)
npm run build     # Production build to dist/
npm run preview   # Preview production build locally
npm run lint      # Run ESLint
npm run test      # Run test suite (Vitest)

Deployment

The frontend auto-deploys to Vercel on every push to main.

Contributing

Contributions are welcome. See CONTRIBUTING.md for guidelines on how to get started, coding standards, and the pull request process.

Ecosystem

RepositoryDescription
x402-backendAPI server, 112 native endpoints, payment middleware, MCP server
x402-frontendReact + TypeScript UI (this repo)
x402-bazaar-clinpx x402-bazaar -- CLI with 7 commands
x402-sdkTypeScript SDK for AI agents
x402-langchainPython LangChain tools
x402-fast-monetization-templateFastAPI template to monetize any Python function

Live: x402bazaar.org | API: x402-api.onrender.com | CLI: npx x402-bazaar init

License

MIT