Modules for external providers
See original GitHub issueModules for external providers
Right now, the code base is strictly coupled with data hooks providers. We need to enable the use of different providers interchangeably.
We’re discussing steps forward with @LFades to add different data sources to Next.js Commerce and make it super easy to switch data providers and even aggregate them.
Goals of Commerce
- Next.js Commerce should have a completely data agnostic UI
- Aware of schema: should ship with the right data schemas and types.
- All providers should return the right data types and schemas to blend correctly with Next.js Commerce.
@framework
will be the alias utilized in commerce and it will map to the ecommerce provider of preference- e.g BigCommerce, Shopify, Swell. All providers should expose the same standardized functions. Note that the same applies for recipes using a CMS + an ecommerce provider.
There is a framework
folder in the root folder that will contain multiple ecommerce providers.
Additionally, we need to ensure feature parity (not all providers have e.g. wishlist) we will also have to build a feature API to disable/enable features in the UI.
Expected Structure
Main folder and its exposed functions
-
product
- usePrice
- useSearch
- getProduct
- getAllProducts
-
wishlist
- useWishlist
- addWishlistItem
- removeWishlistItem
-
auth
- useLogin
- useLogout
- useSignup
-
cart
- useCart
- useAddItem
- useRemoveItem
- useCartActions
- useUpdateItem
-
config.json
-
README.md
Example of correct usage of Commece Framework
import { useUI } from '@components/ui'
import { useCustomer } from '@framework/customer'
import { useAddItem, useWishlist, useRemoveItem } from '@framework/wishlist'
Providers under development:
Providers help needed:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:85
- Comments:34 (14 by maintainers)
Top Results From Across the Web
Module to manage external providers in oVirt/RHV
ovirt.ovirt.ovirt_external_provider module – Module to manage external providers in oVirt/RHV . Note. This module is part of the ovirt.ovirt collection ...
Read more >Service Provider Modules - IBM
Service Provider Modules · Cryptographic Service Providers · Trust Policy Modules · Certificate Library Modules · Data Storage Library Modules.
Read more >Providing dependencies in modules - Angular
A provider is an instruction to the Dependency Injection system on how to obtain a value for a dependency. Most of the time,...
Read more >Providers Within Modules - Configuration Language | Terraform
Provider configurations, unlike most other concepts in Terraform, are global to an entire Terraform configuration and can be shared across module boundaries.
Read more >Viewing external providers - Jahia Academy
This panel list all external data sources whether they have been declared automatically when a module is deployed (code driven), ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
EDIT: This comment is outdated. We moved everything to the framework folder in the root. There you’ll be able to create your own providers, take a look at the updated description of this issue ⬆️
Hello all!
We are actively working towards achieving these goals, mentioned in the README:
Goals of Commerce
@framework
will be the alias utilized in commerce and it will map to the ecommerce provider of preference- e.g BigCommerce, Shopify, Swell. All providers should expose the same standardized functions. Note that the same applies for recipes using a CMS + an ecommerce provider.There is a
framework
folder in the root folder that will contain multiple ecommerce providers.Additionally, we need to ensure feature parity (not all providers have e.g. wishlist) we will also have to build a feature API to disable/enable features in the UI.
As always, I’m highly reachable through Twitter DMs. People actively working on this project: @okbel & @lfades.