Skip to content
ShashankShekhar31Public

About

AI-powered Text-to-Image SaaS built using the MERN Stack. Generate stunning AI images from text prompts with user authentication, credit management, image history, favorites, dashboards, and secure cloud deployment.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

47 Commits

Folders and files

Repository files navigation

React Node.js MongoDB Tailwind CSS Clerk JWT Razorpay ClipDrop API REST API Vercel Render Responsive Performance Full Stack AI Powered

Imagify - AI Text-to-Image Generator

AI-powered Text-to-Image SaaS built using the MERN Stack. Generate stunning AI images from text prompts with user authentication, credit management, image history, favorites, dashboards, and secure cloud deployment.


Live Demo

๐ŸŒ Frontend

https://imagify-a4x18j0w1-shashank-shekhars-projects.vercel.app/

๐Ÿš€ Backend API

https://imagify-backend-1dju.onrender.com


๐Ÿ“ธ Project Screenshots

๐Ÿ  Home Page

Image

๐ŸŽจ About the AI Generator

Image

๐Ÿ” Login / Signup

Image

โš™๏ธ How It Works

Image

๐ŸŽจ Image Generation

Image

๐Ÿ“œ Image History

Image

๐Ÿ“Š User Dashboard

Image

๐Ÿ’ณ Pricing Page

Image

โญ Customer Review Page

Image

โœจ Features

AI Image Generation

  • Generate images using text prompts
  • High-quality AI generated images
  • Instant image generation
  • Download generated images

Authentication

  • User Registration
  • Secure Login
  • JWT Authentication
  • Protected Routes
  • Persistent Sessions

User Dashboard

  • Total Images Generated
  • Credits Remaining
  • Latest Prompt
  • Personalized Dashboard

Image History

  • View all generated images
  • Download previous images
  • Delete generated images
  • Favorite important images

Credit System

  • Credit deduction after every generation
  • Live credit updates
  • Dashboard integration
  • Navbar credit counter

Responsive UI

  • Desktop
  • Tablet
  • Mobile Friendly

Cloud Deployment

  • Frontend deployed on Vercel
  • Backend deployed on Render
  • MongoDB Atlas Database

๐Ÿ— Project Architecture

                     User

                      โ”‚

                      โ–ผ

              React Frontend
                 (Vercel)

                      โ”‚
          REST API (Axios + JWT)

                      โ–ผ

             Express.js Backend
                 (Render)

      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”

      โ–ผ                             โ–ผ

 MongoDB Atlas               AI Image API

      โ”‚

      โ–ผ

 User Data
 Images
 Favorites
 Credits

๐Ÿ›  Tech Stack

Frontend

  • React.js
  • React Router
  • Tailwind CSS
  • Axios
  • React Toastify

Backend

  • Node.js
  • Express.js
  • JWT Authentication
  • Bcrypt
  • Multer

Database

  • MongoDB Atlas
  • Mongoose ODM

Deployment

  • Vercel
  • Render

AI Services

  • ClipDrop API

๐Ÿ“‚ Folder Structure

Imagify
โ”‚
โ”œโ”€โ”€ client
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ”‚   โ”œโ”€โ”€ assets
โ”‚   โ”‚   โ”œโ”€โ”€ components
โ”‚   โ”‚   โ”œโ”€โ”€ context
โ”‚   โ”‚   โ”œโ”€โ”€ pages
โ”‚   โ”‚   โ””โ”€โ”€ App.jsx
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ server
โ”‚   โ”œโ”€โ”€ config
โ”‚   โ”œโ”€โ”€ controllers
โ”‚   โ”œโ”€โ”€ middleware
โ”‚   โ”œโ”€โ”€ models
โ”‚   โ”œโ”€โ”€ routes
โ”‚   โ”œโ”€โ”€ server.js
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ API.md
โ”œโ”€โ”€ ARCHITECTURE.md
โ”œโ”€โ”€ DEPLOYMENT.md
โ””โ”€โ”€ LICENSE

โš™ Installation

Clone Repository

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

Client

cd client

npm install

npm run dev

Server

cd server

npm install

npm run server

๐Ÿ” Environment Variables

Client (.env)

VITE_BACKEND_URL=YOUR_BACKEND_URL

Server (.env)

MONGODB_URI=
JWT_SECRET=

CLIPDROP_API=

CURRENCY=

FRONTEND_URL=

๐Ÿ“ก API Overview

Method Endpoint Description
POST /api/user/register Register User
POST /api/user/login Login User
GET /api/user/credits Get User Credits
POST /api/image/generate-image Generate Image
POST /api/image/history Image History
DELETE /api/image/delete/:id Delete Image
PATCH /api/image/favorite/:id Toggle Favorite

Detailed API documentation is available in API.md


๐Ÿ”’ Security Features

  • JWT Authentication
  • Password Hashing using Bcrypt
  • Protected Routes
  • Environment Variables
  • MongoDB Validation
  • Authentication Middleware
  • User Authorization
  • Secure API Requests

๐Ÿ“ˆ Production-Level Engineering

This project follows production-oriented software engineering practices:

  • Modular Backend Architecture
  • MVC Folder Structure
  • Context API for Global State
  • Reusable React Components
  • RESTful API Design
  • Environment Variable Management
  • Error Handling
  • Loading States
  • Toast Notifications
  • Secure Authentication
  • Cloud Deployment

๐Ÿš€ Scalability

The application is designed with scalability in mind:

  • Component-based React architecture
  • Modular Express controllers and routes
  • Easily replaceable AI provider
  • MongoDB Atlas cloud database
  • Stateless JWT authentication
  • REST API architecture
  • Ready for Redis caching
  • Easy integration with payment gateways
  • Suitable for horizontal backend scaling

๐ŸŒ Deployment

Frontend

Hosted on

Vercel


Backend

Hosted on

Render


Database

Hosted on

MongoDB Atlas


Deployment guide is available in DEPLOYMENT.md


๐Ÿ”ฎ Future Improvements

  • Google OAuth
  • Razorpay Payment Gateway
  • Email Verification
  • Password Reset
  • AI Prompt Templates
  • Image Collections
  • Image Sharing
  • Prompt History Search
  • Admin Dashboard
  • Usage Analytics
  • Dark Mode
  • PWA Support

๐Ÿ“Š Project Highlights

โœ” AI Powered SaaS

โœ” MERN Stack

โœ” JWT Authentication

โœ” Credit Management System

โœ” Dashboard Analytics

โœ” Image History

โœ” Favorite Images

โœ” Delete Images

โœ” Secure REST APIs

โœ” MongoDB Atlas

โœ” Responsive UI

โœ” Cloud Deployment


๐Ÿงช Testing

Manual testing performed for:

  • User Registration
  • Login
  • Authentication
  • Credit Deduction
  • Image Generation
  • Dashboard
  • Image History
  • Delete Image
  • Favorite Images
  • Protected APIs

๐Ÿ‘จโ€๐Ÿ’ป Author

Shashank Shekhar

GitHub

https://github.com/ShashankShekhar31

LinkedIn

www.linkedin.com/in/shashank-shekhar-61633a273


๐Ÿ“„ License

This project is licensed under the MIT License.


About

AI-powered Text-to-Image SaaS built using the MERN Stack. Generate stunning AI images from text prompts with user authentication, credit management, image history, favorites, dashboards, and secure cloud deployment.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages