Pixel Reviews
Overview
An open-source social discovery, community review, and cataloging platform for video games. Re-engineered from the ground up in v2 with Next.js 16 (App Router) and an asynchronous FastAPI, PostgreSQL 17, and Redis 7 architecture integrated with IGDB v4.
Pixel Reviews (v2) is a full-stack, open-source social platform built for players who want an unfiltered space to discover video games, publish honest reviews, curate wishlists, and debate titles with the community. Originally conceived as a monolithic prototype (v1 — Deprecated), the entire platform was re-architected from the ground up into two production-grade repositories: a feature-sliced Next.js 16 Frontend and a domain-driven, fully asynchronous FastAPI Backend Service.
THE PROBLEM
Video game enthusiasts lacked a focused, design-forward community platform—comparable to Letterboxd for cinema—dedicated strictly to player verdicts and game cataloging. Existing ecosystems suffer from critical product and engineering limitations:
- Ad-Heavy Portals & Noisy Storefronts: Mainstream gaming outlets bury player voices beneath sponsored coverage, while digital storefronts (such as Steam) mix genuine critical analysis with one-line memes and hardware troubleshooting complaints.
- Flat, Uninformative Averages: Reducing a game’s reception to a single average number hides whether a title is universally loved or deeply polarizing across the player base.
- Architectural Bottlenecks in v1: The first iteration of Pixel Reviews coupled a synchronous Flask backend with tightly bound client state. Scaling on-demand metadata hydration from third-party game databases, managing OAuth token lifecycles, and supporting high-concurrency social feeds demanded an entirely new asynchronous architecture, strict domain separation, and resilient caching.
THE SOLUTION
I re-engineered Pixel Reviews v2 as a decoupled, high-performance web platform combining an editorial dark-mode interface with a resilient asynchronous backend:
- On-Demand IGDB v4 Hydration & Rich Game Pages: Real-time catalog discovery powered by the Twitch/Amazon IGDB v4 API, hydrating high-resolution box art, 1080p screenshot carousels, storylines, official YouTube trailers, aggregated critic consensus scores, developer/publisher credits, and direct store links (Steam, PlayStation, Xbox, Nintendo).
- Transparent Rating Spreads & Community Feeds: Players rate titles from 1 to 5 stars alongside detailed written reviews. Every game page computes a full 5-to-1 star distribution histogram alongside community averages, accompanied by an interactive feed with likes and threaded replies.
- Feature-Sliced Next.js 16 Architecture: Organized by domain under
features/(games,reviews,comments,likes,wishlists,users,settings,genres,platforms), combining Server Components for SEO-indexed game and profile routes with Server Actions and@tanstack/react-queryinfinite queries for instant client mutations. - Domain-Driven FastAPI Backend: Structured across 12 independent domain modules enforcing a strict
Router -> Service -> Repositorypattern via FastAPI dependency injection, backed bySQLModel,SQLAlchemy 2.0(asyncpg), andAlembicmigrations on PostgreSQL 17. - Public Player Profiles & Curated Wishlists: Customizable profiles featuring immutable avatar storage on Cloudflare R2, lifetime review statistics, and personal game wishlists.
TECHNICAL CHALLENGES
Rebuilding Pixel Reviews as a flagship production system involved solving several deep full-stack engineering challenges:
- Resilient Cache-Aside & Fail-Open Strategy (Redis 7 + IGDB v4): Consuming IGDB v4 at scale requires managing Twitch OAuth2 client-credentials tokens and avoiding upstream rate limits. I engineered
IgdbServicewith a Cache-Aside layer usingredis.asyncioto cache both active OAuth tokens and serialized search/game payloads. Crucially, the cache client is designed with Fail-Open degradation—if Redis experiences an outage or latency spike, requests transparently fall back to upstream resolution without dropping user traffic. - Stateless Dual Authentication & Automatic Token Rotation: Implemented end-to-end authentication bridging Auth.js v5 (NextAuth) on the Next.js edge with stateless
PyJWT(access+refreshtokens) on FastAPI. Supports bothbcryptcredentials and Google OAuth 2.0 ID token verification, automatically rotating expiring access tokens in the background and enforcing SHA-256 hashed single-use password recovery flows dispatched asynchronously via Resend. - Distributed Rate Limiting & Lifecycle Pooling: Protected sensitive authentication and password-reset endpoints against brute-force abuse using
SlowAPIbacked by Redis for distributed IP and account-level rate limiting. Managed persistent outboundhttpx.AsyncClientconnection pools, Redis pools, and SQLAlchemy async engine disposal cleanly through FastAPI’slifespancontext manager. - Cloudflare R2 Media Pipeline & Orphan Cleanup: Built an S3-compatible
StorageService(boto3) targeting Cloudflare R2 for profile avatars, generating immutable object keys for CDN caching while automatically purging orphaned avatar blobs whenever a user updates their photo. - Automated CI/CD & Isolated Integration Testing: Configured GitHub Actions pipelines for both repositories. The backend test suite (
pytest+pytest-asyncio) provisions an isolatedpixel_reviews_testPostgreSQL database automatically and overrides external infrastructure (MailerService,StorageService,IgdbService) via FastAPIdependency_overrides, while the frontend pipeline enforces stricttsctypechecking,ESLint,Vitestunit suites, and production Next.js builds.