Advanced Reddit User Analysis Platform
A sophisticated web application that analyzes Reddit user comment histories to detect contradictions, inconsistencies, and behavioral patterns using AI-powered analysis pipelines.
Thought Police is a gamified platform where users become "digital detectives" analyzing Reddit accounts for contradictions in their posting history. The application combines real-time Reddit API integration with advanced AI analysis to provide comprehensive reports on user behavior patterns.
- Live integration with Reddit API
- Analyzes up to 5,000 comments and posts per user
- Comprehensive data fetching with intelligent caching
- Support for users across all subreddits
- Multi-model analysis pipeline using Google Gemini AI
- Advanced contradiction detection algorithms
- Context-aware analysis with confidence scoring
- Token budget management for cost optimization
- Detailed contradiction reports with evidence
- Timeline visualization of user behavior
- Statistical analysis and sentiment trends
- Categorized contradictions (political, personal, factual, etc.)
- Rank progression system (Rookie Cop β Chief Inspector)
- Achievement badges and leaderboards
- Point-based scoring system
- User profiles with police-themed cards
- Responsive design with Tailwind CSS
- Smooth animations with Framer Motion
- Interactive data visualizations with Recharts
- Dark/light theme support
- React 18 - Modern React with hooks and functional components
- TypeScript - Type-safe development
- Vite - Fast build tool and development server
- React Router - Client-side routing
- Tailwind CSS - Utility-first styling
- Framer Motion - Animation library
- Recharts - Data visualization
- Lucide React - Icon library
- Reddit API - Real-time data fetching
- Google Gemini AI - LLM analysis pipeline
- Axios - HTTP client with retry logic
- Local Storage - Client-side caching
- ESLint - Code linting
- TypeScript ESLint - TypeScript-specific linting
- PostCSS - CSS processing
- Autoprefixer - CSS vendor prefixes
- Node.js 18+
- npm or yarn package manager
- Google AI API key (for Gemini integration)
-
Clone the repository
git clone https://github.com/your-username/thought-police.git cd thought-police -
Install dependencies
npm install
-
Environment Setup Create a
.envfile in the root directory:VITE_GOOGLE_AI_API_KEY=your_gemini_api_key_here VITE_REDDIT_CLIENT_ID=your_reddit_client_id (optional) VITE_REDDIT_CLIENT_SECRET=your_reddit_client_secret (optional)
-
Start development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
npm run build
npm run preview- Enter a Reddit username (with or without u/ prefix)
- Click "Analyze User" to start the investigation
- Wait for the AI analysis to complete
- Review the detailed contradiction report
- Contradictions: Conflicting statements with evidence
- Confidence Score: AI's certainty in the findings (0-100%)
- Timeline: Chronological view of user behavior
- Categories: Classification of contradiction types
- Home: Main analysis interface
- Leaderboard: Top-performing officers
- Stats: Platform-wide statistics
- Profile: User profile and achievements
src/
βββ components/ # Reusable UI components
β βββ AnalysisResults.tsx
β βββ SearchForm.tsx
β βββ Navigation.tsx
β βββ ...
βββ pages/ # Route-based page components
β βββ HomePage.tsx
β βββ LeaderboardPage.tsx
β βββ ...
βββ services/ # Business logic and API integrations
β βββ analysisService.ts
β βββ redditApi.ts
β βββ multiModelPipeline.ts
β βββ ...
βββ types/ # TypeScript type definitions
βββ data/ # Mock data and constants
βββ App.tsx # Main application component
- Max Items: Up to 5,000 comments/posts per analysis
- Max Age: Content up to 365 days old
- Cache Duration: 24 hours for repeated analyses
- Token Budget: Configurable spending limits
- Modify
src/services/tokenBudget.tsfor cost controls - Adjust cache settings in
src/services/cacheService.ts - Update UI themes in
tailwind.config.js
- This tool is for educational and entertainment purposes
- Respect Reddit's Terms of Service and API limits
- Do not use for harassment or malicious purposes
- Consider privacy implications when analyzing users
- Reddit API has built-in rate limiting
- The application includes automatic retry logic
- Large analyses may take several minutes
- No user data is stored permanently
- Cache is cleared automatically after 24 hours
- All analysis is performed client-side
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Use Tailwind for styling
- Implement proper error handling
- Add types for all new interfaces
- Test components thoroughly
This project is licensed under the MIT License - see the LICENSE file for details.
- Reddit API for providing access to user data
- Google Gemini AI for advanced language analysis
- The React and TypeScript communities
- All contributors and testers
For questions, issues, or feature requests:
- Open an issue on GitHub
- Check existing documentation
- Review the code comments for implementation details
Disclaimer: This application is for educational purposes. Always respect user privacy and platform terms of service.