Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/update-dev-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ jobs:
find content/docs -name "*.mdx" -exec sed -i 's/^``` \+\(\w\+=.\+\)$/```text \1/' {} \;
echo "Code block titles fixed"

- name: Fix internal links
run: |
echo "Fixing internal links from .md to directory format..."
# Change internal links from .md extension to directory format for the docs site
# e.g., /docs/Product-Opener/dev/how-to-develop-using-docker.md -> /docs/Product-Opener/dev/how-to-develop-using-docker/
# Works with any link ending in .md that doesn't contain :// (excludes http/https)
find content/docs -name "*.mdx" -exec sed -i '/:\/\//! s|\([^)]*\)\.md|\1/|g' {} \;
echo "Internal links fixed"

- name: Copy documentation assets
run: |
echo "Copying Product Opener assets..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Data is synchronized monthly between the Open Food Facts server and the bucket;
as such some recent images are likely missing. You should not assume all
images are present in the bucket.

To know the bucket key associated with an image, we use the same directory structure as on Product Opener. See [How to download images](./how-to-download-images.md#computing-single-product-image-folder) for more information.
To know the bucket key associated with an image, we use the same directory structure as on Product Opener. See [How to download images](./how-to-download-images/#computing-single-product-image-folder) for more information.

For example, for the product with barcode '4012359114303', the directory containing the image is `/401/235/911/4303` (that is, three groups of 3 digits followed by one group of 4 digits, all four groups being prefixed with a `/`).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ wish to achieve.
If you want to download a few images (say up to 10), especially if these images
have been uploaded recently, you should [download the image from the Open Food
Facts
server](./how-to-download-images.md#download-from-open-food-facts-server).
server](./how-to-download-images/#download-from-open-food-facts-server).

If you plan to download more images, you should instead
[use the Open Food Facts images dataset hosted on
AWS](./how-to-download-images.md#download-from-aws).
AWS](./how-to-download-images/#download-from-aws).

**NOTE:** please avoid fetching full image if it is not needed, but use image in the right size.

Expand All @@ -21,7 +21,7 @@ AWS](./how-to-download-images.md#download-from-aws).
If you want to download many images, this is the recommended
option, as AWS S3 is faster and allows concurrent download, unlike the
Open Food Facts server, where you should preferably download images one at a
time. See [AWS Images dataset](./aws-images-dataset.md) for more information
time. See [AWS Images dataset](./aws-images-dataset/) for more information
about how to download images from the AWS dataset.

## Download from Open Food Facts server
Expand Down
16 changes: 8 additions & 8 deletions content/docs/Product-Opener/(docs)/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ If these limits are reached, we reserve the right to deny you access to the webs

If your requests come from your users directly (ex: mobile app), the rate limits apply per user.

If you need to fetch a significant fraction of the database, we recommend [downloading the data as a CSV or JSONL file directly](https://world.openfoodfacts.org/data). If you need to download images in bulk, we [have a guide for that](./how-to-download-images.md).
If you need to fetch a significant fraction of the database, we recommend [downloading the data as a CSV or JSONL file directly](https://world.openfoodfacts.org/data). If you need to download images in bulk, we [have a guide for that](./how-to-download-images/).

### If your users do not expect a result immediately (e.g., Inventory apps)

Expand Down Expand Up @@ -126,15 +126,15 @@ We however ask that you send the [`app_name`, `app_version` and `app_uuid` param

We are building a complete OpenAPI reference. Here is a list of the current API documentation available:

- [OpenAPI documentation (v2)](../api/ref-v2.md)
- [OpenAPI documentation for v3](../api/ref-v3.md) (under active development, may change frequently)
- A [cheatsheet](../api/ref-cheatsheet.md) listing some common patterns.
- A [change log for the API and product schema](../api/ref-api-and-product-schema-change-log.md)
- [OpenAPI documentation (v2)](../api/ref-v2/)
- [OpenAPI documentation for v3](../api/ref-v3/) (under active development, may change frequently)
- A [cheatsheet](../api/ref-cheatsheet/) listing some common patterns.
- A [change log for the API and product schema](../api/ref-api-and-product-schema-change-log/)

## Tutorials

- A comprehensive introduction to [Using the Open Food Facts API](tutorial-off-api.md).
- [Uploading images to the Open Food Facts API](tutorial-uploading-photo-to-a-product.md)
- A comprehensive introduction to [Using the Open Food Facts API](tutorial-off-api/).
- [Uploading images to the Open Food Facts API](tutorial-uploading-photo-to-a-product/)

## Help

Expand All @@ -147,7 +147,7 @@ We are building a complete OpenAPI reference. Here is a list of the current API

[slack_url]: https://slack.openfoodfacts.org/
[report_bugs]: https://github.com/openfoodfacts/openfoodfacts-server/issues/new/choose
[contribution_guidelines]: https://github.com/openfoodfacts/openfoodfacts-server/blob/main/CONTRIBUTING.md
[contribution_guidelines]: https://github.com/openfoodfacts/openfoodfacts-server/blob/main/CONTRIBUTING/

## SDKs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ There were lots of non-breaking changes (new fields) from 2012 to 2024. Those ch

### Product version 999 - Changed barcode normalization

The normalization of leading 0s has been changed. See [Barcode normalization](./ref-barcode-normalization.md)
The normalization of leading 0s has been changed. See [Barcode normalization](./ref-barcode-normalization/)

### Product version 998 - API version 3

Expand Down
4 changes: 2 additions & 2 deletions content/docs/Product-Opener/(docs)/api/ref-cheatsheet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: "Reference: API CheatSheet"

This reference cheatsheet gives you a quick reminder to send requests to the OFF API.

If you are new to API usage you might look at the [tutorial](tutorial-off-api.md).
Also, refer to the [API reference documentation](ref-v2.md) for complete information.
If you are new to API usage you might look at the [tutorial](tutorial-off-api/).
Also, refer to the [API reference documentation](ref-v2/) for complete information.

## Add/Edit an Existing Product

Expand Down
18 changes: 9 additions & 9 deletions content/docs/Product-Opener/(docs)/api/tutorial-dev-journey.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ title: "Tutorials for Common developer journeys"

### READ only journeys

- Dev Journey : [Comparing sodas](./tutorials/comparing-sodas.md)
- Dev Journey : [Finding healthy breakfast cereals](./tutorials/finding-healthy-cereals.md)
- Dev Journey : [Scanning barcodes](./tutorials/scanning-barcodes.md)
- Dev Journey : [Comparing sodas](./tutorials/comparing-sodas/)
- Dev Journey : [Finding healthy breakfast cereals](./tutorials/finding-healthy-cereals/)
- Dev Journey : [Scanning barcodes](./tutorials/scanning-barcodes/)
### READ and WRITE journeys

- Dev Journey : [Adding missing products](./tutorials/adding-missing-products.md)
- Dev Journey : [Get the Nutri-Score](./tutorials/get-the-nutriscore.md)
- Dev Journey : [Get the Green-Score](./tutorials/get-the-green-score.md)
- Dev Journey : [Get ingredient related analysis on new or existing products (Nova, allergens, additives…)](./tutorials/get-ingredient-related-analysis.md)
- Dev Journey : [Adding non-standard fields to a food product using Folksonomy (coming soon for cosmetics, pet food, and other products)](./tutorials/folksonomy-engine.md)
- Dev Journey : [Retrieving and adding prices to products using Open Prices](./tutorials/product-prices.md)
- Dev Journey : [Adding missing products](./tutorials/adding-missing-products/)
- Dev Journey : [Get the Nutri-Score](./tutorials/get-the-nutriscore/)
- Dev Journey : [Get the Green-Score](./tutorials/get-the-green-score/)
- Dev Journey : [Get ingredient related analysis on new or existing products (Nova, allergens, additives…)](./tutorials/get-ingredient-related-analysis/)
- Dev Journey : [Adding non-standard fields to a food product using Folksonomy (coming soon for cosmetics, pet food, and other products)](./tutorials/folksonomy-engine/)
- Dev Journey : [Retrieving and adding prices to products using Open Prices](./tutorials/product-prices/)

## Adding more journeys

Expand Down
4 changes: 2 additions & 2 deletions content/docs/Product-Opener/(docs)/api/tutorial-off-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Tutorial on using the Open Food Facts API"

Welcome to this tutorial on basic usage of Open Food Facts API.

First, be sure to see our [Introduction to the API](./index.md).
First, be sure to see our [Introduction to the API](./index/).

## Scan A Product To Get Nutri-score

Expand All @@ -14,7 +14,7 @@ To get a product nutriscore, send a request to the [Get A Product By Barcode](ht

### Authentication

Usually, no authentication is required to query Get A Product Nutri-score. However, there is a basic auth to avoid content indexation in the staging environment (which is used throughout this tutorial). For more details, visit the [Open Food Facts API Environment](index.md#api-deployments).
Usually, no authentication is required to query Get A Product Nutri-score. However, there is a basic auth to avoid content indexation in the staging environment (which is used throughout this tutorial). For more details, visit the [Open Food Facts API Environment](index/#api-deployments).

### Describing the Get Request

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Tutorial on uploading images to the Open Food Facts API"

This basic tutorial shows you how to upload an image of a product to the Open Food Facts API.

Be sure to also read the [introduction to the API](./index.md)
Be sure to also read the [introduction to the API](./index/)

## Points to consider before uploading photos

Expand Down Expand Up @@ -43,7 +43,7 @@ Multilingual products have several photos based on the languages present on the
The WRITE operations in the Open Food Facts API require authentication. Therefore you need a valid `user_id`^[user_id_not_email] and `password` to write the photo to 100% Real Orange Juice.

> Sign up on the [Open Food Facts App](https://world.openfoodfacts.org/) to get your `user_id` and `password` if you dont have one.
For more details, visit the : [Authentication paragraph in our introduction](../index.md#authentication).
For more details, visit the : [Authentication paragraph in our introduction](../index/#authentication).

^[user_id_not_email]: user_id is the username of your account. You must not use your email address.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ If you have an app that makes POST calls and you don't want your users to authen
- `user_id`: myappname
- `password`: 123456

* For a complete reference on AUTH, please read: [Authentication in our introduction](../index.md#authentication)
* For a complete reference on AUTH, please read: [Authentication in our introduction](../index/#authentication)

---

## Adding images to support your edit, and get machine learning predictions
If you ask your users just one thing, it would be to send photos of the packaging (front, ingredients, nutrition, recycling, the more the better)
Please refer to our [comprehensive tutorial on uploading images](../tutorial-uploading-photo-to-a-product.md)
Please refer to our [comprehensive tutorial on uploading images](../tutorial-uploading-photo-to-a-product/)

---

Expand Down Expand Up @@ -101,21 +101,21 @@ It should be structured as: user-agent + user-id.
---
## Leveraging Robotoff ML predictions to simplify life for your users

Leveraging [Robotoff prediction](../intro-robotoff.md) to simplify life for your users.
Leveraging [Robotoff prediction](../intro-robotoff/) to simplify life for your users.
You can get a category prediction from images (useful for Nutri-Score and Eco-Score), you can get quality labels prediction, brand predictions, weight predictions from images. You can also get an automatic extraction of ingredients and nutrition facts from an image.
To achieve this you need the upload image section above. Adding data like product name, ingredients and nutrition can help, but some predictions can be done with just images.

## Getting your users to check ingredients OCR in an autonomous fashion

Getting your users to [check ingredients OCR in an autonomous fashion](./get-ingredient-related-analysis.md)
Getting your users to [check ingredients OCR in an autonomous fashion](./get-ingredient-related-analysis/)

## Getting your users to input nutrition facts

[Getting your users to input nutrition facts](../../dev/explain-nutrition-data.md)
[Getting your users to input nutrition facts](../../dev/explain-nutrition-data/)

## Getting your users to input packaging data

Getting your users to [input packaging data](../../dev/explain-packaging-data.md)
Getting your users to [input packaging data](../../dev/explain-packaging-data/)

## Showing the result of their work

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A local cache is a copy of OFF data stored directly on your system or server. Th

- **FoodVisor Contributed (Python/MongoDB) backend:** The FoodVisor startup contributed a few years ago <a href="https://github.com/openfoodfacts/openfoodfacts-apirestpython">a Python-based backend with a MongoDB export</a>, providing a solid starting point for caching in Python environments.
- **Project-Specific Caches:** Several OFF projects like open-prices and robotoff have implemented local caches for their own needs. While not immediately reusable, they can serve as valuable references.
- **SDKs** We have [a number of official SDKs](../api.md#sdks) that can be leveraged as part of a caching backend. Please leverage and contribute to those 🙏
- **SDKs** We have [a number of official SDKs](../api/#sdks) that can be leveraged as part of a caching backend. Please leverage and contribute to those 🙏
- **You can start a project within Open Food Facts to solve this**

### Need for Diverse Solutions
Expand All @@ -26,7 +26,7 @@ For applications primarily focused on user-generated requests, a local cache may
### Licensing and Data Sharing

Even when using a local cache, you're still bound by the Open Database License (ODbL). **Do not mix OFF data with external product data**. All additions or modifications made to OFF data must be shared back to OFF, preferably through the WRITE API. Consider incorporating this functionality into your cache implementation.
For more on legal issues [please read this page](./license-be-on-the-legal-side.md)
For more on legal issues [please read this page](./license-be-on-the-legal-side/)

### Challenges of Cache Maintenance

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can get information about absence or unawareness of the presence of:

## Flow
### The product does not exist
* You can use our [adding products tutorial](./adding-missing-products.md)
* You can use our [adding products tutorial](./adding-missing-products/)

### The product does exist: Get the status of the product and show prompts in case of incomplete ingredients or category (also required for NOVA ultra-processing levels)

Expand All @@ -54,7 +54,7 @@ then "Add ingredients to see the level of food processing and potential additive
* Once the user has entered once of your completion flow, proceed to the next step

### Upload ingredient photo
* [Please follow our dedicated tutorial on photo upload](../tutorial-uploading-photo-to-a-product.md)
* [Please follow our dedicated tutorial on photo upload](../tutorial-uploading-photo-to-a-product/)
* The DART SDK is offering support for photo upload, and we encourage you to implement it in one of the official Open Food Facts SDKs if it's not supported yet.
* Ensure that your users crop language by language, or take all languages at once, but you perform server side cropping on one specific language before performing the OCR
* We're working on a ML solution to detect languages and performing auto-crops per language ([reuse@openfoodfacts.org](mailto:reuse@openfoodfacts.org) to learn more)
Expand All @@ -68,7 +68,7 @@ then "Add ingredients to see the level of food processing and potential additive

#### Selecting photos

* [Please look at the specific tutorial](../tutorial-uploading-photo-to-a-product.md)
* [Please look at the specific tutorial](../tutorial-uploading-photo-to-a-product/)

#### Rotating a photo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Helping your users get the Green-Score for any product"
- That will then be processed by Open Food Facts to get the computed result you want to show them.
- You can implement the complete flow so that they get immediately the result with some effort on their side.
- That will ensure user satisfaction
- Please refer to the [product addition tutorial](./adding-missing-products.md) for the technical way to do the required operations (such as category input), and to the high level workflow below for all the cases you have to handle.
- Please refer to the [product addition tutorial](./adding-missing-products/) for the technical way to do the required operations (such as category input), and to the high level workflow below for all the cases you have to handle.

## Table of contents

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ title: "Open Beauty Facts, Open Pet Food Facts, Open Products Facts experimental

- No nutrition table
- No Green-Score, Nutri-Score or NOVA groups for ultra-processing
- Most data will be modelled using the [Folksonomy Engine](docs/api/tutorials/folksonomy-engine.md)
- Most data will be modelled using the [Folksonomy Engine](docs/api/tutorials/folksonomy-engine/)

### Important APIs if you want to scan any kind of product (or help your users avoid adding cosmetics by mistake in Open Food Facts)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Explanation on Docker Setup of pro platform for development"
---

This explains how we setup docker file for pro platform development.
For explanations on how to use it, see: [how-to-guides/pro-development](how-to-develop-producer-platform.md)
For explanations on how to use it, see: [how-to-guides/pro-development](how-to-develop-producer-platform/)

off is the public facing application (world.openfoodfacts.org)
off-pro is the producers platform (world.pro.openfoodfacts.org)
Expand All @@ -13,7 +13,7 @@ When we work on the pro platform for development we want:
* off-pro containers to talk to each other, and, generally, have their own volumes
* off and off-pro containers to talk to shared containers
(from openfoodfacts-authentication and openfoodfacts-shared-services),
see [dependencies](https://github.com/openfoodfacts/.github/blob/main/docs/service-dependencies.md)
see [dependencies](https://github.com/openfoodfacts/.github/blob/main/docs/service-dependencies/)
* minion and backend from both apps to access the same postgres database
(which stores tasks queues)
* off and off-pro backends / minion needs to share some volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ is part of the organization information, stored in a file on disk (`orgs` datase
## In development

In development, the openfoodfacts-auth project is a service dependency of this project.
See [Service Dependencies](https://github.com/openfoodfacts/.github/blob/main/docs/service-dependencies.md)
See [Service Dependencies](https://github.com/openfoodfacts/.github/blob/main/docs/service-dependencies/)

If you want to become admin of the website,
you just need to create a user using one of the account listed in `admins`,
Expand Down
Loading