An AI-powered Reddit profile analyzer that creates personalized roasts based on user's comment history and behavior patterns.
- Extracts and analyzes Reddit comment history
- Identifies behavioral patterns and personality traits
- Generates personalized roasts based on user activity
- Creates detailed breakdowns of strengths, weaknesses, love life, and life purpose
- Chat-style interface with typewriter effects
- Progressive story-mode interactions
- Yes/No question sequences that shape the final roast
- Smooth animations and transitions
- Complete internationalization with react-i18next
- Dynamic language switching without page reload
- Persistent language preferences
- Works seamlessly across all devices
- Optimized for both desktop and mobile
- Clean, modern UI with custom animations
- Next.js 14 - React framework with App Router
- React 18 - Modern React with hooks
- Tailwind CSS - Utility-first CSS framework
- react-i18next - Internationalization
- Hono.js - Lightweight web framework
- Node.js - JavaScript runtime
- MongoDB - Database with Mongoose ODM
- Reddit API - Comment and profile data extraction
- Google Gemini AI - AI-powered content generation
reddit-profile-roaster/
โโโ app/ # Next.js App Router
โ โโโ page.jsx # Main landing page
โ โโโ roast/page.jsx # Results page
โ โโโ layout.jsx # Root layout
โโโ components/ # React components
โ โโโ UsernameForm.jsx # Username input form
โ โโโ Footer.jsx # Site footer
โ โโโ LanguageSwitcher.jsx # Language selector
โ โโโ magicui/ # Custom UI components
โโโ Backend/ # Server-side code
โ โโโ server.js # Main server
โ โโโ routes/ # API routes
โ โ โโโ response.js # User processing
โ โ โโโ roast.js # Roast retrieval
โ โโโ models/ # Database schemas
โโโ public/ # Static assets
โ โโโ locales/ # Translation files
โโโ config.json # API configuration
โโโ package.json # Dependencies
- Node.js 18+
- MongoDB database
- Google Gemini API keys
-
Clone the repository
git clone <repository-url> cd reddit-profile-roaster
-
Install dependencies
# Frontend npm install # Backend cd Backend npm install
-
Environment setup
Create
.envin the Backend directory:DATABASE_URL=your_mongodb_connection_string GEMINI_API_KEY_1=your_gemini_api_key_1 GEMINI_API_KEY_2=your_gemini_api_key_2 # Add more API keys as needed
-
Configure API endpoints
Update
config.jsonin the root directory:{ "url": "http://localhost:3003" } -
Start the application
Backend (Terminal 1):
cd Backend npm startFrontend (Terminal 2):
npm run dev
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:3003
- Enter a Reddit username in the input field
- Wait for analysis - The system fetches and analyzes the user's comment history
- Interactive chat - Answer questions about the analysis
- View results - Get a comprehensive roast with different categories
POST /api/responses- Submit username for analysisGET /api/roast/:username- Retrieve roast dataPOST /api/roast/:username/seen- Mark questions as viewed
- Create translation file in
public/locales/[language-code]/common.json - Update the language switcher component
- Test translations across the application
The application uses MongoDB with the following main schema:
{
username: String,
avatar: String,
subreddits: Array,
questions: String,
roast: String,
strength: String,
weakness: String,
loveLife: String,
lifePurpose: String,
questionsSeen: Boolean,
updatedAt: Date
}- 200 requests per 15-minute window
- Multiple Gemini API keys for load balancing
- Automatic fallback between API keys
- User not found - Clear error messages with retry options
- API failures - Graceful degradation with fallback responses
- Network issues - Automatic retry logic with exponential backoff
- Invalid data - Input validation and sanitization
- Caching - Database caching for repeat users
- Optimization - Efficient Reddit API usage
- Loading states - Engaging progress indicators
- Responsive - Fast loading across all devices
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.