Skip to content
All projects

2024

FraudBuster

Fraud detection for product reviews: a fine-tuned BERT classifier behind five gRPC microservices

Request success
99.2%
p95 latency
44 ms
Requests in load test
20,000+
  • Python
  • Flask
  • BERT
  • gRPC
  • MongoDB
  • Redis
  • Docker
  • Kubernetes
  • Protobuf

Summary

A cloud-distributed fraud detection system that analyzes Amazon product reviews to identify bot-generated and fraudulent content using pretrained BERT models. Built as 6 independent microservices communicating over gRPC, backed by Redis caching and MongoDB persistence — deployable via Docker Compose or Kubernetes.

Problem

Fake Amazon reviews undermine consumer trust and distort product rankings. Manual moderation doesn't scale to millions of daily reviews.

Approach

Designed a 6-service architecture: flask-app (API gateway), review-classifier (BERT ML), relevance-scorer, scraper, mongo-store, and a scheduler/orchestrator. Services communicate over gRPC with Protobuf, Redis handles caching, and MongoDB persists results. Fully containerized for Docker Compose or Kubernetes deployment.

UsersWeb browserK8s ingressNginx, SSL terminationflask-appAPI gateway, port 5000RedisCache-aside, 24 h TTLscrapergRPC 50053review-classifiergRPC 50051relevance-scorergRPC 50052mongo-storegRPC 50054ScraperAPIAmazon.sg over RESTBERT modelFine-tuned, original / fakeMiniLM-L6-v2Embeddings, cosine simMongoDB 7reviews_dbschedulerK8s CronJob: scrape, classify, score, save
  1. Requests enter through a Kubernetes ingress running Nginx.
  2. flask-app is the API gateway. Redis answers repeat lookups from cache.
  3. Four gRPC services do the work, each with one job.
  4. Each service owns its backend: a scraping API, a fine-tuned BERT model, MiniLM embeddings, MongoDB.
  5. A daily CronJob re-runs the whole chain and refreshes the cache.

Results

  • 99.2% request success rate and 44 ms p95 latency across more than 20,000 requests during load testing.
  • BERT classifier fine-tuned on 40,000 labelled Amazon reviews.
  • Kubernetes autoscaling from 2 to 8 pods.

Screens

Back to all projects