What's Included
Next.js App
The Next.js app pulls all of the ui library and integration packages together to deliver a storefront.
UI library
The @hv/ui
package exports reusable tailwind-based ui components
Integration and Vendor Packages
For more information on how integration packages themselves are structured, see Packages Overview
CMS
The @hv/cms
package exports a Content
function that returns the vendor-agnostic
interface to the CMS.
CMS Vendors
The @hv/cms
package will use the currently configured cmsProvider
package to talk to the vendor and normalize content objects.
Vendor specific code will be in vendor packages:
@hv/contentful
@hv/builder.io
@hv/sanity
@hv/hygraph
@hv/amplience
Catalog
The @hv/catalog
package exports a Catalog
function that returns the vendor-agnostic
interface to the vendor catalog:
Catalog Vendors
The @hv/commerce
package will use the currently configured commerceProvider
package to talk to the vendor and normalize catalog objects.
Vendor specific code will be in vendor packages:
@hv/commercetools
@hv/bigcommerce
@hv/shopify
Product Lists
If supported by the commerce vendor (indicated by its capabilities
),
The @hv/product-lists
package exports a ProductLists
function that returns the vendor-agnostic
interface to customer product lists:
Product List Vendors
The @hv/product-lists
package will use the currently configured commerceProvider
package
to talk to the vendor and normalize the product list objects.
Vendor specific code will be in vendor packages. Currently, only commercetools
has the customerProductList
capability:
@hv/commercetools
Cart
The @hv/cart
package exports a Cart
function that returns the vendor-agnostic
interface to the vendor cart:
Cart Vendors
The @hv/cart
package will use the currently configured cartProvider
to actually talk to the vendor and normalize cart objects.
Vendor specific code will be in vendor packages:
@hv/commercetools
@hv/bigcommerce
@hv/shopify
Checkout
The @hv/checkout
package exports a Checkout
function that returns the vendor-agnostic
interface to the vendor checkout:
This package performs initialization of checkout sessions when using the included drawer checkout or redirecting a customer to a vendor hosted checkout experience, such as Stripe.
Checkout Vendors
The @hv/checkout
package will use the currently configured checkoutProvider
to actually handle checkout initialization or redirect logic.
Vendor specific code will be in vendor packages:
@hv/commerce-stripe
Note: the currently configured commerce vendor may used as a checkout vendor.
A commerce vendor can indicate that it has its own hosted checkout
with the capabilities
key/value pair object. Capabilities for the current vendor are accessible
with import { getCapabilities } from '@hv/commerce
;
If a commerce vendor like Shopify exports expressCheckout: true
as a capability,
the @hv/checkout
package will use the commerce vendor for checkout handling.
Profile
The @hv/profile
package exports a Profile
function that returns the vendor-agnostic
interface to the vendor customer profile:
Profile Vendors
The @hv/profile
package will use the currently configured profileProvider
to actually talk to the profile apis and normalize profile objects.
Vendor specific code will be in vendor packages:
@hv/commercetools
OMS
The @hv/oms
package exports an OMS
function that returns the vendor-agnostic
interface to the vendor order management apis:
OMS Vendors
The @hv/oms
package will use the currently configured omsProvider
to actually talk to the oms apis and normalize oms objects.
Vendor specific code will be in vendor packages:
@hv/commercetools
Search
The @hv/search
package exports a Search
function that returns the vendor-agnostic
interface to the vendor search:
Search Vendor
The @hv/search
package will use the currently configured searchProvider
to actually talk to the search apis and normalize search objects.
Vendor specific code will be in vendor packages:
@hv/algolia
Note: the currently configured commerce vendor may used as a search vendor.
A commerce vendor can indicate that it has search capabilities
with the capabilities
key/value pair object. Capabilities for the current vendor are accessible
with import { getCapabilities } from '@hv/commerce
;
If a commerce vendor like commercetools exports search: true
as a capability,
the @hv/search
package will use the commerce vendor as a search provider instead of
a third-party provider like Algolia.
Config
The @hv/config
package exports a Config
function that returns the vendor-agnostic
interface to the vendor config integration:
Config Vendors
The @hv/config
package will use a vendor package to fetch and expose configs:
@hv/environment-variables-config
Feature Flags
The @hv/feature
package exports a Feature
function that returns the vendor-agnostic
interface to the feature flag integration:
Feature Vendors
The @hv/feature
package will use a vendor package to fetch and expose feature flags:
@hv/environment-variables-config
@hv/feature-vercel