@misiki/vendure-connector
v2.0.40
Published
API Connector for Vendure with Svelte Commerce
Readme
@misiki/vendure-connector
The Official TypeScript API Connector for connecting svelte-commerce to Vendure E-Commerce Backend.
@misiki/vendure-connector provides a production-ready, fully-typed API client and integration layer that seamlessly bridges svelte-commerce storefronts with Vendure headless e-commerce backends — part of the Litekart connector suite, mirroring the full 43-service surface of @misiki/litekart-connector.
Coverage: 42 of 43 services are wired to the live Vendure API. The remaining 1 has no Vendure equivalent and returns empty placeholder data. Each placeholder says why in a comment at the top of its service file.
🚀 Step-by-Step Integration Guide
Follow these steps to connect svelte-commerce with vendure-connector and your Vendure backend.
1. Install the Connector
Inside your svelte-commerce project directory, run:
bun i @misiki/vendure-connector(Or using npm / pnpm / yarn):
npm install @misiki/vendure-connector
# or
pnpm add @misiki/vendure-connector2. Configure kitcommerce.config.ts
In svelte-commerce, open kitcommerce.config.ts and change the export * line to import from @misiki/vendure-connector:
// kitcommerce.config.ts
export * from '@misiki/vendure-connector';3. Environment Variables Setup
Add the required environment variable in your svelte-commerce .env file:
PUBLIC_VENDURE_API_URL=http://localhost:3000The connector calls Vendure's Shop API at <PUBLIC_VENDURE_API_URL>/shop-api, so set this to your Vendure server root (without the /shop-api suffix).
4. Obtaining Environment Settings & Configuring Vendure
To get the necessary API configurations and properly configure your Vendure backend:
- Log into Vendure Admin:
- Access your Vendure Admin UI (e.g.
http://localhost:3000/adminor your deployed Vendure Admin).
- Access your Vendure Admin UI (e.g.
- Verify & Copy Vendure API Endpoint:
- Obtain your Vendure server URL (e.g.
http://localhost:3000). - Set this URL as the value for
PUBLIC_VENDURE_API_URLin your.envfile.
- Obtain your Vendure server URL (e.g.
- Configure Required Settings:
- Email Verification: In your Vendure config, set
authOptions.requireVerificationtofalse(signup registers the customer with a password and logs in immediately, which fails if email verification is required).
- Email Verification: In your Vendure config, set
5. Build and Run the Project
Run the development server in svelte-commerce:
bun devTo build and run the production application:
# Build the project
bun run build
# Preview the built application
bun run previewService coverage
| Service | Status |
| --- | --- |
| client.product | ✅ live |
| client.category | ✅ live |
| client.collection | ✅ live |
| client.order | ✅ live |
| client.coupon | ✅ live |
| client.address | ✅ live |
| client.review | ✅ live |
| client.cart | ✅ live |
| client.country | ✅ live |
| client.state | ✅ live |
| client.currency | ✅ live |
| client.region | ✅ live |
| client.page | ✅ live |
| client.blog | ✅ live |
| client.settings | ✅ live |
| client.store | ✅ live |
| client.paymentMethod | ✅ live |
| client.search | ✅ live |
| client.autocomplete | ✅ live |
| client.user | ✅ live |
| client.auth | ✅ live |
| client.profile | ✅ live |
| client.wishlist | ✅ live |
| client.vendor | ✅ live |
| client.checkout | ✅ live |
| client.upload | ✅ live |
| client.banner | ✅ live |
| client.chat | ✅ live |
| client.contact | ✅ live |
| client.deal | ✅ live |
| client.demoRequest | ✅ live |
| client.enquiry | ✅ live |
| client.faq | ✅ live |
| client.feedback | ✅ live |
| client.gallery | ✅ live |
| client.home | ✅ live |
| client.init | ✅ live |
| client.meilisearch | ✅ live |
| client.menu | ✅ live |
| client.plugins | ✅ live |
| client.popularSearch | ✅ live |
| client.popularity | ⚠️ placeholder (no Vendure equivalent) |
| client.reels | ✅ live |
Development
bun install && bun run buildLicense
MIT © misiki-in
