An AI-powered tweet generator built with Next.js and React that creates engaging tweets using ChatGPT and generates matching images using DALL-E.
- Generate tweets in different styles (funny, casual, professional, inspirational)
- Optional AI image generation to accompany tweets
- Twitter-like interface
- One-click sharing to Twitter
- Rate limiting to prevent API abuse
- Next.js 14
- React
- Typescript
- OpenAI API (GPT-4 and DALL-E 3)
- Font Awesome for icons
- Clone the repository
git clone [your-repo-url]- Install dependencies
npm install- Create a
.env.localfile in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Run the development server:
npm run dev- Open http://localhost:3000 with your browser to see the result.
- Enter a topic you want to tweet about
- Select your preferred writing style
- Optionally check the box to generate a matching image
- Click "Generate Your Tweet"
- Click the Tweet button to share directly to Twitter
- Tweet generation: 10 requests per hour
- Image generation: 5 requests per hour
The following environment variables are required:
OPENAI_API_KEY: Your OpenAI API key