Real-Time Product Recommendation Engine
I built this e-commerce storefront with Next.js and GraphQL, using MongoDB as the database. The homepage actually rearranges itself based on what each visitor looks at most - not just their last click, but what they keep coming back to. And the best part? I track returning visitors with just a simple cookie, no login required.
Video not loading? Open it in Google Drive ↗
System Architecture
Here's how it's structured: the frontend handles the store and admin panel, GraphQL manages all the data requests through one clean endpoint, and MongoDB keeps product data separate from interaction logs. That way, personalization doesn't mess with the actual product catalog.
Core Features
- Cookie-Based Recognition
- Frequency-Ranked Suggestions
- Admin Curated Defaults
- Cursor-Based Pagination
Data Flow
Personalization Engine
Recommendations are ranked by how often a visitor views a category and a specific product - not just their most recent click - so one stray click can't override a real, repeated pattern of interest. If a matched category comes up short, the row is padded with the admin's featured picks instead of showing empty cards.