# Providers at Marfeel
Providers at Marfeel are the implementation framework of our JSON extensibility philosophy.
They all share a common structure, and come in different flavours for each extension:
Each provider implementation is stored in an independent GitHub repository: it is entirely decoupled from Marfeel Core implementation. Each provider is standalone: it contains the entire implementation required for a provider to work out-of-the-box with any Marfeel website. It can also be visually tested isolated, in a Storybook integration (opens new window): the Playground.
Marfeel sites use providers by requesting them as Node packages (opens new window): one Marfeel site can require as many dependencies as needed, without impacting the performance of any other Marfeel site.
Each provider is consumed in the frontend via dynamic imports (opens new window).
# Providers characteristics
Even though all providers are independent, you can always recognise them by their structure:
- They always contains their own JSON schema (opens new window) and associated tests: so users know exactly how to use the provider.
- They always follow the same strict coding standards, whether they are used by 1 Marfeel site or hundreds.
- They can only be published if they prove their correctness and performance with ACID tests.
- They contain their own
extractor
to automate scaffolding of new Marfeel sites. Read more about extractors.
# Creating a provider
The following steps are common for all providers:
- Create a repository within Marfeel organisation with the provider name
- eg. Taboola, FacebookAudience, YoutubePlaylist...
- Clone this new repository in your development environment
- Scaffold the files using the providers CLI
- Implement the provider's logic following its documentation and any other specific requirements
- Write unit tests to prove the widget works as expected
- Test the widget in the Playground in your local environment.
- Make sure the ACID tests all pass
- Implement the extractor to make scaffolding easier
- Publish the package 🎉