2.0 KiB
2.0 KiB
Anything vs Anything
A Next.js application that uses AI to compare any two things and display the results in a table format.
Features
- Compare any two items using AI-powered analysis
- Optional detailed descriptions for more context
- Results displayed in a formatted table
- Responsive design with Tailwind CSS
- Powered by Replicate AI API
Setup
- Clone the repository and install dependencies:
npm install
- Set up environment variables:
cp .env.example .env.local
- Add your OpenRouter API key to
.env.local
:
OPENROUTER_API_KEY=your_openrouter_api_key_here
OPENROUTER_MODEL=anthropic/claude-3.5-sonnet
OPENROUTER_CHINESE_MODEL=deepseek/deepseek-chat
NEXT_PUBLIC_SITE_URL=https://anything-vs-anything.com
- Run the development server:
npm run dev
- Open http://localhost:3000 to view the application.
Usage
- Enter two items you want to compare
- Optionally add detailed descriptions for more context
- Click "Compare Now" to get AI-powered analysis
- View the results in a formatted table
Environment Variables
OPENROUTER_API_KEY
: Your OpenRouter API key (required)OPENROUTER_MODEL
: The default model to use (optional, defaults to Claude 3.5 Sonnet)OPENROUTER_CHINESE_MODEL
: The model to use for Chinese comparisons (optional, defaults to DeepSeek Chat for better Chinese support)NEXT_PUBLIC_SITE_URL
: Your site URL for API referrer (optional)
Tech Stack
- Next.js 15 with App Router
- TypeScript
- Tailwind CSS
- OpenRouter AI API
- React Markdown for table rendering
- Automatic Chinese/English model switching for better localization
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.