Laravel 12 package to scan GOG.com games using queues and a fully normalized DB schema.
artryazanov/laravel-gog-scanner is a Laravel package for laravel 12 package to scan gog.com games using queues and a fully normalized db schema..
It currently has 1 GitHub stars and 65 downloads on Packagist (latest version v0.1.0).
Install it with composer require artryazanov/laravel-gog-scanner.
Discover more Laravel packages by artryazanov
or browse all Laravel packages to compare alternatives.
Last updated
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.
composer require artryazanov/laravel-gog-scanner
php artisan vendor:publish --provider="Artryazanov\\GogScanner\\GogScannerServiceProvider" --tag=config
The package automatically loads its migrations. If you want to explicitly run them:
php artisan migrate
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',
],
];
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
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
GET {embed_base}/games/ajax/filtered
mediaType, page, search, category, system, limit, sort, ...GET {api_base}/products/{id}?expand=downloads,expanded_dlcs,description,screenshots,videos,related_products,changelogNo authentication is required for the endpoints above.
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:
gog_game_prices, gog_game_sales_visibilities, gog_game_images.gog_game_galleries, gog_game_dlcs, gog_game_artifacts (+ gog_game_artifact_files), gog_game_screenshots (+ gog_game_screenshot_images), gog_game_videos.gog_game_genres + gog_game_genre (genres) and gog_game_languages + gog_game_language (languages).gog_game_supported_systems + gog_game_supported_system (supported OS).gog_game_companies.gog_game_developers and gog_game_publishers (allow multiple companies per role).gog_game_categories with gog_games.category_id and gog_games.original_category_id referencing it.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.category and originalCategory map to gog_game_categories and are referenced by gog_games.category_id and gog_games.original_category_id.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 map to dictionary gog_game_languages and to gog_game_language pivot.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.
http_timeout and expand_fields.default_listing_params.queue.connection / queue.queue.This repository includes a Testbench-based test suite:
Http::fake(); queued work is asserted via Bus::fake().Run the tests:
composer install
composer test
Unlicense — see LICENSE for details.