Commit Graph
163 Commits
Author SHA1 Message Date
adrianbonpin 7094e05227 feat: v2026.0.98 changelog, version bump, regenerated sitemap 2026-05-09 13:33:47 +08:00
adrianbonpin 03428bdd0b feat: add admin sitemap regeneration endpoint and cron task 2026-05-09 13:30:38 +08:00
adrianbonpin c6a9b448d3 feat: add advanced filters and saved filter presets to search page 2026-05-09 13:27:59 +08:00
adrianbonpin 2f4f0250df feat: add public dashboard API routes for trending, best new, most tested, most reported 2026-05-09 13:07:52 +08:00
adrianbonpin 5bc85aa850 feat: add static sitemap generation script, replace dynamic sitemap with static files 2026-05-09 13:04:33 +08:00
adrianbonpin 20f1d33751 feat: add profile photo upload/delete API routes with R2 storage 2026-05-09 12:54:12 +08:00
adrianbonpin 6009366fb4 feat: add modular daily cron system with storage cleanup and orphan detection 2026-05-09 12:50:16 +08:00
adrianbonpin 393bc9a9c6 feat: add R2 storage client module with upload, delete, list, metadata 2026-05-09 12:46:47 +08:00
adrianbonpin f59ef61634 feat: add storage_objects schema for R2 tracking 2026-05-09 12:44:49 +08:00
adrianbonpin dcf6066b2b feat: sitemap remediation, PWA activation, search refinements, Steam Deck UX
Sitemap:
- Switch from ISR (revalidate=3600) to force-dynamic for per-request generation
- Flatten into single app/sitemap.ts with inlined static entries and DB queries
- NULL-safe syncStatus filter: ne(games.syncStatus, 'failed') OR isNull(games.syncStatus)
- Structured JSON logging for generated URLs and DB errors
- Delete lib/sitemap/* helpers and app/api/revalidate-sitemap route
- Add basic vitest coverage for sitemap exports

PWA & Offline:
- Add @serwist/next service worker (webpack build) with runtime caching
- Cache strategies: stale-while-revalidate for game pages, network-first for listings/API,
  cache-first for Steam CDN images
- Offline fallback page (public/offline.html)
- Manifest icons: 192px maskable + 512px any
- Viewport meta with viewport-fit=cover, user-scalable=no
- Apple mobile web app meta tags

Search / Filter Refinements:
- Multi-genre OR support in listing API (comma-separated genres)
- Device-scoped FPS filter (min/max FPS constrained to selected device)
- Client-side URL state sync via router.replace for shareable filtered views
- Initialize filter state from URL params on mount
- Auto-collapse filter panel on saved-filter load
- Fix multi-genre saved filter parsing (comma-separated)

Steam Deck / Touch / Gamepad UX:
- WCAG 2.1 AA touch targets (44x44px) on all filter controls
- .gamepad-focus CSS focus ring for controller navigation
- useGamepadNavigation hook: D-pad/left-stick roving tabindex, A/B/X/Y actions
- Integrate gamepad hook into games page (X=search, Y=toggle filters)

Chore:
- Bump version to 2026.0.97
2026-05-05 16:20:28 +08:00
adrianbonpin 9be64359be fix: remove Updates from navigation routes 2026-05-05 02:12:16 +08:00
adrianbonpin b627a15a21 refactor: game-stub route now uses ensureSteamGame pipeline 2026-05-05 02:05:36 +08:00
adrianbonpin 47ac4c218b test: add unit tests for ensureSteamGame stub-then-sync 2026-05-05 02:01:41 +08:00
adrianbonpin 50353952db feat: add ensureSteamGame — unified stub-then-sync entry point 2026-05-05 01:29:01 +08:00
adrianbonpin 863358a8fd fix: resolve Next.js 16 build errors
- Extract Elysia app from route.ts into lib/api/app.ts to avoid
  Next.js 16 invalid export validation ('app' is not a valid route
  export field)
- Remove runtime='nodejs' from opengraph-image.tsx (invalid segment
  config in Next.js 16)
- Replace computed revalidate expression in sitemap.ts with literal
  (Next.js cannot statically evaluate BinaryExpression for segment
  configs)
- Update eden.ts imports to match new app.ts location
2026-05-05 00:36:17 +08:00
adrianbonpin 633117f452 chore: final verification fixes for sitemap reliability
- Replace invalid revalidate export with unstable_cache in sitemap.ts
- Add revalidateTag('sitemap', 'default') to on-demand revalidation endpoint
- Fix test assertions to match /game/ URL path
2026-05-04 13:16:47 +08:00
adrianbonpin 16e5cf586d feat: rewrite sitemap with ISR caching, validation, and filtered allowlist 2026-05-04 13:10:56 +08:00
adrianbonpin 26e0b510da feat: add sitemap dynamic entries fetcher with LIMIT, validation, and error recovery 2026-05-04 13:09:02 +08:00
adrianbonpin 4fbaea9d9d feat: add static sitemap entry allowlist (no auth pages) 2026-05-04 13:05:28 +08:00
adrianbonpin e0df92e05e feat: add sitemap image URL validation gate 2026-05-04 13:04:00 +08:00
adrianbonpin ca08024cb5 feat: updates page and lint fixes 2026-05-01 10:15:13 +08:00
adrianbonpin 7749162414 fix: switch markdown pipeline to remark-rehype for proper HTML rendering 2026-05-01 09:44:47 +08:00
adrianbonpin 695c3fbedf feat: add updates route and sitemap entry 2026-05-01 09:36:44 +08:00
adrianbonpin 19c2515437 feat: add content loading utilities for updates 2026-05-01 09:31:04 +08:00
adrianbonpin 824fbbd13f feat: rearrange game benchmark wizard and improve overall 2026-05-01 01:18:13 +08:00
adrianbonpin 293aadbff0 fix: sequential sync with 1.5s delay to avoid Steam rate limiting 2026-04-30 23:13:28 +08:00
adrianbonpin 583486de1a feat: streaming progress for bulk sync - real-time updates 2026-04-30 23:09:35 +08:00
adrianbonpin e38a2fabe7 fix: better error handling for bulk sync, fix NaN% progress display 2026-04-30 23:04:51 +08:00
adrianbonpin 5f037481ec perf: parallel bulk sync with 5 concurrent requests, remove 100-game limit 2026-04-30 22:59:28 +08:00
adrianbonpin ea01438935 Fix Steam sync logic: extract retry helper, add 429/rate-limit handling, game type validation, set syncStatus on errors
- Extract recordSyncFailure() helper to deduplicate 3 identical retry/backoff blocks
- Set syncStatus: 'error' on all failure paths (was missing before)
- Handle HTTP 429 (rate limiting) with Retry-After header support
- Reject non-game Steam app types (DLC, soundtrack, demo) during sync
- Add type field to SteamAppDetails interface
2026-04-30 22:23:04 +08:00
adrianbonpin 2620023a96 fix: steam reviews pagination - fetch more and slice instead of broken cursor 2026-04-30 22:05:42 +08:00
adrianbonpin fccef57d43 fix: auto-recalculate playability on benchmark submit and sync, fix anti-cheat logic for games without anti-cheat 2026-04-30 21:35:38 +08:00
adrianbonpin a9f78ef74c fix: remove duplicate /api prefix from new routes 2026-04-30 21:27:07 +08:00
adrianbonpin 244a29bd1b feat: create dashboard overview API endpoint
Add /api/dashboard/stats route that provides admin dashboard statistics:
- Total counts (games, benchmarks, users)
- Pending moderation items (reports, suggestions)
- 30-day activity metrics (recent benchmarks, recent games)
- Top 10 contributors by entry count
- Sync health breakdown by status
- Games by source distribution
- Playability distribution

Auth: requireContributorOrAdmin guard
Route registered in lib/api/index.ts
2026-04-30 20:44:27 +08:00
adrianbonpin 5f4d618d85 Task 18: Add playability, anti-cheat, and steam review badges to search results 2026-04-30 20:32:04 +08:00
adrianbonpin 32d52cf3ba Task 17: Revamp Games List with New Filters & Badges
- Add new filter state variables (min/max FPS, FSR, Proton/Native, anti-cheat,
  playability, Steam review score, free-to-play, multiplayer)
- Expand sort options to include performance, popularity, release_date, steam_reviews
- Add Performance, Compatibility, and Other filter UI sections with inputs
- Integrate SavedFilters component for saving/loading filter presets
- Add PlayabilityBadge and AntiCheatBadge to game cards
- Update API listing to return antiCheatRelevant/antiCheatStatus per game
- Update server-side games page to include new fields in initialGames
- Update clear-filters logic across filter panel and empty state
2026-04-30 20:25:57 +08:00
adrianbonpin ec47be0c2b fix: add cn utility and fix import path in AntiCheatBadge 2026-04-30 19:53:58 +08:00
adrianbonpin 32d197113e feat: extend games listing API with new filters and sort options
Add 8 new filter parameters to GET /api/games/listing:
- minFps/maxFps: filter games with benchmarks in FPS range
- fsrSupport: filter games that have FSR entries
- protonNative: filter by proton status (proton/native/both)
- antiCheatStatus: filter by anti-cheat support status
- playabilityStatus: filter by playability (great/playable/needs_tweaks/unplayable)
- steamReviewScore: minimum Steam review score threshold
- isFree: filter free-to-play games
- hasMultiplayer: filter games with multiplayer support

Add 4 new sort options:
- performance: sort by average FPS (subquery)
- popularity: sort by recommendationsTotal
- release_date: sort by releaseDate
- steam_reviews: sort by steamReviewScore

Also returns additional fields in response: isFree, releaseDate,
steamReviewScore, recommendationsTotal, playabilityStatus,
onlineMultiplayerStatus.
2026-04-30 19:50:38 +08:00
adrianbonpin e7cc4d6a2e feat: add Saved Filters CRUD API
- Create lib/api/saved-filters.ts with GET, POST, PATCH, DELETE endpoints
- All endpoints require authentication via requireAuth guard
- Users can only access their own saved filters
- Register savedFilterRoutes in lib/api/index.ts
2026-04-30 19:42:55 +08:00
adrianbonpin 09fde413b9 feat: add community suggestions API with CRUD, moderation, and Discord webhook notifications
- POST /api/community-suggestions - submit suggestion (auth required)
- GET /api/community-suggestions/game/:gameId - list suggestions for a game
- GET /api/community-suggestions/pending - moderation view (contributor/admin)
- PATCH /api/community-suggestions/:suggestionId/review - approve/reject
- Discord webhook notification on new suggestions
- Route registered in API index and app router
2026-04-30 19:38:44 +08:00
adrianbonpin f9617bf586 feat: add Steam Reviews display API with caching
- Create lib/api/steam-reviews.ts with in-memory cache (1hr TTL)
- Proxy endpoint for fetching Steam reviews by game ID
- Supports offset/limit/language query params
- Registers route in API index and app router
2026-04-30 19:32:35 +08:00
adrianbonpin 6853c8247b feat: add Steam review fetching to game sync 2026-04-30 19:27:43 +08:00
adrianbonpin 051c5c22df feat: add playability calculation API
- Auto-calculate playability from benchmark data (FPS, anti-cheat, upscaler dependency)
- Manual override by admins/contributors
- Clear override to revert to auto-calculated
- Three endpoints: /calculate/:gameId, /override/:gameId, /clear-override/:gameId
- Calculation logic: great (≥55 FPS, no upscaler), playable (≥30 FPS), needs_tweaks (≥20 FPS), unplayable (<20 FPS or anti-cheat unsupported)
2026-04-30 19:22:27 +08:00
adrianbonpin 4cfd046953 feat: create saved filters table 2026-04-30 19:16:45 +08:00
adrianbonpin 4c0284ef9e fix: add onDelete set null to reviewedBy FK 2026-04-30 19:14:45 +08:00
adrianbonpin 4e324fa6e0 feat: create community suggestions table 2026-04-30 19:07:54 +08:00
adrianbonpin 33b0198506 fix: add notNull constraints to playability fields 2026-04-30 19:04:02 +08:00
adrianbonpin d21e83897f feat: add playability fields to games and platform support schemas 2026-04-30 18:59:38 +08:00
adrianbonpin 09bf8f64d6 fix: use pgEnum for steamReviewSentiment 2026-04-30 18:50:48 +08:00
adrianbonpin 5dfd8db578 feat: add steam review fields to games schema 2026-04-30 18:46:18 +08:00