How kaithwasaditya/nextgen_assig_ecommerce works
This repository provides a recommendation function over normalized posts and user signals, plus a command-line MongoDB discovery utility to inspect database schemas and sample documents before mapping real fields. The recommendation flow filters ineligible posts, scores candidates using the documented interest, engagement, follow, popularity, and recency weights, then limits the feed and creator repetition. These responsibilities and the discovery steps are implemented in one source file; the graph separates them for clarity. Source evidence is limited to the README and the sampled src/index.ts.
Main entry points: index.ts Database Discovery
Components 9
Recommendation
- Recommend API
src/index.ts - Candidate Filtering
src/index.ts - Candidate Scoring
src/index.ts - Feed Selection
src/index.ts
Database Discovery
- Database Discovery
src/index.ts - Sample Redaction
src/index.ts
Other components
- Application Caller
- Database Operator
- MongoDB
Connections 8
- Application Caller → Recommend API: provides posts and signals
README.md - Recommend API → Candidate Filtering: filters candidates
src/index.ts - Candidate Filtering → Candidate Scoring: scores eligible posts
src/index.ts - Candidate Scoring → Feed Selection: ranks and limits
src/index.ts - Feed Selection → Application Caller: returns recommendations
src/index.ts - Database Operator → Database Discovery: runs discovery
README.md - Database Discovery → MongoDB: lists databases and samples
src/index.ts - Database Discovery → Sample Redaction: redacts sample documents
src/index.ts