PHPackages                             artryazanov/laravel-gog-scanner - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. artryazanov/laravel-gog-scanner

ActiveLibrary[Queues &amp; Workers](/categories/queues)

artryazanov/laravel-gog-scanner
===============================

Laravel 12 package to scan GOG.com games using queues and a fully normalized DB schema.

v0.1.0(10mo ago)265UnlicensePHPPHP ^8.1CI passing

Since Sep 2Pushed 9mo agoCompare

[ Source](https://github.com/artryazanov/laravel-gog-scanner)[ Packagist](https://packagist.org/packages/artryazanov/laravel-gog-scanner)[ RSS](/packages/artryazanov-laravel-gog-scanner/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

Laravel GOG Scanner
===================

[](#laravel-gog-scanner)

A Laravel 11/12 package that scans the GOG catalog using queues and stores a fully normalized product schema (games and related data) in your database. It ships with an Artisan command and queued jobs that paginate through the public listing API and then fetch detailed product information per game.

- Framework: Laravel 11/12
- PHP: 8.1+
- Transport: Laravel HTTP Client (no SDK or API key required)

Features
--------

[](#features)

- Queue-first design: paginated listing scan, then per-product detail scan.
- Fully normalized schema for prices, availability, sales visibility, OS support, genres, languages, companies, categories, gallery, screenshots, and artifacts.
- Sensible defaults with publishable config.
- Package migrations are auto-loaded by the service provider.

Installation
------------

[](#installation)

1. Require the package in your application

```
composer require artryazanov/laravel-gog-scanner

```

2. (Optional) Publish the configuration

```
php artisan vendor:publish --provider="Artryazanov\\GogScanner\\GogScannerServiceProvider" --tag=config

```

3. Run your migrations

The package automatically loads its migrations. If you want to explicitly run them:

```
php artisan migrate

```

Configuration
-------------

[](#configuration)

See `config/gogscanner.php` (publish to override):

- `api_base`: Base URL for Galaxy API (details), default `https://api.gog.com`.
- `embed_base`: Base URL for embed API (listing), default `https://embed.gog.com`.
- `list_endpoint`: Listing endpoint, default `/games/ajax/filtered`.
- `detail_endpoint`: Detail endpoint template, default `/products/{id}`.
- `expand_fields`: Comma-separated sections for details (downloads, description, screenshots, videos, etc.).
- `default_listing_params`: Default query params for listing (e.g., `mediaType => game`, `limit`, `search`, `sort`, etc.).
- `http_timeout`: HTTP timeout in seconds, default `30`.
- `queue.connection` / `queue.queue`: Optional queue connection and name for dispatching jobs.

Example override in `config/gogscanner.php` (after publishing):

```
return [
    'default_listing_params' => [
        'mediaType' => 'game',
        'limit' => 48,
        'sort'  => 'popularity',
    ],
    'queue' => [
        'connection' => 'redis',
        'queue' => 'gog-scanner',
    ],
];
```

Usage
-----

[](#usage)

Kick off a scan with the built-in Artisan command to enqueue the first page of the listing scan:

```
php artisan gog:scan           # starts from page 1
php artisan gog:scan 5         # starts from page 5

```

- The command dispatches `ScanPageJob` for the requested page.
- `ScanPageJob` fetches the listing page, upserts games and listing data, enqueues a `ScanGameDetailJob` per product, and (if more pages are available) enqueues the next page.
- `ScanGameDetailJob` fetches the product detail JSON and writes 1:1 and 1:N relations (compatibility, links, languages, images, descriptions, downloads/artifacts, screenshots, etc.).

Make sure your queue worker is running:

```
php artisan queue:work

```

HTTP Endpoints used
-------------------

[](#http-endpoints-used)

- Listing (embed API): `GET {embed_base}/games/ajax/filtered`
    - Common params: `mediaType, page, search, category, system, limit, sort, ...`
- Details (Galaxy API): `GET {api_base}/products/{id}?expand=downloads,expanded_dlcs,description,screenshots,videos,related_products,changelog`

No authentication is required for the endpoints above.

Database Schema
---------------

[](#database-schema)

The package includes migrations for a normalized schema starting with `gog_games` (non-auto-incrementing primary key equals GOG product id). Most 1:1 fields are stored directly on `gog_games` (availability, works-on flags, content compatibility, links, description, in-development flags). Related tables include:

- 1:1: `gog_game_prices`, `gog_game_sales_visibilities`, `gog_game_images`.
- 1:N: `gog_game_galleries`, `gog_game_dlcs`, `gog_game_artifacts` (+ `gog_game_artifact_files`), `gog_game_screenshots` (+ `gog_game_screenshot_images`), `gog_game_videos`.
- Dictionary + pivot: `gog_game_genres` + `gog_game_genre` (genres) and `gog_game_languages` + `gog_game_language` (languages).
- Dictionary + pivot: `gog_game_supported_systems` + `gog_game_supported_system` (supported OS).
- Dictionary: `gog_game_companies`.
- Pivots: `gog_game_developers` and `gog_game_publishers` (allow multiple companies per role).
- Dictionary: `gog_game_categories` with `gog_games.category_id` and `gog_games.original_category_id` referencing it.

Data Mapping
------------

[](#data-mapping)

- Developers/Publishers: listing fields `developer` and `publisher` may contain multiple companies separated by commas. They are split, normalized to `gog_game_companies`, and linked via `gog_game_developers` and `gog_game_publishers`.
- Categories: listing `category` and `originalCategory` map to `gog_game_categories` and are referenced by `gog_games.category_id` and `gog_games.original_category_id`.
- OS support: listing `worksOn` booleans are kept on `gog_games` (`works_on_windows/mac/linux`). The array `supportedOperatingSystems` is normalized to dictionary `gog_game_supported_systems` and linked via pivot.
- Languages: detail `languages` map to dictionary `gog_game_languages` and to `gog_game_language` pivot.
- Genres: listing `genres` map to dictionary `gog_game_genres` and to `gog_game_genre` pivot.

See `database/migrations/*create_gog_schema.php` for exact columns and constraints.

Extending &amp; Customizing
---------------------------

[](#extending--customizing)

- Tweak HTTP behavior via `http_timeout` and `expand_fields`.
- Adjust default listing filters with `default_listing_params`.
- Route jobs to a dedicated connection/queue using `queue.connection` / `queue.queue`.
- Wrap calls with your own rate limiting or retries by extending the jobs.

Testing
-------

[](#testing)

This repository includes a Testbench-based test suite:

- Unit/feature tests for service provider, console command, and jobs.
- HTTP calls are stubbed with `Http::fake()`; queued work is asserted via `Bus::fake()`.

Run the tests:

```
composer install
composer test

```

Production Tips
---------------

[](#production-tips)

- Run queue workers with sufficient concurrency to process listing and detail jobs efficiently.
- Consider rate-limiting (e.g., Laravel middleware or external proxies) if you scan large portions of the catalog.
- Use a persistent queue (e.g., Redis) for resilience.

License
-------

[](#license)

Unlicense — see `LICENSE` for details.

Credits
-------

[](#credits)

- Author: Artem Ryazanov

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance56

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

306d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4519328?v=4)[Artem Ryazanov](/maintainers/artryazanov)[@artryazanov](https://github.com/artryazanov)

---

Top Contributors

[![artryazanov](https://avatars.githubusercontent.com/u/4519328?v=4)](https://github.com/artryazanov "artryazanov (14 commits)")

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/artryazanov-laravel-gog-scanner/health.svg)

```
[![Health](https://phpackages.com/badges/artryazanov-laravel-gog-scanner/health.svg)](https://phpackages.com/packages/artryazanov-laravel-gog-scanner)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M619](/packages/laravel-scout)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)

PHPackages © 2026

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