Files
ggdeals/README.md
T
deepseek fff7a4b9b9 GG.deals clone: CodeIgniter 4 + MongoDB game price tracker
- Full gg.deals-style UI: deal feed with filters, game pages with price
  history charts, rankings, vouchers, news, prepaids, subscriptions,
  bundles, franchises, wishlist, API docs
- Real data crawlers:
  * gg:crawl (Steam Store API + GOG Catalog + Epic free games)
  * gg:catalog (252K game slugs from gg.deals sitemaps)
  * gg:ggdeals (per-game prices via FlareSolverr session, JSON-LD parsing)
  * gg:seed / gg:crawl-covers (demo seed + Steam CDN cover art)
- 24/7 self-updating scheduler (scripts/scheduler_loop.php, lockfile-protected)
- Tailwind v4 dark/light theme, Alpine.js, Chart.js
2026-08-23 07:06:02 +00:00

108 lines
5.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# GG.deals Clone
A demo clone of [gg.deals](https://gg.deals/) — PC game price comparison — built with:
- **CodeIgniter 4** (PHP 8.2) — MVC backend
- **MongoDB** — data store (`harness-mongo`, db: `ggdeals`)
- **Tailwind CSS v4** — styling (dark + light theme)
- **Alpine.js** — interactivity (tabs, filters, wishlist store, settings store, search dropdown)
- **Chart.js** — price history charts
The feature set was modeled after a **deep crawl of gg.deals itself**: the full sitemap tree (12 sitemap types, 5k+ URLs) plus Wayback Machine snapshots of every page type (homepage, deals, game, bundle, freebie, giveaway, franchise, game-points, API, rankings, vouchers, news).
## Features
### Homepage dashboard (gg.deals-style, 10 sections)
- Most Popular Games, New deals, Best deals, Historical lows, Ending Soon
- 🔥 Most Wanted, 🆕 New releases, 📅 Upcoming games
- 📰 News feed, 🎁 Prepaids
- Stats strip (games / deals / stores / all-time lows now)
### Deal feed & presets (`/deals/{preset}`)
- Preset tabs: Hot New Deals, New Deals, Historical Lows, Ending Soon, ≥75% off, ≥85% off
- Advanced filters: price tiers (Under $2$30), discount tiers (≥5090%), deal rating (🔥 Hot/Good/Fair), release year ranges, only all-time lows, only-from-wishlist, per-store checkboxes with real logos
- Sorts: Best deals, Deal rating, Biggest discount, Cheapest ever, New releases, Lowest price, Metascore, Title AZ, Oldest release, Ending soon
- Deal rows with 🔥 Hot / Good / Fair badges, ★ New HL flags, ⏳ ending-soon timers, wishlist hearts
### Game page (`/game/{slug}`)
- **Header price tabs**: Current Prices / Historical Low
- Price summary cards: Official Stores, Keyshops, Subscriptions, All-time low
- Deals tables (official stores & keyshops) with DRM, region locks, expiry, HL flags
- Chart.js price history (3M/6M/1Y/All) vs all-time low
- **Bundles with this game**, **Series & franchises**, **Similar games** sections
- About (dev/publisher/age rating), System Requirements, How Long to Beat
### Content & community pages
- **Bundle pages** (`/bundle/{slug}`) — games list, price, savings, store
- **News articles** (`/article|deal|freebie|giveaway/{slug}`) — categorized posts with claim/enter CTAs
- **Franchise pages** (`/franchise/{slug}`) — all games in a series
- **Rankings** — Most Wishlisted, Most Collected, Metacritic, Steam Reviews
- **Vouchers** — promo codes per store with copy-to-clipboard
- **Subscriptions** — Game Pass, PS Plus, EA Play, Ubisoft+ cards
- **Prepaids** — gift card groups with denominations
- **Games browser** (`/games/{genre}`) — same deal-feed layout (filter sidebar + row list + pagination) with genre chips on top, **Stores**, **Wishlist** (localStorage)
### Site features
- **Region & currency selector** (19 regions, 7 currencies, localStorage-persisted)
- **Keyshops toggle** (on/off)
- **Dark / Light theme toggle**
- **API page** + **Game Prices API** (`/api/prices?appid=`) with live demo tester
- **FAQ** (accordion) + **CD key activation tutorials** (Steam/GOG/Epic/Origin/Uplay/Keyshops)
- Live search suggestions
### Assets
- **Real cover art** — crawled from Steam CDN (`php spark gg:crawl-covers`)
- **Real store logos** — brand favicons in `public/img/stores/`
## Quick start
```bash
# 1. Configure .env (MONGO_URI / MONGO_DB)
cp env .env
# 2. Install PHP + frontend deps
composer install
npm install
# 3. Build CSS
npx @tailwindcss/cli -i assets/css/app.css -o public/css/app.css --minify
# 4. Seed the database (stores, 61 games, 549 deals, ~26k price points, vouchers, news, prepaids, subscriptions, bundles, franchises, covers)
php spark gg:seed
# 5. Crawl real cover art from Steam
php spark gg:crawl-covers
# 6. Serve
php spark serve --host 0.0.0.0 --port 8085
```
## Data model (MongoDB collections)
- `stores` — code, name, kind, colors, logo
- `games` — slug, title, base price, genres, platforms, scores, all-time low, best prices, developer/publisher, sys reqs, HLTB, age rating, description
- `deals` — per-store offers with cut %, HL flag, DRM, expiry
- `price_history` — 5-day cadence price points per store
- `vouchers` — promo codes per store
- `news` — categorized posts (deals/bundles/freebies/giveaways/subscriptions)
- `prepaids` — gift card groups
- `subscriptions` — game subscription services
- `bundles` — bundles with included game slugs
- `franchises` — franchise series
## Layout
```
app/
Commands/ SeedDatabase (gg:seed), CrawlCovers (gg:crawl-covers)
Controllers/ Home, Game, Games, Rankings, Vouchers, News, Prepaids,
Subscriptions, Bundle, Franchise, Wishlist, Stores, Pages, Api
Helpers/gg_helper.php money(), cut_class(), deal_rating(), qs_url(), time_ago()
Libraries/Mongo.php MongoDB client wrapper
Models/GameModel.php aggregation pipelines for feed/chart/dashboard/similar
Views/ layout, homepage, home, game, + 15 more page views, partials/
assets/css/app.css Tailwind v4 source (theme tokens + dark/light)
```
> Demo data only: prices are randomly generated, buy links point to search results.