A private, passcode-protected web application for generating and modifying images using OpenAI's Image Generation API.
- Passcode Protection: Secure access to the application
- Text-to-Image Generation: Create images from text prompts using OpenAI's
gpt-image-1model. - Image Modification: Edit existing images or create variations using the
gpt-image-1model. - Image History: View and manage previously generated images.
- Local Storage: Saves generated images to the browser's localStorage, storing up to the 10 most recent images to manage space.
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- State Management: Zustand
- API Integration: OpenAI API (focused on
gpt-image-1for image generation and edits) - UI Components: React Icons, React Hot Toast
- Node.js 16.8 or later
- OpenAI API key with access to OpenAI's Image Generation API (model:
gpt-image-1).
- Clone the repository
- Install dependencies:
npm install- Create a
.env.localfile in the root directory with the following content:
NEXT_PUBLIC_OPENAI_API_KEY=your_openai_api_key_here
- Start the development server:
npm run dev- Open http://localhost:3000 in your browser
- Enter the passcode on the login screen (default:
forge2025) - Use the prompt form to generate images
- View and manage your generated images in the gallery
- Click on an image to view details, modify it, or see its modification history
This application can be deployed to Vercel with minimal configuration:
npm run buildBe sure to set the environment variables in your Vercel project settings.
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.