AI-IMAGE-GENERATOR is a full-stack web application that turns simple text prompts into visually stunning AI-generated images. Built with the MERN stack (MongoDB, Express.js, React, Node.js) and integrated with the ImagePig API, this project merges modern web development with creative AI technology.
- 🎨 Generate images from text using the ImagePig API
- ⚡ MERN stack-based architecture (MongoDB, Express.js, React, Node.js)
- 🌐 Beautiful and responsive UI using Tailwind CSS
- 🗃️ Image history and prompt tracking with MongoDB
- ✨ Easy-to-use interface – just type a prompt and generate!
| Technology | Description |
|---|---|
| React | Frontend library for UI |
| Node.js | JavaScript runtime for backend |
| Express.js | Web framework for Node.js |
| MongoDB | NoSQL database |
| ImagePig API | AI-powered image generation service |
AI-IMAGE-GENERATOR/
├── client/ # Frontend (React)
│ └── src/
│ ├── components/
│ ├── pages/
│ └── App.js
├── server/ # Backend (Node.js + Express)
│ ├── controllers/
│ ├── routes/
│ ├── models/
│ └── index.js
├── README.md
git clone https://github.com/Aapush01/AI-IMAGE-GENERATOR.git
cd AI-IMAGE-GENERATORBackend
cd server
npm installFrontend
cd client
npm install
In the /server directory, create a .env file:
PORT=8080
MONGO_URI=your_mongodb_uri
IMAGE_PIG_API_KEY=your_imagepig_api_key
Start the backend
cd server
npm start
Visit http://localhost:8080 to use the app.
Start the frontend
cd client
npm start
Visit http://localhost:3000 to use the app.
-
Building full-stack apps using the MERN stack
-
Managing frontend-backend communication
-
Integrating third-party AI APIs (ImagePig)
-
Creating a responsive, user-friendly interface with Tailwind CSS
-
Handling asynchronous data flow in React
-
Using MongoDB for storing user inputs and history
-
✅ User authentication and login history
-
✅ Download generated images
-
✅ Share to social media
-
🔄 Prompt suggestions and auto-complete
-
📁 Save image gallery per user
If you like this project or want to connect:
-
GitHub: @Aapush01
-
LinkedIn: MD Shahid Afridi
-
X: @Aapush2
-
Email: [email protected]
If you found this project helpful, please consider giving it a ⭐ on GitHub — it really helps and keeps me motivated!