Platform for producers - Cheatsheet

From Open Food Facts wiki
Revision as of 16:12, 22 March 2021 by Stephane (talk | contribs) (Created page with "Some details about the internals of the Producers Platform that can be of interest to admins and developers. = Introduction to the Producers Platform = On the Producers Plat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Some details about the internals of the Producers Platform that can be of interest to admins and developers.

Introduction to the Producers Platform

On the Producers Platform, each food manufacturer can have its own mini Open Food Facts with only its products.

Producers can:

  • import product data and photos in a variety of ways
  • get reports on data quality and product quality (and even suggestions on how they could improve it)
  • publish their product data and photos in the public Open Food Facts database

How it works

Organizations

Users on Open Food Facts can declare themselves as professional users representing a company or brand. They can associate their account with an organization (only one) by editing their profile (or when they create their account).

If the organization does not exist yet, it is created right away. Otherwise, an e-mail is sent to the producers platform admins, and admins can edit the user profile to add him/her to the organization.

There isn't currently a user management system to allow the creators of organization to manage users, review and accept requests by other users to join their organization, or invite other users.

Importing data and photos to the producers platform

Product edit form

Bulk images upload form

Spreadsheet file import form

GS1 GSDN imports

Equadis

CodeOnline (under development)

Exporting data and photos from the producers platform to the public database

Product owners

Technical details

The producers platform is a separate instance of Product Opener. It differs from the public instance in that products are always associated with 1 owner, which can be an organization or an user.

The owners thare users are only used in very rare instances, e.g. for users that need to import a lot of product photos that they took.

The owner id is of the form org-organization-id or user-user-id (e.g. org-nestle-france or user-stephane).

For each product, the owner id is stored in the "owner" field, and in the "owners_tags" array (with only one entry). The "owners_tags" field is used to make the /owners facet work without extra code (this may change in the future).

Each product is stored in /srv/off-pro/products/[owner-id]/ (instead of /srv/off/products/ on the public platform). Similarly, images are in /srv/off-pro/html/images/products/[owner-id]/.