Skip to content

sanuka27/TrustCart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

745 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ TrustCart

TrustCart Logo

AI-Powered Shopping Intelligence for Amazon & Daraz

TypeScript React Node.js MongoDB OpenAI

Features β€’ Tech Stack β€’ Screenshots β€’ Architecture β€’ Ethics


πŸ“– About

TrustCart helps online shoppers make confident, informed decisions by analyzing product trustworthiness, tracking prices, and detecting fake reviews using AI.

What TrustCart Does

  • πŸ€– Detects fake reviews using advanced AI pattern recognition
  • πŸ“Š Tracks price history and alerts you to the best deals
  • 🎯 Provides trust scores (0-100%) for products and sellers
  • πŸ’‘ Recommends actions: BUY, WAIT, or AVOID with clear reasoning
  • πŸ”” Sends smart alerts when tracked products hit target prices

✨ Features

πŸ” AI Trust Analysis

  • Fake review detection with confidence scores
  • Trust ratings based on review patterns, seller history, and data quality
  • Clear BUY/WAIT/AVOID recommendations with explanations
  • Decision breakdowns showing key signals and warnings

πŸ“ˆ Price Intelligence

  • Real-time price tracking across Amazon and Daraz
  • Historical price trends with visual charts
  • Smart price drop alerts
  • AI-powered "best time to buy" recommendations

πŸ‘€ Personalized Dashboard

  • Smart watchlist with priority organization
  • Personalized insights based on shopping behavior
  • Comparison history and saved analyses
  • First-time user onboarding tips (dismissible)

