# Tenant architecture
This article describes the file system that all tenants code repositories follow.
Each Mediagroup at Marfeel has its own GitHub repository. It contains all the custom configuration for all the websites belonging to the same Mediagroup.
Within this repository, each website has a top-level folder, named after the website's URI.
Each tenant folder contains at least an
index folder, which represents the main homepage (for instance:
http://awesome.com). If different homepages exist, for example, to support the internationalization of the website, they will each have their folder:
Each of those is a Marfeel name:
it. Marfeel names behave as independent websites, however, they can benefit from Marfeel extensibility principle, to avoid repeating common configuration.
The complete, minimal file structure of a tenant is:
awesome.com ├── index │ ├── resources │ │ ├── comments.json │ │ ├── features.json │ │ ├── inventory.json │ │ ├── metrics.json │ │ ├── pwa.json │ │ └── ui.json │ └── src │ ├── js │ │ └── main.js │ ├── scss │ │ └── _custom.scss │ ├── whiteCollar │ │ └── main.js │ └── definition.json ├── themes │ └── mediaBlog │ ├── layoutsDescriptor │ │ └── default.s.json │ └── themeDescriptor.json ├── publisher.json └── twister.json
Read about each json file's responsibilities in details in the dedicated articles.
# Theming and Styling at a glance
Every Tenant has a specific theme, which will determine some of the core templates used for rendering. You can find the list of available themes on GitHub (opens new window). The markup extensibility principles explain how to shadow templates at Marfeel, and how they are resolved by path.
ui.json declares site-wide styles.
Every tenant can also have a
_custom.scss file, with any additional CSS required.
Finally, layouts are declared in json files, in a "layout descriptors" folder.
# Monetization at a glance
Find a tenant's business model in the
twister.json and all the inventory configuration in the
# Content platform at a glance
The whiteCollar script is the most common way of extracting content for section pages, although it can also be done with a jsoup configuration.
Websites built with WordPress should have the MarfeelPress plugin: it enables the MarfeelPress ripper to extract content directly from Wordpress API endpoints.
definition.json holds all the configuration flags related to content extraction
# Device differences
Marfeel is available on mobile and tablet. The mobile version is called
s, while the tablet is
Different files can be loaded depending on the device, by postfixing the filename with the device name.
|Common file||Loads in mobile only||Loads in tablet only|
| || |
| || |
| || |
All other files are device-independent.
# Additional files
A tenant with a complete Marfeel configuration can have more files:
cherokeefolder: next to the
indexfolder, if the tenant has a native app configured.
providers.json: for specific extraction configurations.
manifest.json: Marfeel provides one by default, but it can be extended.
widgets.json: to declare widgets that are part of the content.
layoutdescriptorsfolder can contain as many json files as required to style section pages.
- If the
JsoupRipperis in use, a
src/jsoupfolder can contain as many
.propertiesfiles as required to extract section pages.
ads.txtfile, located at the tenant's root folder (i.e.:
/awesome.com/ads.txt): lists all of the companies that are authorized to sell the publisher's inventory.
The CDN activation process creates a
cdn.yml file at the root of every activated tenant, next to the
Read more about this file and how to modify it.
# Code owners
All Mediagroup repositories have code owners (opens new window), which allow Marfeel to control sensitive changes.