anything-vs-anything/README.md
2025-07-03 09:40:23 +08:00

68 lines
2.0 KiB
Markdown

# 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
1. Clone the repository and install dependencies:
```bash
npm install
```
2. Set up environment variables:
```bash
cp .env.example .env.local
```
3. 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
```
4. Run the development server:
```bash
npm run dev
```
5. Open [http://localhost:3000](http://localhost:3000) to view the application.
## Usage
1. Enter two items you want to compare
2. Optionally add detailed descriptions for more context
3. Click "Compare Now" to get AI-powered analysis
4. 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](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.