Review Janitor is a full-stack web application designed to help Amazon sellers identify and remove policy-violating reviews from their products. The system leverages Google's Gemini AI to analyze reviews against Amazon's Community Guidelines and generates professional removal requests.
- Backend: FastAPI-based REST API with async patterns
- Frontend: Next.js 16 application with React and TypeScript
- Database: MongoDB with Motor async driver
- AI Engine: Google Gemini 3 for review analysis
- Authentication: JWT-based with Google OAuth support
- Containerization: Docker and Docker Compose for deployment
- AI-powered review analysis against Amazon's Community Guidelines
- Automated generation of professional removal requests
- Case management system for tracking removal requests
- User authentication and authorization
- Real-time dashboard with analytics
- Support for bulk review analysis
- Python 3.11: Main programming language
- FastAPI: Modern, fast web framework with async support
- MongoDB: NoSQL database for storing reviews, users, and cases
- Motor: Async MongoDB driver for Python
- Pydantic: Data validation and settings management
- Google Generative AI: Gemini 3 for AI analysis
- JWT: Authentication tokens
- Passlib: Password hashing
- Next.js 16: React framework for production applications
- React 19: UI library
- TypeScript: Static type checking
- Tailwind CSS: Utility-first CSS framework
- Radix UI: Accessible UI components
- Lucide React: Icon library
- Zod: Schema validation
- React Hook Form: Form management
- Docker: Containerization platform
- Docker Compose: Multi-container orchestration
- Redis: Caching and rate limiting (optional)
- Docker and Docker Compose
- Node.js (for local development without containers)
- Python 3.11 (for local development without containers)
# Clone the repository
git clone <repository-url>
cd reviewjanitor
# Create environment file
cp .env.example .env
# Edit .env with your API keys and credentials
# Start the entire stack
docker-compose up --buildThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- MongoDB: localhost:27017
- Redis: localhost:6379
# Backend setup
cd backend
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload
# Frontend setup
cd frontend
npm install
npm run devThe application requires several environment variables:
MONGODB_URL: MongoDB connection stringJWT_SECRET_KEY: Secret key for JWT tokensGEMINI_API_KEY: Google Gemini API keyGOOGLE_CLIENT_ID: Google OAuth client IDGOOGLE_CLIENT_SECRET: Google OAuth client secret
NEXT_PUBLIC_API_URL: Backend API URLNEXT_PUBLIC_GOOGLE_CLIENT_ID: Google OAuth client ID
POST /register- User registrationPOST /login- User loginGET /me- Get current user infoPOST /google- Google OAuth login
GET /- Get all reviews with filtering optionsPOST /- Create a new reviewGET /{review_id}- Get a specific reviewDELETE /{review_id}- Delete a reviewPOST /{review_id}/analyze- Analyze a review for violationsPOST /bulk-analyze- Analyze multiple reviews
GET /- Get all casesPOST /- Create a new caseGET /{case_id}- Get a specific casePUT /{case_id}- Update a caseDELETE /{case_id}- Delete a case
POST /generate- Generate evidence package for removal request
GET /dashboard- Get dashboard statisticsGET /roi- Calculate ROI for review removal
- Follow FastAPI best practices for route definition and dependency injection
- Use Pydantic models for request/response validation
- Implement async patterns where possible for better performance
- Use MongoDB aggregation pipelines for complex queries
- Follow the repository pattern for database operations
- Use TypeScript for type safety
- Follow Next.js 16 file-based routing conventions
- Use Tailwind CSS for styling with consistent design tokens
- Implement form validation with Zod and React Hook Form
- Use Radix UI components for accessibility
- Write unit tests using pytest for backend
- Use async tests for database and API operations
- Implement integration tests for critical workflows
- Validate all inputs using Pydantic models
- Use JWT tokens with proper expiration times
- Hash passwords with bcrypt
- Implement proper CORS configuration
- Sanitize user-generated content before AI processing
reviewjanitor/
├── backend/ # FastAPI backend
│ ├── ai_engine.py # Gemini 3 AI integration
│ ├── auth.py # Authentication logic
│ ├── config.py # Application settings
│ ├── database.py # MongoDB connection and utilities
│ ├── main.py # Application entry point
│ ├── models.py # Pydantic data models
│ └── routers/ # API route definitions
│ ├── auth.py
│ ├── reviews.py
│ ├── cases.py
│ ├── evidence.py
│ └── analytics.py
├── frontend/ # Next.js frontend
│ ├── app/ # Next.js 16 file-based routes
│ ├── components/ # Reusable UI components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Shared utilities
│ ├── public/ # Static assets
│ └── styles/ # Global styles
├── scripts/ # Utility scripts
├── docker-compose.yml # Multi-container orchestration
└── QWEN.md # This file
The system uses Google's Gemini 3 model to analyze reviews against Amazon's Community Guidelines. It can detect:
- Shipping and fulfillment complaints
- Promotional content
- Personally identifiable information (PII)
- Competitor attacks
- Profanity and inappropriate content
- Unverified purchase reviews
- Irrelevant content
The AI provides confidence scores and detailed reasoning for each violation detection, along with specific citations from Amazon's guidelines.
The application is designed for containerized deployment using Docker. Production deployments should:
- Use environment variables for configuration
- Implement SSL/TLS termination
- Set up proper logging and monitoring
- Configure backup strategies for MongoDB
- Use production-grade reverse proxy (nginx, traefik)
