This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
XPayLabs e-commerce demo app, Vue 3 + Vue Router + Vite 4. Demonstrates full e-commerce flow: product browsing → cart → crypto checkout → QR code payment → status polling.
npm install
npm run dev # Dev server (localhost:3000)
npm run build # Production build
npm run preview # Preview production buildsrc/views/
├── Home.vue # Home / product listing
├── Cart.vue # Shopping cart
├── Checkout.vue # Checkout page
├── PaymentDemo.vue # Payment demo
├── PaymentSuccess.vue # Payment success
└── Products.vue # Product details
src/components/
├── PaymentQRCode.vue # QR code payment display
├── WebhookHandler.vue # Webhook verification demo
└── Toast.vue # Toast notifications
src/services/
├── XPayService.js # @xpaylabs/node-sdk wrapper
└── ToastService.js # Toast service
- User selects products → adds to cart → proceeds to checkout
- XPayService creates a collection order → displays QR code
- Polls order status every 3 seconds
- Payment confirmed → redirects to success page
Configure XPayLabs API credentials in .env:
VITE_XPAY_API_KEYVITE_XPAY_API_SECRETVITE_XPAY_BASE_URL
- Depends on
vite-plugin-node-polyfillsfor Node.js browser polyfills - Uses
@xpaylabs/node-sdk(local npm package or npm registry)