Svelte Commerce × EverShop

Svelte Commerce on EverShop

Solid core coverage: cart, checkout and sign-in are wired against EverShop’s API. EverShop is single-store, single-vendor and single-currency, and the recorded gaps are reviews, wishlist and vendors.

What works on EverShop today

Cart, checkout and sign-in are wired; reviews, wishlist and vendors are not.

Cart

Wired: issues a real request to EverShop.

Checkout

Wired: issues a real request to EverShop.

Sign-in (auth)

Wired: issues a real request to EverShop.

Known gaps: review, wishlist, vendor

25 of 43 services wired, read from CONNECTORS.md on ; npm may carry a newer patch. How coverage is measured.

What the connector calls on EverShop

The connector calls EverShop’s API under /api, reading everything through the storefront GraphQL endpoint at /api/graphql and writing through REST routes on the same prefix, because EverShop’s REST surface is write-only.

The shopper signs in with POST /api/customer/tokens, and the returned access token is held in the connector’s credentials and sent as Authorization: Bearer; a guest cart rides on EverShop’s sid session cookie, which the connector captures from Set-Cookie and replays, with the cartId kept in a cookie as a fallback.

Requests the @misiki/evershop-connector source makes, by storefront service
ServiceWhat it requests
productGraphQL products(filters: [FilterInput]) for lists, product(id: ID) for one product and featuredProducts(limit: Int), all posted to /api/graphql
categoryGraphQL categories(filters: [...]), with parent eq null for the root categories, and category(id: Int) { products(filters: [...]) } for a category’s products
searchGraphQL products(filters: [...]) with the keyword, cat, min_price and max_price filter keys
cartPOST /api/carts to create a cart, POST /api/cart/{cart_id}/items, PATCH and DELETE /api/cart/{cart_id}/items/{item_id}, then GraphQL cart(id:) or myCart to read the cart back
checkoutPOST /api/carts/{cart_id}/paymentMethods with method_code, then POST /api/orders with cart_id; Stripe adds POST /api/stripe/paymentIntents
orderGraphQL order(uuid:) for one order and currentCustomer { orders } for the shopper’s history
authPOST /api/customer/tokens to sign in, POST /api/customers to register, PATCH /api/customers/me, POST /api/customers/reset-password and GraphQL currentCustomer
addressGraphQL currentCustomer for the address book, POST /api/customers/me/addresses, PATCH and DELETE /api/customers/me/addresses/{id}

EverShop rules the connector follows

Read from the source of misiki-in/evershop-connector at commit 89eee6a of . Where the code has changed since, the code is right.

Quick start

From nothing to a Svelte Commerce storefront reading EverShop. You need Node.js and a EverShop to point it at; the storefront holds no data of its own.

Clone it, choose the connector, point it at EverShop

# 1 — get the storefront
git clone https://github.com/itswadesh/svelte-commerce
cd svelte-commerce

# 2 — one connector at a time: remove the two the storefront ships with, add this one
npm uninstall @misiki/litekart-connector @misiki/vendure-connector
npm i @misiki/evershop-connector

# 3 — point it at your EverShop store
echo PUBLIC_EVERSHOP_API_URL=https://your-store.example.com >> .env

# 4 — run it
npm run dev

Switching works the same way on every backend: what all 26 share, from one connector at a time to store identity.

Environment variables

What Svelte Commerce reads to reach EverShop
VariableRequiredWhat it does
PUBLIC_EVERSHOP_API_URLYesYour EverShop store’s URL. Boot fails, naming this variable, if it is missing.
PUBLIC_EVERSHOP_ACCESS_TOKENNoSent as a bearer token when set.
PUBLIC_CONNECTORNoOnly when more than one connector is installed: @misiki/evershop-connector names the one this build runs on.

init.ts hands the connector every PUBLIC_EVERSHOP_* variable that is set, camel-cased. The guide also lists PUBLIC_EVERSHOP_STORE_ID and PUBLIC_EVERSHOP_CHANNEL_ID, but EverShop is single-store, single-vendor and single-currency, so the connector leaves them unused; PUBLIC_EVERSHOP_API_KEY, PUBLIC_EVERSHOP_API_SECRET and PUBLIC_EVERSHOP_ACCESS_KEY are not read either.

Every variable here begins PUBLIC_, and SvelteKit sends PUBLIC_ variables to the browser: treat each value you set as published.

How the integration works

EverShop is a single store with one vendor and one currency, so there is no store or channel to choose: the connector talks to the one store at the URL you give it. Its recurring gaps are the ones CONNECTORS.md sees across this group of platforms — wishlist, reviews and coupon lookup — where the authors could not find an endpoint and would rather ask than invent one.

Before you rely on it

No connector has been exercised against a live production instance of its platform; each was written from the platform’s published source. The limits every backend shares and the errors every switch can meet are on the backends page.

Offer a sandbox or a correction

FAQ

Questions about Svelte Commerce on EverShop

Can I run an EverShop store on Svelte Commerce today?

Cart, checkout and sign-in are wired; reviews, wishlist and vendors are not. Like every connector, it has not been run against a live production EverShop store.

How do I switch Svelte Commerce to EverShop?

Remove the connectors the storefront ships with, install @misiki/evershop-connector, set PUBLIC_EVERSHOP_API_URL in .env and start the dev server. vite.config.ts resolves whichever connector is installed, so no file in the storefront changes.

Can EverShop serve several stores or currencies through Svelte Commerce?

No. EverShop is single-store, single-vendor and single-currency, so the store and channel variables the guide lists are left unused by the connector.

Sources

EVERSHOP.md, read on ; CONNECTORS.md, read on ; the connector’s source at 89eee6a. Where they disagree with this page, they are right. EverShop is a trademark of its owner, named only to describe compatibility; see trademarks.

Read the whole guide

Chat on WhatsApp