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
- Arctic Shift Photon - Archived public Reddit data fallback when direct Reddit OAuth is unavailable, suspended, rate limited or unreachable
- Codex Everywhere - Primary AI provider for content generation
- Google Gemini AI - AI-powered content generation fallback
- OpenRouter - Additional AI provider fallback
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
โ โโโ services/ # Reddit, Arctic Shift and AI providers
โ โโโ 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:PORT=3003 DATABASE_URL=your_mongodb_connection_string # Optional direct Reddit API credentials; Arctic Shift is used as fallback REDDIT_CLIENT_ID=your_reddit_client_id REDDIT_CLIENT_SECRET=your_reddit_client_secret REDDIT_CLIENT_ID2=your_second_reddit_client_id REDDIT_CLIENT_SECRET2=your_second_reddit_client_secret # Codex Everywhere is tried first when configured CODEX_BASE_URL=your_codex_everywhere_base_url CODEX_API_KEY=your_codex_everywhere_api_key CODEX_MODEL=gpt-5.4 # Optional AI fallbacks GEMINI=comma_separated_gemini_keys OPENROUTER_API_KEY=your_openrouter_key API_KEYS=comma_separated_gemini_keys # Optional Arctic Shift override ARCTIC_SHIFT_BASE_URL=https://arctic-shift.photon-reddit.com
-
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
- Reddit unavailable/suspended/rate limited - Automatic fallback to the Arctic Shift Photon archive for public comment and profile data; archived results may include comments later deleted from Reddit, subject to Arctic Shift's coverage and removal policies
- Network issues - Automatic retry logic with exponential backoff
- Invalid data - Input validation and sanitization
The backend uses Node's built-in test runner. No live network calls are made, external requests are mocked.
cd backend
npm test- 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.