A modern web application that generates AI-powered responses using OpenAI's GPT-3.5 Turbo model. Built with Next.js, TypeScript, and Tailwind CSS.
- Real-time AI text generation
- Clean and responsive UI
- Error handling and loading states
- OpenAI GPT-3.5 Turbo integration
- TypeScript support
- Tailwind CSS styling
Before you begin, ensure you have:
- Node.js (Latest LTS version recommended)
- An OpenAI API key
- npm or yarn package manager
- Clone the repository
- Create a
.envfile in the root directory - Add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here# Install dependencies
npm install
# or
yarn install
# Run the development server
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the application.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
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.
- Next.js - React framework
- TypeScript - Type safety
- OpenAI API - AI text generation
- Tailwind CSS - Styling
- React - UI library
# Run in development mode with hot reload
npm run dev:watch
# or
yarn dev:watch
# Build for production
npm run build
# or
yarn build
# Start production server
npm start
# or
yarn startThe application includes comprehensive error handling for:
- API connection issues
- Invalid inputs
- OpenAI API errors
- Network problems
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- OpenAI for providing the GPT-3.5 Turbo API
- Next.js team for the excellent framework
- Vercel for hosting solutions