# 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:

  1. Create a repository within Marfeel organisation with the provider name
    • eg. Taboola, FacebookAudience, YoutubePlaylist...
  2. Clone this new repository in your development environment
  3. Scaffold the files using the providers CLI
  4. Implement the provider's logic following its documentation and any other specific requirements
  5. Write unit tests to prove the widget works as expected
  6. Test the widget in the Playground in your local environment.
  7. Make sure the ACID tests all pass
  8. Implement the extractor to make scaffolding easier
  9. Publish the package 🎉

Go to the "create an ad server provider" guide.