✨ We just launched Fimo.ai - an AI Website Builder to create websites in minutes - Try it now

Strapi plugin logo for Open Mercato

Open Mercato

Seamless Open Mercato integration

Logo - Strapi Plugin Open Mercato

Strapi Open Mercato Plugin

Seamless Open Mercato integration for your Strapi instance

NPM version Monthly download on NPM CircleCI Build Status codecov

A Strapi plugin that connects your Strapi application with Open Mercato through a user-friendly interface. It features a custom product field and efficient product synchronization via the Open Mercato REST API (/catalog/products). The plugin comes with configurable caching mechanisms to optimize performance.

📋 Table of Contents

✨ Features

  • Attach Open Mercato products to Strapi Content Types using a dedicated custom field
  • Automatic product data synchronization via REST API
  • Built-in caching (in-memory or Redis)

📋 Requirements

  • Strapi v5.7.0 or later
  • Node.js 18+
  • An Open Mercato instance with REST API access
  • For Redis cache: a running Redis instance

📦 Installation

npm install @sensinum/strapi-plugin-open-mercato@latest
# or
yarn add @sensinum/strapi-plugin-open-mercato@latest

Then, rebuild your Strapi admin panel:

npm run build
# or
yarn build

🔧 Plugin Configuration

Required Configuration

Configure the plugin in your Strapi project's ./config/plugins.js (or .ts):

  • encryptionKey (string, required): A 32-character string used for encrypting sensitive data stored in Strapi
  • apiUrl (string, optional): Your Open Mercato instance URL (e.g. https://my-instance.openmercato.com)
  • accessToken (string, optional): Your Open Mercato API access token
  • engine (string, optional, default not set): Cache engine — 'memory' or 'redis'
  • connection (object, required if engine is 'redis'): Redis connection details:
    • host (string)
    • port (number)
    • db (number)
    • password (string, optional)
    • username (string, optional)

Example Configurations

Using Memory Engine:

// ./config/plugins.js
module.exports = ({ env }) => ({
  'open-mercato': {
    enabled: true,
    config: {
      encryptionKey: env('OPEN_MERCATO_ENCRYPTION_KEY'),
      apiUrl: env('OPEN_MERCATO_API_URL'),
      accessToken: env('OPEN_MERCATO_ACCESS_TOKEN'),
      engine: 'memory',
    },
  },
});

Using Redis Engine:

// ./config/plugins.js
module.exports = ({ env }) => ({
  'open-mercato': {
    enabled: true,
    config: {
      encryptionKey: env('OPEN_MERCATO_ENCRYPTION_KEY'),
      apiUrl: env('OPEN_MERCATO_API_URL'),
      accessToken: env('OPEN_MERCATO_ACCESS_TOKEN'),
      engine: 'redis',
      connection: {
        host: env('REDIS_HOST', '127.0.0.1'),
        port: env.int('REDIS_PORT', 6379),
        db: env.int('REDIS_DB', 0),
        password: env('REDIS_PASSWORD', undefined),
        username: env('REDIS_USERNAME', undefined),
      },
    },
  },
});

Remember to add the corresponding environment variables to your .env file.

👨‍💻 Development & Testing

  • Build: yarn build
  • Test backend: yarn test:server
  • Test frontend: yarn test:ts:front

🔗 Links

💬 Community Support

  • GitHub (Bug reports, contributions)
  • Discord (For live discussion with the Community and Strapi team)
  • Community Forum (Questions and Discussions)

📄 License

See the MIT License file for licensing information.

Install now

npm install @sensinum/strapi-plugin-open-mercato

STATS

No GitHub star yetNot downloaded this week

Last updated

5 days ago

Strapi Version

5.7.0 and above

Author

github profile image for Mateusz Ziarko
Mateusz Ziarko

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.