承接 pushon/module-livesearch-readonly 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pushon/module-livesearch-readonly

Composer 安装命令:

composer require pushon/module-livesearch-readonly

包简介

Query any LiveSearch data space locally without risking data corruption

README 文档

README

Query any SaaS data space (production, staging, dev) from your local environment without risking data corruption.

Important Disclaimer

This module is intended exclusively for local development. It must never be installed or enabled in production, staging, or any shared environment, because it overrides SaaS behaviour in a way that is only safe for isolated developer machines.

For this reason, it must always be installed using composer require --dev, ensuring it cannot be deployed to higher environments through your CI/CD pipeline.

The Problem - Business & Technical

Business risk

To use LiveSearch locally, developers need SaaS credentials. But once configured, Magento may try to sync your local test catalog into the real SaaS data space via cron or reindexing. This can break search for real customers, pollute production data, and cause trading issues.

Technical limitation

Adobe Commerce provides no built-in mechanism to query LiveSearch without also enabling the rest of the SaaS synchronisation ecosystem. If any credentials exist, Magento assumes the full SaaS stack should operate — even locally.

The Solution

This module introduces dedicated read-only credentials used only by LiveSearch. Your local environment can safely query any SaaS space, while all outbound sync paths remain impossible to trigger.

Local Environment
├── Main SaaS Credentials: EMPTY (no sync possible)
└── LiveSearch Credentials: Any data space (read-only queries)

The module overrides DI for Magento\LiveSearch\Api\ServiceClient only—other SaaS services remain disconnected.

Firewall

As an extra safety layer, there is a small Guzzle middleware that effectively blocks any non-search traffic going through the LiveSearch HTTP client. It's not a real firewall, but it works the same way for our purposes - anything that isn't hitting search/graphql, search/auth-graphql, or search-admin/graphql simply won't reach the API.

Requirements

  • Adobe Commerce 2.4.4+
  • PHP 8.1+
  • magento/module-live-search
  • magento/module-services-connector
  • magento/module-services-id

Installation

composer require --dev pushon/module-livesearch-readonly
bin/magento module:enable PushON_LiveSearchReadOnly
bin/magento setup:upgrade

Setup

1. Remove existing SaaS credentials locally

Ensure your local environment cannot sync data to any SaaS data space:

DELETE FROM core_config_data WHERE path LIKE 'services_connector%';

Then flush cache: bin/magento cache:flush

2. Get credentials from target environment

SSH into the environment you want to query (production, staging, or dev) and run:

bin/magento config:show services_connector/services_connector_integration/production_api_key
bin/magento config:show services_connector/services_connector_integration/production_private_key
bin/magento config:show services_connector/services_id/environment_id

3. Configure locally

Go to Stores > Configuration > Services > LiveSearch Read-Only Credentials and paste the credentials.

4. Verify

bin/magento pushon:livesearch-readonly:health

Options

Option Description Default
enabled Use custom credentials 0
fallback_enabled Fall back to main SaaS if custom missing 0
api_key API Key -
private_key Private Key -
environment_id Environment ID -

Troubleshooting

No search results?

  • Run bin/magento pushon:livesearch-readonly:health
  • Check credentials match the target environment
  • Flush cache

JWT signature failed?

  • Re-copy the private key from the target environment
  • Paste into admin panel (newlines are handled automatically)

License

MIT

pushon/module-livesearch-readonly 适用场景与选型建议

pushon/module-livesearch-readonly 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 pushon/module-livesearch-readonly 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pushon/module-livesearch-readonly 我们能提供哪些服务?
定制开发 / 二次开发

基于 pushon/module-livesearch-readonly 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-10