An AI-powered image generation platform where users can create stunning images using advanced models such as Stable Diffusion SDXL - Lightning, SDXL-Base, or DreamShaper. This platform allows users to publish their generated images for others to explore and download.
- AI-Powered Image Generation: Generate high-quality images using Stable Diffusion SDXL models and DreamShaper.
- Image Sharing & Discovery: Publish your generated images for others to see, explore a gallery of creations by other users, and download the images you like.
- Multiple AI Models: Choose from a variety of image generation models, including SDXL-Lightning, SDXL-Base, and DreamShaper.
- Simple & Intuitive UI: A clean interface built with Next.js, Tailwind CSS, and TypeScript for easy interaction.
- Cloudflare Workers & Hono: Fast and scalable serverless backend powered by Cloudflare Workers and Hono framework.
-
Frontend:
- Next.js (React framework)
- Tailwind CSS (Utility-first CSS framework)
- TypeScript (Typed JavaScript)
-
Backend:
- Cloudflare Workers (Serverless platform for fast deployment)
- Hono (Minimal and fast web framework for the Edge)
-
AI Models:
- Stable Diffusion SDXL - Lightning
- Stable Diffusion SDXL-Base
- DreamShaper
- Node.js installed on your system
- Cloudflare Workers CLI for deploying serverless backend
-
Clone the repository:
git clone https://github.com/your-username/ai-image-generator.git cd ai-image-generator
-
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.env.local
file in the root of your project.
DATABASE_URL="Your mongo url" NEXT_PUBLIC_SERVER_URL="your deployed cloudflare api"
- Create a
-
Run the development server:
npm run dev
-
Deploy the Cloudflare Workers backend:
- Follow the steps in the Cloudflare Workers guide to deploy your backend.
-
Select the AI model you want to use (SDXL-Lightning, SDXL-Base, DreamShaper).
-
Enter a prompt to generate the image.
-
Click "Generate" and wait for the magic to happen!
-
Publish your generated image to share it with others, or explore the gallery to download images you like.