@growth-labs/store
v0.3.3
Published
Fourthwall storefront integration for Growth Labs Astro sites: a typed Storefront API client, browser cart, checkout/webhook routes, and page-body components. See [`packages-docs/store.md`](../../packages-docs/store.md) for the full contract, config shape
Readme
@growth-labs/store
Fourthwall storefront integration for Growth Labs Astro sites: a typed
Storefront API client, browser cart, checkout/webhook routes, and page-body
components. See packages-docs/store.md for
the full contract, config shape, and adoption notes.
StoreProductPage includes one primary Add to cart action and a best-effort
three-item related-products shelf. It prefers the first configured division
or type collection containing the current product, then falls back to the
main catalogue. The purchase block also shows the shared payment badges and
compact Fourthwall checkout/fulfillment disclosure used by channel sites.
Install
pnpm add @growth-labs/storeRegister the package's Astro components with Tailwind CSS 4 from the site's global stylesheet:
@import "tailwindcss";
@import "@growth-labs/store/tailwind.css";Quick start
// astro.config.mjs
import store from '@growth-labs/store'
export default defineConfig({
integrations: [
store({
brandName: 'MegaProjects',
cartOrigin: 'megaprojects',
collections: [{ handle: 'accessories', name: 'Accessories', grouping: 'type' }],
}),
],
})---
// src/pages/store/index.astro
import Base from '@/layouts/Base.astro'
import StoreIndexPage from '@growth-labs/store/components/StoreIndexPage.astro'
export const prerender = false
---
<Base title="Store" description="Apparel and goods.">
<StoreIndexPage />
</Base>