PhotoAI is a modern web application that leverages AI technology to generate images based on text prompts. Built with Next.js and integrated with OpenAI's image generation capabilities, PhotoAI provides an intuitive interface for creating AI-generated artwork.
- AI Image Generation: Transform text prompts into high-quality images using advanced AI models
- User Authentication: Secure login system powered by NextAuth.js
- Image History: View and manage your previously generated images
- Cloud Storage: All generated images are stored securely using ImageKit
- Responsive Design: Seamless experience across desktop and mobile devices
- Next.js 15 - React framework with server-side rendering
- React 19 - UI library
- Tailwind CSS - Utility-first CSS framework
- React Hook Form - Form validation
- Next.js API Routes - Serverless functions
- Prisma - ORM for database operations
- NextAuth.js - Authentication
- OpenAI API - AI image generation
- ImageKit - Image storage and delivery
- Node.js (v18 or later recommended)
- pnpm
- Database (compatible with Prisma)
- Clone the repository
git clone https://github.com/yourusername/PhotoAI.git
cd PhotoAI- Install dependencies
pnpm install- Set up environment variables
# Copy the example environment variables file
cp .env.example .env
# Then edit .env with your actual configuration values- Initialize the database
pnpm prisma db push- Start the development server
pnpm dev- Open http://localhost:3000 in your browser
- Sign in to your account
- Navigate to the Create page
- Enter a detailed text prompt describing the image you want to generate
- Click "Generate" and wait for the AI to create your image
- View, download, or share your generated images
app/ # Next.js application routes
api/ # API routes for authentication, generation, etc.
create/ # Image creation page
components/ # Reusable UI components
lib/ # Utility functions and configuration
prisma/ # Database schema and client
public/ # Static assets
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the image generation technology
- Next.js team for the amazing framework
- ImageKit for image storage solutions