Prompt
I'm building personalized homepage recommendations, what stack should I use?
Latest observation
A good stack depends on your scale, latency needs, and how “personalized” you want the homepage to be. For most teams, I’d recommend a hybrid stack that separates event collection, feature storage, model serving, and experimentation.
A solid practical stack
1) Frontend / homepage delivery
- Next.js or React for the homepage
- Server-side rendering or edge rendering if you need fast personalized page loads
- CDN: Cloudflare, Fastly, or Vercel Edge
2) Event tracking
You need user behavior signals like:
- page views
- clicks
- dwell time
- searches
- purchases / conversions
Use:
- Segment, RudderStack, or a custom event pipeline
- Send events into a streaming system like Kafka, Kinesis, or Pub/Sub
3) Data storage
Use two layers:
- Warehouse for analytics/training: BigQuery, Snowflake, or Redshift
- Operational store for low-latency user features: Redis, DynamoDB, or Postgres depending on scale
4) Feature store
If you’ll do ML-based personalization:
- Feast is a strong open-source choice
- Or managed options if you want less ops overhead
Store:
- user embedding
- recent clicks
- session recency
- category affinities
- content popularity trends
5) Recommendation engine
Pick based on maturity:
If you want fast startup and strong baseline:
- Content-based recommendations
- Popularity + recency + personalization rules
- Good for MVPs and cold start
If you want ML recommendations:
- Python stack with PyTorch or TensorFlow
- Models:
- collaborative filtering
- learning-to-rank
- two-tower retrieval
- gradient-boosted ranking with XGBoost/LightGBM
A common architecture:
- Candidate generation: retrieve ~100–1000 items
- Ranking model: score and order the final homepage items
6) Model serving
- FastAPI or gRPC service for real-time inference
- TorchServe, BentoML, KServe, or custom serving
- Cache top results in Redis for speed
7) Experimentation / A-B testing
Essential for recommendations:
- GrowthBook, Statsig, Optimizely, or in-house
- Track CTR, conversion, retention, dwell time, revenue
8) Monitoring
- Prometheus + Grafana for infra
- Evidently AI or custom dashboards for drift / model quality
- Monitor latency, error rates, CTR, and business metrics
Recommended stack by company stage
MVP / small team
Use:
- Next.js
- Postgres
- Redis
- BigQuery or Postgres analytics
- Python + LightGBM
- FastAPI
- GrowthBook
This is simple, cheap, and works well for rule-based + lightweight ML recommendations.
Growth stage
Use:
- Next.js
- Kafka + warehouse
- Feast
- PyTorch/LightGBM
- FastAPI/KServe
- Redis cache
- Statsig/GrowthBook
Better for scale, freshness, and experimentation.
Large scale / high personalization
Use:
- Event streaming: Kafka/Kinesis
- Feature store: Feast + online store
- Retrieval model: two-tower embeddings
- Ranking model: LTR / deep model
- Search/vector DB: Milvus, Pinecone, Weaviate, or pgvector
- Real-time inference with caching and fallbacks
If you want my opinionated default
If you’re starting now and want a good balance of simplicity and power:
- Frontend: Next.js
- Backend API: FastAPI
- DB: Postgres
- Cache: Redis
- Analytics warehouse: BigQuery
- ML: Python + LightGBM to start, PyTorch later
- Experimentation: GrowthBook
- Infra: Docker + Kubernetes only if needed
- Tracking: Segment or RudderStack
This stack is practical, avoids overengineering, and can grow with you.
If you tell me:
- your team size,
- expected traffic,
- whether this is content, ecommerce, or social,
- and whether you need real-time personalization,
I can recommend a much more specific stack and architecture.