SmartCart_AI: The E-Commerce Stack That Recommends Products and Filters Out Fake Reviews

A Django and React marketplace with two AI jobs at once: personalized discovery and trust enforcement. The real story is the hybrid recommender and the BERT-based review classifier working together.

8 min read • View on GitHub • More from PriyankaBehura05

A split marketplace counter in black ink on white paper. On one side, a shopper receives a recommendation card assembled from product tiles and directional arrows. On the other, a magnifying lens inspects review slips, approving one and rejecting another. It explains that the project is built around both discovery and trust.
SmartCart_AI is unusual because it does two jobs at once: it tries to recommend what to buy next, and it tries to decide which reviews deserve to be believed.
Key Takeaways

Most recommendation demos stop at “show me more products.” SmartCart_AI goes further and asks a sharper question: which signals in a marketplace are trustworthy enough to shape what people see? That is why this repo stands out. It pairs personalization with review integrity, so the system is not only trying to boost conversion, it is also trying to keep the marketplace honest.

The marketplace problem SmartCart_AI actually solves

E-commerce AI usually chases one of two goals. It either ranks products better, or it polices reviews better. SmartCart_AI tries to do both in one stack, which makes it more ambitious than a typical student recommender and more interesting than a one-off fraud detector.

The repo is built around a simple but strong idea: recommendations are only as useful as the data beneath them. If the review layer is polluted, the product layer gets noisy too. SmartCart_AI treats trust as infrastructure.

A hedcut-style portrait of Priyanka Behura rendered in black ink on white background. It presents the likely creator as the person behind the project, grounding the repo in a real author rather than an anonymous demo.

One engine for discovery, one engine for trust

The repo’s defining move is its dual AI layer. One subsystem recommends products. The other classifies reviews as fake or genuine. Together, they turn SmartCart_AI from a shopping assistant into a trust-aware marketplace scaffold.

A close-up diagram-like illustration of two AI paths merging into one storefront output. On the left, behavior signals feed a collaborative filtering lattice and product text feeds a TF-IDF mesh. On the right, review text passes through a BERT sieve that stops suspicious reviews. It explains how the system splits discovery from trust.
The architecture is not one model doing everything. It is two model paths, each optimized for a different job, converging at the storefront.

This diagram shows the repo’s real architecture choice: discovery and trust are computed separately, then stitched back together at the product experience layer.

How the recommender blends two weak signals into one stronger answer

In ai_model/recommended.py, SmartCart_AI uses a hybrid recommender instead of betting on one method. That matters because collaborative filtering and content similarity each fail in predictable ways. Together, they cover each other’s blind spots.

class CollaborativeRecommender:
    # SVD on user-item interactions
    pass

class ContentBasedRecommender:
    # TF-IDF + cosine similarity on product text
    pass

def hybrid_recommend(user_id, product_id):
    cf_items = collaborative_recommender.recommend(user_id)
    cb_items = content_recommender.recommend(product_id)
    return merge_rankings(cf_items, cb_items)

The collaborative side learns from user-item patterns. The content side reads product descriptions. That combination helps with sparse data and cold start, because the system can still make a credible suggestion even when it does not know much about a user yet.

ApproachStrengthWeak spotWhy SmartCart_AI combines it
Collaborative filteringCaptures behavioral patterns across usersStruggles when interaction data is sparseUseful once the platform has enough history
Content-based TF-IDFUnderstands product similarity from textCan overfit to item metadata and ignore collective tasteActs as the cold-start fallback
Hybrid mergeBalances behavior and textNeeds a ranking strategyProduces a more resilient recommendation layer

Why fake-review detection changes the product story

The review model in ai_model/review.py shifts the project from personalization to governance. Instead of looking for keywords, it uses BERT to classify review text semantically. That is a much stronger choice because fake reviews rarely announce themselves with obvious words.

This is what makes the repository feel more serious than a typical ML demo. It is not just optimizing what to show. It is trying to decide what the marketplace should trust enough to show at all.

The Django and React layers keep the AI from becoming a science project

The stack is straightforward in the good sense. Django and Django REST Framework handle the backend. React 18, Axios, and React Router 6 handle the client. JWT auth via SimpleJWT keeps sessions stateless, and src/services/api.js centralizes API orchestration instead of scattering request logic across the UI.

import axios from 'axios';

const api = axios.create({ baseURL: '/api' });

api.interceptors.response.use(
  response => response,
  async error => {
    if (error.response?.status === 401) {
      // refresh token and retry
    }
    return Promise.reject(error);
  }
);

export default api;

That interceptor pattern matters. It is the kind of infrastructure detail that keeps a project usable once authentication and token refresh enter the picture. Without it, the ML layer would be the only thing worth talking about.

What this repo is closer to, and what it is not

SmartCart_AI is not trying to compete with proprietary retail giants on scale, sensors, or deployment maturity. It is much closer to an open blueprint for a trust-aware commerce system. That makes it valuable as a learning artifact and as a compact architecture pattern.

SystemRecommendationTrust / fraud detectionOpennessMaturity
SmartCart_AIHybrid SVD plus TF-IDFBERT fake-review classifierOpen sourceEarly-stage prototype
Simple recommender repoUsually one signal onlyNoneOpen sourceDemo-level
Amazon Just Walk OutProprietary retail intelligenceOperational trust systems at scaleClosedProduction
Standard AI / Grabango / CaperComputer vision driven checkoutOperational store trust and automationClosedProduction

The comparison is useful because it clarifies the goal. SmartCart_AI is not a retail operating system for a global chain. It is a compact, open-source proof that personalization and trust can live in the same product design.

Where this design could go next

The current shape points toward a few obvious upgrades. PostgreSQL would be a better fit than SQLite for serious multi-vendor data. A separate inference service would keep the Django web worker from doing too much. Better observability and robustness testing would make the trust layer more believable under load.

That said, the core idea already holds. The project’s strength is not that it is finished. It is that it frames commerce AI around a sharper question than usual: how do you recommend well when the inputs themselves may be unreliable?