@misiki/cs-cart-connector
v0.4.1
Published
API Connector for CS-Cart with Svelte Commerce
Readme
@misiki/cs-cart-connector
The Official TypeScript API Connector for connecting svelte-commerce to CS-Cart E-Commerce Backend.
@misiki/cs-cart-connector provides a production-ready, fully-typed API client and integration layer that seamlessly bridges svelte-commerce storefronts with CS-Cart headless e-commerce backends — part of the Litekart connector suite, mirroring the full 43-service surface of @misiki/litekart-connector.
Coverage: 20 of 43 services are wired to the live CS-Cart API. The remaining 23 have no CS-Cart equivalent and return empty placeholder data — except
client.auth, which throwsNotSupportedErrorrather than fabricating a session. 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 cs-cart-connector and your CS-Cart backend.
1. Install the Connector
Inside your svelte-commerce project directory, run:
bun i @misiki/cs-cart-connector(Or using npm / pnpm / yarn):
npm install @misiki/cs-cart-connector
# or
pnpm add @misiki/cs-cart-connector2. Configure kitcommerce.config.ts
In svelte-commerce, open kitcommerce.config.ts and change the export * line to import from @misiki/cs-cart-connector:
// kitcommerce.config.ts
export * from '@misiki/cs-cart-connector';3. Configure Credentials
Pass apiUrl (store URL), apiKey (admin email), apiSecret (API key) — sent as Basic auth.
API docs: https://docs.cs-cart.com/latest/developer_guide/api/index.html
import { CSCartConnector } from '@misiki/cs-cart-connector'
// Credentials are set once, statically — the constructor only takes an optional fetch.
CSCartConnector.setCredentials({
apiUrl: 'https://store.example.com',
apiKey: '[email protected]',
apiSecret: 'api_key'
})
const client = new CSCartConnector()
const products = await client.product.list({ page: 1, sort: '-createdAt' })4. 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 | ⚠️ placeholder (no CS-Cart equivalent) |
| client.order | ✅ live |
| client.coupon | ⚠️ placeholder (no CS-Cart equivalent) |
| client.address | ⚠️ placeholder (no CS-Cart equivalent) |
| client.review | ✅ live |
| client.cart | ✅ live |
| client.country | ⚠️ placeholder (no CS-Cart equivalent) |
| client.state | ⚠️ placeholder (no CS-Cart equivalent) |
| client.currency | ⚠️ placeholder (no CS-Cart equivalent) |
| client.region | ⚠️ placeholder (no CS-Cart equivalent) |
| 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 | ⛔ throws NotSupportedError |
| client.profile | ✅ live |
| client.wishlist | ⚠️ placeholder (no CS-Cart equivalent) |
| client.vendor | ✅ live |
| client.checkout | ✅ live |
| client.upload | ⚠️ placeholder (no CS-Cart equivalent) |
| client.banner | ⚠️ placeholder (no CS-Cart equivalent) |
| client.chat | ⚠️ placeholder (no CS-Cart equivalent) |
| client.contact | ⚠️ placeholder (no CS-Cart equivalent) |
| client.deal | ⚠️ placeholder (no CS-Cart equivalent) |
| client.demoRequest | ⚠️ placeholder (no CS-Cart equivalent) |
| client.enquiry | ⚠️ placeholder (no CS-Cart equivalent) |
| client.faq | ⚠️ placeholder (no CS-Cart equivalent) |
| client.feedback | ⚠️ placeholder (no CS-Cart equivalent) |
| client.gallery | ⚠️ placeholder (no CS-Cart equivalent) |
| client.home | ✅ live |
| client.init | ✅ live |
| client.meilisearch | ✅ live |
| client.menu | ✅ live |
| client.plugins | ⚠️ placeholder (no CS-Cart equivalent) |
| client.popularSearch | ⚠️ placeholder (no CS-Cart equivalent) |
| client.popularity | ⚠️ placeholder (no CS-Cart equivalent) |
| client.reels | ⚠️ placeholder (no CS-Cart equivalent) |
Development
bun install && bun run typecheck && bun run buildLicense
MIT © misiki-in