πŸ›‘οΈ Safety & Transparency

  • AI confidence levels disclosed for all recommendations
  • Minimum data requirements enforced (won't analyze <3 reviews)
  • Admin monitoring for AI quality and abuse detection
  • Input sanitization and rate limiting

πŸ› οΈ Tech Stack

Frontend

  • React 18 + TypeScript - Modern component architecture
  • Vite - Fast development and optimized builds
  • Tailwind CSS + shadcn/ui - Consistent, accessible design system
  • Zustand/Context - Lightweight state management
  • React Router v6 - Client-side routing
  • Axios - HTTP client with auth interceptors

Backend

  • Node.js + Express + TypeScript - Type-safe REST API
  • MongoDB + Mongoose - Document database with schema validation
  • OpenAI GPT-4 - AI analysis and recommendations
  • Firebase Admin SDK - Authentication verification
  • Node-Cron - Scheduled price tracking jobs
  • Winston - Structured logging with log levels

Infrastructure

  • Firebase Auth - Google OAuth + Email/Password
  • MongoDB Atlas - Cloud database
  • OpenAI API - AI model access
  • Rate Limiting - Per-route protection
  • Input Sanitization - Security middleware

Screenshots

🏠 Home Page

Home Page - Hero Section

Landing page with AI-powered shopping intelligence

Home Page - Features

Feature highlights and benefits

Home Page - Call to Action

Get started section

πŸ“Š User Dashboard

User Dashboard - Overview

Personalized dashboard with watchlist and insights

User Dashboard - Statistics

Price tracking statistics and alerts

User Dashboard - Shopping Insights

AI-powered shopping behavior insights

User Dashboard - Activity

Recent activity and price changes

πŸ›οΈ Product Pages

Product Detail - AI Analysis

Detailed product view with AI trust score and analysis

Product Detail - Price History

Price history chart and recommendations

βš™οΈ Settings & Preferences

User Preferences

Customize currency, store preferences, and AI settings

Email Notification Settings

Configure email alerts and notification preferences

πŸ”” Notifications

Notification Center

Price drop alerts and admin notifications

πŸ‘¨β€πŸ’Ό Admin Dashboard

Admin Dashboard - Overview

Admin control panel with system metrics

Admin Dashboard - User Management

User management and system health monitoring

Admin Dashboard - Maintenance

System maintenance and AI quality monitoring


πŸ—οΈ Architecture

Modular Design

backend/src/
β”œβ”€β”€ modules/          # Feature modules (auth, ai, products, etc.)
β”œβ”€β”€ models/           # MongoDB schemas
β”œβ”€β”€ services/         # Business logic
β”œβ”€β”€ controllers/      # HTTP handlers
β”œβ”€β”€ middleware/       # Auth, validation, rate limiting
β”œβ”€β”€ utils/            # Helpers (logger, sanitizer, etc.)
└── config/           # DB, OpenAI, Firebase setup

Key Design Principles

  • Separation of Concerns: Controllers β‰  Business Logic
  • Type Safety: Full TypeScript across frontend and backend
  • Error Boundaries: React error boundaries prevent white screens
  • Caching: In-memory caching for expensive AI/scraping calls (30min scrape, 24hr AI)
  • Rate Limiting: Per-route limits (e.g., 10 AI requests/hour)
  • Structured Logging: Winston with levels (info, warn, error)

πŸ€– AI Safety & Ethics

How AI Works

TrustCart uses OpenAI GPT-4 to:

  1. Analyze review text for patterns (fake vs. genuine)
  2. Calculate trust scores based on multiple signals
  3. Generate BUY/WAIT/AVOID recommendations
  4. Explain decisions with key signals and confidence levels

Safety Guardrails

  • Minimum Data Requirement: Refuses analysis with <3 reviews
  • No Medical/Financial Advice: System prompts prevent harmful claims
  • Confidence Disclosure: All AI responses include 0-100% confidence
  • Human Oversight: Admin panel monitors AI usage and quality
  • Bias Mitigation: Regular audits of AI outputs

Ethical Commitments

βœ… Transparent: Show confidence levels and data quality
βœ… Honest: Acknowledge limitations and uncertainty
βœ… User-Controlled: Users can dismiss tips, delete data
βœ… Privacy-First: Minimal data collection, no selling data
βœ… No Dark Patterns: No tricks or manipulative design


πŸ“Š Performance & Reliability

Optimizations Implemented

  • Caching Layer: 30min for scraping, 24hr for AI analysis
  • Optimistic UI: Watchlist updates feel instant
  • Error Recovery: Friendly fallback UI instead of crashes
  • Loading States: Skeleton screens and subtle indicators
  • Code Splitting: Lazy-loaded routes for faster initial load

Monitoring & Debugging

  • Structured logs with Winston (no console chaos)
  • Admin audit panel (AI usage, rate limits, errors)
  • Error boundaries with "Reload" and "Go Home" actions

πŸ” Security

Authentication

  • Firebase handles auth (Google OAuth, Email/Password)
  • JWT tokens verify all API requests
  • Role-based access (User, Admin)

Data Protection

  • Passwords never stored (Firebase manages)
  • HTTPS for data in transit
  • Input sanitization (prevents injection)
  • MongoDB IP whitelist
  • Environment variables for secrets

πŸ—ΊοΈ Roadmap

βœ… Completed

  • AI-powered fake review detection
  • Price tracking with alerts
  • User authentication and profiles
  • Admin dashboard
  • Onboarding system
  • Caching layer
  • Error boundaries

πŸ“… Planned

  • Browser extension

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.


πŸ’‘ Why TrustCart?

In an era of fake reviews, manipulative pricing, and information overload, TrustCart empowers shoppers with:

  1. AI-backed confidence - Don't guess, know the trust level
  2. Price intelligence - Buy at the right time
  3. Transparency - See how decisions are made
  4. Control - Your data, your rules

TrustCart isn't just a toolβ€”it's your ally in the modern e-commerce landscape.


Built with ❀️ for smart shoppers everywhere

About

πŸ›’ AI-powered e-commerce intelligence platform for detecting fake reviews, tracking prices, and generating trust scores with ethical AI transparency.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages