Skip to content

PromptCanvas is a full-stack AI-powered SaaS application that transforms text prompts into images using the Clipdrop API. Built with the MERN stack, it features user authentication, credit-based image generation, Razorpay integration for payments, and downloadable images.

Notifications You must be signed in to change notification settings

moali007/promptCanvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–ΌοΈ PromptCanvas

Transforming Words Into Stunning Visuals Using AI


βš™οΈ Built with the tools and technologies:


πŸ“Έ Description

PromptCanvas is a Full Stack AI SaaS Application that lets users generate images from text prompts using AI. Built with the MERN stack (MongoDB, Express, React, Node.js), it features user authentication, a credit system, online payment integration via Razorpay, and the ability to download generated images.


🌟 Live Demo

live-link


πŸš€ Features

  • πŸ–ΌοΈ Generate images from text using the ClipDrop API
  • πŸ” User Authentication (Signup/Login)
  • 🎫 Credit-based system: 1 credit = 1 image
  • πŸ’³ Buy more credits using Razorpay integration
  • πŸ“₯ Download generated images with a single click
  • πŸ“Š Transaction history & credit tracking
  • πŸ’Ύ MongoDB backend for persistent storage
  • 🌐 Fully responsive React frontend

πŸ› οΈ Tech Stack

Frontend:

  • React.js
  • Axios
  • React Router DOM
  • TailwindCSS

Backend:

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • JWT for Authentication
  • Razorpay SDK for Payments

πŸ“ Project Structure

β”œβ”€β”€ client/               # React frontend
β”œβ”€β”€ server/               # Node.js backend
β”‚   β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ routes/
β”‚   └── middlewares/
└── README.md

πŸ“¦ Setup Instructions

1. Clone the Repository

git clone https://github.com/moali007/promptcanvas.git
cd promptcanvas

2. Install Dependencies

# Install server dependencies
cd server
npm install

# Install client dependencies
cd ../client
npm install

3. Set Environment Variables

Create a .env file in the server/ folder:

PORT=''
MONGO_URI=your_mongo_connection_string
JWT_SECRET=your_jwt_secret
CLIPDROP_API=your_clipdrop_api_key
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
CURRENCY=INR

Also, create a .env file in the client/ folder:

VITE_BACKEND_URL = 'your_backend_url'
VITE_RAZORPAY_KEY_ID=your_razorpay_key_id

4. Start the App

# Start backend
cd server
npm run start

# Start frontend
cd ../client
npm run dev

πŸ“Έ Screenshots

Screenshot 2025-06-03 140117


Screenshot 2025-06-03 140301


Screenshot 2025-06-03 140153


πŸ”’ Authentication

  • JWT-based login/signup system
  • Auth middleware to protect image generation and credit purchase routes

🧾 Credit System

  • Each user starts with default credits i.e 5 credits
  • 1 credit = 1 image generation
  • Users can purchase more credits via Razorpay
  • Credit balance updates after successful payment

🧠 AI Image Generation

  • Integrated ClipDrop's text-to-image API
  • Images returned as base64 and displayed in the UI
  • Users can download images directly to their device

πŸͺ™ Payments with Razorpay

  • Razorpay Orders API used to create payment requests
  • Transaction stored in MongoDB
  • On successful payment, credits are added to the user's balance

🀝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


πŸ“„ License

MIT


πŸ™Œ Acknowledgements


About

PromptCanvas is a full-stack AI-powered SaaS application that transforms text prompts into images using the Clipdrop API. Built with the MERN stack, it features user authentication, credit-based image generation, Razorpay integration for payments, and downloadable images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published