PHPackages                             padosoft/laravel-ai-price-intelligence - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. padosoft/laravel-ai-price-intelligence

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

padosoft/laravel-ai-price-intelligence
======================================

Enterprise Product &amp; Price Intelligence / Competitor Monitoring for Laravel — AI-native, EU AI Act-ready, self-hostable alternative to Netrivals and Competitoor.

v1.7.1(2w ago)0346Apache-2.0PHPPHP ^8.3CI passing

Since May 24Pushed 2w agoCompare

[ Source](https://github.com/padosoft/laravel-ai-price-intelligence)[ Packagist](https://packagist.org/packages/padosoft/laravel-ai-price-intelligence)[ Docs](https://github.com/padosoft/laravel-ai-price-intelligence)[ RSS](/packages/padosoft-laravel-ai-price-intelligence/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (9)Dependencies (13)Versions (28)Used By (0)

laravel-ai-price-intelligence
=============================

[](#laravel-ai-price-intelligence)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ce5f3e2582792eea4c0d8090e05298be6dfb681ed559d494951961fb66f3fa78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061646f736f66742f6c61726176656c2d61692d70726963652d696e74656c6c6967656e63652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/padosoft/laravel-ai-price-intelligence)[![PHP](https://camo.githubusercontent.com/f46c300b5c77864d0cce1f4f9568a9c0cd14371eaf8ba6a974e08b487b7ffdeb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d3737376262342e7376673f7374796c653d666c61742d737175617265)](https://www.php.net/)[![Laravel](https://camo.githubusercontent.com/e4f4474fd4421b9522d3ed1a544f8df3115cfd12083ff6293d45ea0e3c8dbdb3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d6666326432302e7376673f7374796c653d666c61742d737175617265)](https://laravel.com/)[![Tests](https://camo.githubusercontent.com/22a600a8b7ad0475b1dc4563b2c98aa6ea39d7044721af0915bd948946d259fa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7061646f736f66742f6c61726176656c2d61692d70726963652d696e74656c6c6967656e63652f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/padosoft/laravel-ai-price-intelligence/actions/workflows/ci.yml)[![License](https://camo.githubusercontent.com/a39964403b3ad23090c20e0f4e86b834c7f13cd17f0fb9e042c3cce06f6a13b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4170616368652d2d322e302d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE)

[![Laravel AI Price Intelligence](resources/banner.png)](resources/banner.png)

> **Enterprise Product &amp; Price Intelligence / Competitor Monitoring for Laravel.** Open-source, AI-native and **EU AI Act-ready by design** — a self-hostable alternative to Netrivals (Lengow) and Competitoor. It is the *intelligence engine*; your ecommerce (MarginOS or your own logic) keeps the pricing decisions.

---

Table of Contents
-----------------

[](#table-of-contents)

- [Why this package](#why-this-package)
- [Features](#features)
- [Web admin panel](#web-admin-panel)
- [Quick start](#quick-start)
- [Integrating with your ecommerce](#integrating-with-your-ecommerce)
- [Architecture](#architecture)
- [AI features](#ai-features)
- [Compliance: GDPR &amp; EU AI Act](#compliance-gdpr--eu-ai-act)
- [Configuration &amp; feature toggles](#configuration--feature-toggles)
- [Competitive matrix](#competitive-matrix)
- [Extending](#extending)
- [Testing](#testing)
- [Documentation](#documentation)
- [License](#license)

---

Why this package
----------------

[](#why-this-package)

Ecommerce teams pay expensive, black-box SaaS (Netrivals, Competitoor) to monitor competitor prices, assortments and content. `laravel-ai-price-intelligence` brings that capability **into your Laravel stack**, open-source and self-hostable:

- You send the **SKUs**, the **countries** to watch, and either the **competitor URLs** or let the **AI search** discover them.
- The package **matches** the right competitor product (GTIN → MPN → name → embedding → optional vision LLM), **scrapes** price/stock/content, **normalizes** prices (multi-currency FX), stores **time-series**, runs **AI** (forecast, anomaly, sentiment) and emits **webhooks + events**(webhooks are HMAC-signed when the subscription has a secret).
- Your ecommerce reads those signals for **dynamic pricing**, **MAP enforcement**, **assortment** and **merchandising** — the package never applies prices for you (advisory by design).

It is **boundary-respecting**: it provides intelligence; your platform keeps the business decisions.

Features
--------

[](#features)

- 🔌 **Catalog onboarding**: bulk JSON, CSV import, webhook sync, console command.
- 🌍 **Geo-aware discovery** via [`padosoft/laravel-ai-search-providers`](https://github.com/padosoft/laravel-ai-search-providers) (per-target country/locale).
- 🧠 **Cascade product matching** with confidence band + human-review queue (auto-confirm ≥85 · review 60–84 · reject &lt;60).
- 🕷️ **Scraping**: JSON-LD + OpenGraph extraction, generic HTTP + Browsershot, **marketplace adapters**(Amazon, eBay, Google Shopping, Farfetch, Idealo, Trovaprezzi).
- 💶 **Price normalization**: multi-currency FX to a base currency, time-series observations.
- ⏱️ **Scheduling** with adaptive backoff + dedicated, configurable queues (`pi-discovery`, `pi-scrape`, …; Horizon-friendly, but any Laravel queue driver works).
- 🚨 **Alerts + webhooks** (HMAC-signed when a subscription secret is set): price drop/raise, undercut, stock-out.
- 🤖 **AI layer**: forecasting, anomaly detection, GDPR-safe review sentiment (pluggable, toggleable).
- 💸 **Optional no-code repricer** (off by default, advisory-only).
- 🛡️ **Compliance**: robots.txt policy, gentleman rate-limiting, PII redaction, **EU AI Act** disclosure + bridge.
- 🏢 **Multi-tenant** (single-DB or database-per-tenant), Sanctum + API-key auth with scopes.

Web admin panel
---------------

[](#web-admin-panel)

A companion **web admin panel** ships separately at [`padosoft/laravel-ai-price-intelligence-admin`](https://github.com/padosoft/laravel-ai-price-intelligence-admin)(React 19 + Vite + TypeScript + Tailwind) — the control room Netrivals/Competitoor don't give you self-hosted: dashboards, the match-review queue, price-history charts, forecasts &amp; anomalies, the weekly AI narrative, assortment/content gaps, the repricer rule builder, alerts inbox, webhooks and an EU AI Act compliance view.

[![Web Admin Panel — Dashboard](resources/laravel-ai-price-intelligence-Web-Panel-Dashboard-dark.png)](resources/laravel-ai-price-intelligence-Web-Panel-Dashboard-dark.png)

Quick start
-----------

[](#quick-start)

```
composer require padosoft/laravel-ai-price-intelligence
php artisan vendor:publish --tag=price-intelligence-config   # optional
php artisan migrate
```

Issue an API key for machine-to-machine access:

```
use Padosoft\PriceIntelligence\Models\ApiKey;

[$key, $plaintext] = ApiKey::issue($tenantId, 'ecommerce-sync', ['*']);
// store $plaintext securely — it is shown only once
```

Integrating with your ecommerce
-------------------------------

[](#integrating-with-your-ecommerce)

```
// 1. Sync the catalog (bulk, idempotent on external_id)
Http::withHeaders(['X-Api-Key' => $plaintext])->post("$base/api/v1/catalog/products:bulk", [
    'products' => [[
        'external_id' => 'SKU-123', 'gtin' => '8001234567890',
        'brand' => 'Acme', 'model' => 'X1', 'name' => 'Acme X1 64GB',
        'categories' => ['Electronics', 'Phones'], 'our_price_cents' => 19900,
        'currency' => 'EUR', 'base_country' => 'IT',
    ]],
]);

// 2. Create a monitoring target (per product × country)
Http::withHeaders(['X-Api-Key' => $plaintext])->post("$base/api/v1/targets", [
    'product_external_id' => 'SKU-123', 'country' => 'IT', 'frequency' => 'daily',
    // 'given_urls' => ['https://www.amazon.it/dp/B0...'],  // skip AI discovery
]);

// 3. React to signals (signed webhook listener in your app)
use Padosoft\PriceIntelligence\Services\Webhooks\WebhookSigner;

Route::post('/webhooks/price-intel', function (Request $r) {
    abort_unless(WebhookSigner::verify(
        $r->getContent(), config('services.pi.secret'), $r->header(WebhookSigner::HEADER, '')
    ), 401);

    match ($r->input('event')) {
        'price.dropped', 'undercut.detected' => MarginOS::reevaluate($r->input('data')),
        default => null,
    };
});
```

See [`docs/INTEGRATION-GUIDE.md`](docs/INTEGRATION-GUIDE.md) for the full API and event reference.

Architecture
------------

[](#architecture)

Ecommerce → API (Sanctum/API-key) → discovery → matching → scheduled scraping (adapters) → price normalization → time-series storage → AI layer → alerts + signed webhooks → your ecommerce.

Everything is **pluggable via Interface + Driver**; optional dependencies are wired with the null-object pattern (no hard requirement). Full design in [`docs/PROJECT.md`](docs/PROJECT.md).

### Marketplace adapters

[](#marketplace-adapters)

Each marketplace resolves a `driver` from `config('price-intelligence.marketplaces.*')`. Amazon/eBay/ Google default to `auto`, but the **effective default behavior is scraping (JSON-LD/OpenGraph, no keys) until you configure API credentials** — then the real API path lights up. Any missing credential or API failure **falls back to scraping**, so it never breaks a run.

MarketplaceDriversAPI pathAmazon`auto` · `sp_api` · `keepa` · `scrape`SP-API Product Pricing (LWA token) / Keepa price+historyeBay`auto` · `api` · `scrape`Browse API (client-credentials OAuth)Google Shopping`auto` · `serp` · `scrape`SerpApi-compatible `google_product` lookupFarfetch`scrape` · `retailed` · `apify`retailed.io / Apify actor (luxury)Idealo, Trovaprezzi, generic`scrape`JSON-LD extractorSet e.g. `PI_AMAZON_DRIVER=keepa` + `PI_KEEPA_KEY=…`, or `PI_EBAY_CLIENT_ID/SECRET`, or `PI_SERPAPI_KEY`, or `PI_FARFETCH_DRIVER=retailed` + `PI_RETAILED_KEY`. No extra Composer packages are required — the adapters call each API directly over HTTP.

### Engineered for large catalogs (≈500k SKUs)

[](#engineered-for-large-catalogs-500k-skus)

Every list and analytics path is built to stay cheap as the catalog and time-series grow — and the [web admin panel](#web-admin-panel) consumes these primitives (cursor pagination, virtualization, facet chips, streamed export) end-to-end:

- **Cursor pagination** on the catalog / observation / competitor / decision-log lists (stable, OFFSET-free) — `?cursor=` / `next_cursor`. (Facet endpoints instead return one pre-aggregated row per host/brand/category, not the per-row dataset.)
- **Exact facets, never page-1**: `GET /facets/hosts` &amp; `GET /facets/brands` via SQL `COUNT(*) … GROUP BY`, and `GET /facets/categories` aggregated in one pass over a lazy DB cursor.
- **Streamed bulk export**: `GET /catalog/products:export` and `GET /observations/prices:export`stream CSV via a database cursor — OOM-safe for 100k+ rows. (Excel opt-in via `phpoffice/phpspreadsheet`.)
- **Daily aggregates + partition-ready time-series**: `piprice:aggregates:daily` materializes per-day min/max/avg into `pi_price_daily_aggregates` (nightly) so dashboards/charts query the small aggregate table instead of full raw history; composite indexes keep range queries on `(competitor_product_id, captured_at)` fast. The observations tables are partition-friendly (`captured_at` present, no cross-table FKs) so monthly partitioning can be enabled later (planned `PartitionManager`).
- **Chunked jobs + adaptive backoff** on dedicated, configurable queues (Horizon-friendly; any Laravel queue driver) so scraping 500k targets doesn't cause a thundering herd.

### Analytics, history &amp; decision log

[](#analytics-history--decision-log)

- **History**: `GET /observations/prices` (with a `?host=` filter), `GET /observations/stock`, `GET /observations/promos` — cursor-paginated time series.
- **AI decision log**: `GET /ai-decisions` (filter by feature/subject/date) backs the EU AI Act Compliance screen (Art. 12 record-keeping).
- **Anomaly review**: `POST /anomalies/{id}/ack` (idempotent, race-safe) and `POST /anomalies:ack`(bulk by ids) mark detections reviewed.
- **Tenant settings**: read in `GET /tenants/me` and writable via `PATCH /tenants/me/settings`.

AI features
-----------

[](#ai-features)

FeatureDefaultNotesPrice forecastingon`StatisticalForecaster` (OLS trend + confidence interval), pluggableAnomaly detectionondetrended-residual outliers + price-error (civetta) detectionReview sentiment**off**GDPR-safe: per-domain opt-in, mandatory PII redaction, anonymous aggregates onlyNarrative / content-gap / promo / visual-match / LLM match-judgeonReal LLM-backed via the official `laravel/ai` SDK; `fake` deterministic driver is the zero-config defaultEvery AI output is flagged `is_ai_generated` and logged in the decision-log table (default `pi_ai_decision_logs`, configurable).

### LLM provider

[](#llm-provider)

LLM features run through `LlmProviderInterface`. The default driver is **`fake`** — deterministic, offline, no API keys, so the package works out of the box and CI never makes a live call. To use a real model, install/configure the official [`laravel/ai`](https://github.com/laravel/ai) SDK and set:

```
PI_LLM_DRIVER=laravel-ai
PI_LLM_PROVIDER=openai        # any config/ai.php provider: openai|anthropic|gemini|regolo|...
PI_LLM_MODEL=gpt-4o-mini
PI_LLM_VISION_MODEL=gpt-4o-mini
```

For an EU/Italian-sovereign option, install [`padosoft/laravel-ai-regolo`](https://github.com/padosoft/laravel-ai-regolo)and set `PI_LLM_PROVIDER=regolo`. Embeddings have the same switch (`PI_EMBEDDINGS_DRIVER=laravel-ai`, `PI_EMBEDDINGS_PROVIDER`, `PI_EMBEDDINGS_MODEL`, `PI_EMBEDDINGS_DIMENSIONS`); the default is the deterministic `FakeEmbeddingProvider`.

Compliance: GDPR &amp; EU AI Act
--------------------------------

[](#compliance-gdpr--eu-ai-act)

- **robots.txt** respected per-domain (opt-out is explicit + audited); gentleman per-domain rate-limit.
- **PII redaction** on scraped content via [`padosoft/laravel-pii-redactor`](https://github.com/padosoft/laravel-pii-redactor) when installed.
- **EU AI Act**: native disclosure (`is_ai_generated`, decision log, human-in-the-loop matching) plus an optional bridge to [`padosoft/laravel-ai-act-compliance`](https://github.com/padosoft/laravel-ai-act-compliance).
- Audit fetch logs (default table `pi_fetch_logs`) with a retention prune command (`piprice:audit:prune`).

Configuration &amp; feature toggles
-----------------------------------

[](#configuration--feature-toggles)

Every feature and resilience mitigation has an explicit switch in `config/price-intelligence.php`(`ai.*.enabled`, `review_insight.enabled`, `repricer.enabled`, `discovery.*`, `scraping.*`, `marketplaces.*`, `matching.*`, `storage.*`, `compliance.*`, `ai_act.*`). Nothing runs that you didn't enable.

Competitive matrix
------------------

[](#competitive-matrix)

CapabilityNetrivalsCompetitoor**this package**Price/stock multi-country✅✅✅AI product matching✅⚠️✅ cascade + confidenceVisual matching (vision LLM)❌❌✅Marketplace adapters (Amazon buy-box)✅⚠️✅Repricing✅✅✅ (opt, advisory)Price forecasting❌❌✅Anomaly detection❌❌✅Review sentiment (GDPR-safe)❌❌✅**EU AI Act-ready by design**❌❌✅Open-source self-hostable❌❌✅ Apache-2.0See [`docs/COMPETITIVE-MATRIX.md`](docs/COMPETITIVE-MATRIX.md).

Extending
---------

[](#extending)

Bind your own driver for any interface (scraper, matcher, embedding, forecast, FX, anomaly, sentiment, repricer strategy). See [`docs/EXTENDING.md`](docs/EXTENDING.md).

Testing
-------

[](#testing)

```
composer install
vendor/bin/phpunit
```

The suite runs on SQLite in-memory with no external calls; an opt-in E2E suite uses real provider keys when present.

Documentation
-------------

[](#documentation)

- [`docs/PROJECT.md`](docs/PROJECT.md) — full architecture &amp; spec
- [`docs/INTEGRATION-GUIDE.md`](docs/INTEGRATION-GUIDE.md) — API + events for host apps
- [`docs/EXTENDING.md`](docs/EXTENDING.md) — custom drivers
- [`docs/COMPETITIVE-MATRIX.md`](docs/COMPETITIVE-MATRIX.md) — feature comparison

License
-------

[](#license)

Apache-2.0 © [Padosoft](https://github.com/padosoft)

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance97

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

9

Last Release

14d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10467699?v=4)[Lorenzo](/maintainers/lopadova)[@lopadova](https://github.com/lopadova)

---

Top Contributors

[![lopadova](https://avatars.githubusercontent.com/u/10467699?v=4)](https://github.com/lopadova "lopadova (24 commits)")

---

Tags

aie-commercelaravellaravel-packagemonitoring-toolprice-comparisonprice-monitoringlaravelamazonaiecommercescrapingmarketplaceprice-intelligencecompetitor-monitoringprice-monitoringdynamic-pricingrepricingproduct-matchingprice-comparison

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/padosoft-laravel-ai-price-intelligence/health.svg)

```
[![Health](https://phpackages.com/badges/padosoft-laravel-ai-price-intelligence/health.svg)](https://phpackages.com/packages/padosoft-laravel-ai-price-intelligence)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.4k](/packages/larastan-larastan)[api-platform/laravel

API Platform support for Laravel

59156.3k10](/packages/api-platform-laravel)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15104.9k4](/packages/calebdw-larastan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
