mcpField
B
bagisto-api-shop

bagisto-api-shop

github.com/bagistoDevelopment13221 installsUpdated 2w ago
Repository

About bagisto-api-shop

A skill for building customer-facing storefronts on the Bagisto Shop API. It guides developers through choosing a stack and REST or GraphQL, then directs them to feature-specific implementation references.

Key features

  1. 01Guidance for catalog, cart, checkout, and account flows
  2. 02REST and GraphQL implementation guidance
  3. 03Feature-specific API reference pages
  4. 04Authentication and cart lifecycle guidance

Use cases

  1. 01Building a product catalog and search experience
  2. 02Implementing cart, checkout, and order confirmation
  3. 03Adding customer login, profile, and order history

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bagisto/agent-skills --skill bagisto-api-shop

After installing, type/bagisto-api-shopin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

reference/
connecting-to-the-api.md
graphql.md
reference/features/
compare.md
contact-us.md
coupons.md
newsletter.md
reviews.md
storefront-context.md
wishlist.md
reference/flows/
account.md
add-to-cart.md
authentication.md
cart.md
checkout.md
customer-orders.md
order-confirmation.md
product-details.md
product-listing.md

Details

From the project README

Build a storefront on the Bagisto Shop API

Implement any customer-facing storefront — catalog, cart, checkout, account, wishlist, compare — on the Bagisto Shop API (/api/shop/* REST + POST /api/graphql). This skill is a router: it tells you the flow and points you at the reference page for each feature; the reference pages carry the architecture, UI/UX, endpoints, and a checklist.

⚠️ Load these FIRST (before any code)

  1. reference/connecting-to-the-api.md — auth (storefront key + cart/customer tokens), the {data,meta}/header pagination, error codes, and the verify-before-coding protocol.
  2. reference/graphql.md — if the client picked GraphQL: the result-field/id rule, camelCase inputs, cursor pagination.

The api-docs are the source of truth for exact request/response shapes — https://api-docs.bagisto.com and its /llms.txt index. The reference pages name the endpoints and flow; open the linked docs page for the precise body/response before writing the call. Never invent a payload from memory.

Step 1 — ask the client (CRITICAL, before building)

  1. Platform — web, mobile (native/cross-platform), desktop?
  2. Framework/stack — React/Next, Vue/Nuxt, Flutter, React Native, Swift/Kotlin, plain JS?
  3. Transport — REST or GraphQL? (REST for simple screens; GraphQL when a screen needs many related fields at once. Both fully supported.)
  4. First feature/flow — catalog, cart+checkout, account, …?

Confirm, then tailor everything to the answers. Don't assume a stack.

Step 2 — open the reference for the feature

Flows (multi-step journeys / pages)
PageBuild this
reference/flows/product-listing.mdCategories, product list, search, filters
reference/flows/product-details.mdProduct page (per-type option discovery, reviews, related)
reference/flows/add-to-cart.mdAdd-to-cart per product type
reference/flows/cart.mdMini-cart + cart page (read/update/remove/merge/totals)
reference/flows/checkout.mdAddress → shipping → payment → place order
reference/flows/order-confirmation.mdPost-order thank-you page
reference/flows/authentication.mdRegister, login, logout, verify, forgot/change password
reference/flows/account.mdProfile + address book
reference/flows/customer-orders.mdOrder history, detail, cancel, reorder, invoices, downloadables
Features (single capabilities)
PageBuild this
reference/features/coupons.mdApply / remove coupon
reference/features/wishlist.mdWishlist add/toggle/list/move-to-cart
reference/features/compare.mdCompare list
reference/features/reviews.mdProduct reviews + the customer's own reviews
reference/features/newsletter.mdNewsletter subscribe
reference/features/contact-us.mdContact form
reference/features/storefront-context.mdCountries/states, channels, currencies, locales, CMS pages, themes

Each page = overview → flow architecture → UI/UX → step-by-step API (with the exact endpoints) → errors → checklist. Follow it; it defers exact shapes to the api-docs.

Consolidated critical rules (the gotchas that bite)

  • Verify before coding. PAUSE → open the endpoint's docs page (or query the MCP) → confirm the method/fields → implement → check types. Don't guess endpoint names or bodies.
  • Auth per surface. Every shop call sends X-STOREFRONT-KEY; cart/account/checkout calls also send Authorization: Bearer <cartToken | customerToken>. Guests mint a cart token first (POST /api/shop/cart-tokens).
  • Mutating cart/checkout calls return the full updated cart — reconcile your UI from the response, don't mutate locally.
  • Guest→customer merge on login (merge-carts) or the guest's items are lost.
  • Post-order cleanup — clear cart state + discard the guest cart token after a placed order, or the cart popup shows stale items.
  • GraphQL: select the documented result fields of action mutations (success/message/orderId/totals), not a generic id; inputs are camelCase; one field per line. See reference/graphql.md.
  • Don't hardcode dynamic data (shipping/payment methods, prices, options) — fetch it from the API.

Comments

Markdown supported