Skip to content

Theangryysoul/Imagify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Imagify

AI-powered image generation web application built with the MERN stack. Generate high-quality images from text prompts using AI, purchase credits securely through Razorpay, and manage your account with JWT authentication.


✨ Features

  • πŸ€– AI-powered image generation from text prompts
  • πŸ” Secure user authentication with JWT
  • πŸ’³ Razorpay payment gateway integration
  • πŸͺ™ Credit-based image generation system
  • πŸ“± Responsive UI for desktop and mobile
  • ☁️ MongoDB Atlas database
  • ⚑ Fast React + Vite frontend
  • πŸ”’ Protected backend APIs
  • 🎯 Clean and modern user interface

πŸ“Έ Screenshots

Home Page

Home

Login

Login

Generate Image

Generate

Generated Result

Result

Buy Credits

Buy Credits

Payment Gateway

Payment


πŸš€ Tech Stack

Frontend

  • React
  • Vite
  • Tailwind CSS
  • React Router DOM
  • Axios
  • React Toastify

Backend

  • Node.js
  • Express.js
  • MongoDB Atlas
  • Mongoose
  • JWT Authentication
  • Bcrypt
  • Razorpay

AI

  • ClipDrop API

πŸ“ Folder Structure

Imagify
β”‚
β”œβ”€β”€ client
β”‚   β”œβ”€β”€ public
β”‚   β”œβ”€β”€ src
β”‚   β”œβ”€β”€ .env.example
β”‚   └── package.json
β”‚
β”œβ”€β”€ server
β”‚   β”œβ”€β”€ config
β”‚   β”œβ”€β”€ controllers
β”‚   β”œβ”€β”€ middleware
β”‚   β”œβ”€β”€ models
β”‚   β”œβ”€β”€ routes
β”‚   β”œβ”€β”€ .env.example
β”‚   └── package.json
β”‚
β”œβ”€β”€ screenshots
β”‚
β”œβ”€β”€ README.md
└── .gitignore

βš™οΈ Installation

Clone Repository

git clone https://github.com/Theangryysoul/Imagify.git

cd Imagify

Install Dependencies

Client

cd client
npm install

Server

cd ../server
npm install

πŸ”‘ Environment Variables

Client

Create client/.env

VITE_BACKEND_URL=http://localhost:4000
VITE_RAZORPAY_KEY_ID=your_test_or_live_key

Server

Create server/.env

PORT=4000

MONGODB_URI=your_mongodb_connection_string

JWT_SECRET=your_jwt_secret

CLIPDROP_API=your_clipdrop_api_key

RAZORPAY_KEY_ID=your_razorpay_key

RAZORPAY_KEY_SECRET=your_razorpay_secret

CURRENCY=INR

▢️ Run the Project

Start Backend

cd server
npm run server

Start Frontend

cd client
npm run dev

Open:

http://localhost:5173

πŸ’³ Credit Plans

Plan Credits Price
Basic 100 β‚Ή10
Advanced 500 β‚Ή50
Business 5000 β‚Ή250

πŸ’³ Payment Flow

  1. User selects a credit plan.
  2. Backend creates a Razorpay order.
  3. Razorpay Checkout opens.
  4. Payment is verified.
  5. Credits are added to the user's account.
  6. User can generate more AI images.

πŸ” Authentication

  • User Registration
  • User Login
  • JWT-based Authorization
  • Protected API Routes
  • Secure Password Hashing with bcrypt

πŸ“‘ API Endpoints

User

Method Endpoint Description
POST /api/user/register Register a new user
POST /api/user/login Login
GET /api/user/credit Get available credits
POST /api/user/pay-razor Create Razorpay order
POST /api/user/verify-razor Verify payment

Image

Method Endpoint Description
POST /api/image/generate-image Generate AI image

πŸ“¦ Environment Files

This project includes:

client/.env.example
server/.env.example

Copy them before running:

cp client/.env.example client/.env
cp server/.env.example server/.env

On Windows, simply copy each file and rename it to .env.


πŸš€ Future Improvements

  • Google OAuth
  • GitHub OAuth
  • Image History
  • Download History
  • Prompt Templates
  • Image Upscaling
  • Image Variations
  • User Profile
  • Dark Mode
  • Admin Dashboard
  • Payment History

🀝 Contributing

Contributions, suggestions, and bug reports are welcome.

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Open a Pull Request.

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Vishal Verma

GitHub: https://github.com/Theangryysoul

If you found this project helpful, consider giving it a ⭐ on GitHub.

About

AI-powered image generation web application built with the MERN stack. Generate high-quality images from text prompts using AI, purchase credits securely through Razorpay, and manage your account with JWT authentication.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors