Skip to content

An AI-powered image generation web app built using the MERN stack (MongoDB, Express.js, React, Node.js) and the ImagePig API. Just enter a prompt and watch it turn into stunning AI-generated artwork in seconds.

Notifications You must be signed in to change notification settings

Aapush01/AI-IMAGE-GENERATOR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

🖼️ AI-IMAGE-GENERATOR

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.


🚀 Features

  • 🎨 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!

📷 Live Demo

🔗 Live Site


🛠️ Tech Stack

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

📁 Project Structure

AI-IMAGE-GENERATOR/
├── client/ # Frontend (React)
│ └── src/
│ ├── components/
│ ├── pages/
│ └── App.js ├── server/ # Backend (Node.js + Express)
│ ├── controllers/
│ ├── routes/
│ ├── models/
│ └── index.js
├── README.md


⚙️ Setup Instructions

1. Clone the Repository

git clone https://github.com/Aapush01/AI-IMAGE-GENERATOR.git
cd AI-IMAGE-GENERATOR

2. Install Dependencies

Backend

cd server
npm install

Frontend

cd client
npm install

3.Configure Environment Variables

In the /server directory, create a .env file:

PORT=8080
MONGO_URI=your_mongodb_uri
IMAGE_PIG_API_KEY=your_imagepig_api_key

4. Run the Application

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.

💡 What I Learned

  • 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

🧠 Future Improvements

  • ✅ User authentication and login history

  • ✅ Download generated images

  • ✅ Share to social media

  • 🔄 Prompt suggestions and auto-complete

  • 📁 Save image gallery per user


🙏 Acknowledgements


📫 Contact

If you like this project or want to connect:


🌟 Show Your Support

If you found this project helpful, please consider giving it a ⭐ on GitHub — it really helps and keeps me motivated!

About

An AI-powered image generation web app built using the MERN stack (MongoDB, Express.js, React, Node.js) and the ImagePig API. Just enter a prompt and watch it turn into stunning AI-generated artwork in seconds.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published