Skip to content

Built with the MERN stack, the app provides an intuitive interface where users can type in text prompts, and the AI generates images in real time. It aims to explore the potential of AI in creative fields like art, design, and content generation.

License

Notifications You must be signed in to change notification settings

utkxrsh13/Text_to_Image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 AI Studio - Text-to-Image Generator

AI Art Generation GIF

GitHub Stars License PRs Welcome

πŸš€ Overview

AI Studio is a cutting-edge web application that transforms text descriptions into stunning visual artwork using advanced AI technology. Built with the MERN stack, it offers a professional, user-friendly interface for creating, managing, and downloading AI-generated images.

✨ Key Features

  • 🎨 AI-Powered Image Generation - Transform text prompts into high-quality images
  • 🎭 Multiple Art Styles - Choose from 8+ artistic styles (Realistic, Anime, 3D, Watercolor, etc.)
  • πŸ” Secure Authentication - JWT-based user authentication system
  • πŸ’³ Credit-Based System - Flexible pricing with starter credits
  • πŸ“± Responsive Design - Works perfectly on desktop, tablet, and mobile
  • πŸ“š Complete History - Track and manage all your generated images
  • ⬇️ High-Quality Downloads - Download images in multiple resolutions
  • πŸŒ™ Modern UI/UX - Professional dark theme with smooth animations

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Modern UI library with hooks
  • Vite - Lightning-fast build tool
  • Tailwind CSS - Utility-first CSS framework
  • Framer Motion - Smooth animations and transitions
  • Axios - HTTP client for API calls
  • React Router DOM - Client-side routing
  • React Toastify - Beautiful notifications

Backend

  • Node.js - JavaScript runtime
  • Express.js - Web application framework
  • MongoDB - NoSQL database
  • Mongoose - MongoDB object modeling
  • JWT - JSON Web Token authentication
  • bcryptjs - Password hashing
  • ClipDrop API - AI image generation service

πŸƒβ€β™‚οΈ Quick Start

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB database
  • ClipDrop API key

Installation

  1. Clone the repository

    git clone https://github.com/utkxrsh13/Text_to_Image.git
    cd Text_to_Image
  2. Setup Backend

    cd server
    npm install
  3. Setup Frontend

    cd ../client
    npm install
  4. Environment Configuration

    Create .env file in the server directory:

    MONGODB_URI=your_mongodb_connection_string
    JWT_SECRET=your_jwt_secret_key
    CLIPDROP_API=your_clipdrop_api_key
    PORT=8000

    Create .env file in the client directory:

    VITE_BACKEND_URL=http://localhost:8000
  5. Start the Application

    Backend (Terminal 1):

    cd server
    npm start

    Frontend (Terminal 2):

    cd client
    npm run dev
  6. Open your browser

    • Frontend: http://localhost:5173
    • Backend API: http://localhost:8000

🎯 Usage Guide

1. Account Setup

  • Create an account or sign in
  • Get 5 free credits to start

2. Generate Images

  • Navigate to the generation page
  • Choose your preferred art style
  • Enter a descriptive prompt
  • Click generate and wait for the magic!

3. Manage Your Creations

  • View all generated images in History
  • Download high-resolution versions
  • Copy prompts for reuse
  • Track your credit usage

4. Upgrade Your Plan

  • Visit the pricing page
  • Choose from flexible plans
  • Get more credits and premium features

🎨 Available Art Styles

Style Description Best For
Realistic Photographic quality images Portraits, landscapes
Anime Japanese animation style Characters, fantasy art
Pixel Art Retro 8-bit graphics Game assets, nostalgic art
3D Three-dimensional rendered art Modern designs, products
Watercolor Traditional watercolor painting Soft, artistic scenes
Oil Painting Classic oil painting technique Fine art, portraits
Sketch Hand-drawn pencil sketches Concepts, quick art
Digital Art Modern digital artwork Versatile, contemporary

πŸ’° Pricing Plans

Plan Credits Price Best For
Starter 100 $9/month Casual users
Pro ⭐ 500 $19/month Regular creators
Enterprise 2000 $49/month Professional use

πŸ“ Project Structure

Text_to_Image/
β”œβ”€β”€ client/                 # Frontend React application
β”‚   β”œβ”€β”€ public/            # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/         # Main application pages
β”‚   β”‚   β”œβ”€β”€ context/       # Global state management
β”‚   β”‚   β”œβ”€β”€ assets/        # Images and static files
β”‚   β”‚   └── index.css      # Global styles
β”œβ”€β”€ server/                # Backend Node.js application
β”‚   β”œβ”€β”€ config/           # Database configuration
β”‚   β”œβ”€β”€ controllers/      # Route handlers
β”‚   β”œβ”€β”€ middlewares/      # Custom middleware
β”‚   β”œβ”€β”€ models/           # Database schemas
β”‚   β”œβ”€β”€ routes/           # API routes
β”‚   └── server.js         # Main server file
└── README.md

πŸ”Œ API Endpoints

Authentication

  • POST /api/users/register - User registration
  • POST /api/users/login - User login
  • GET /api/users/credits - Get user credits

Image Generation

  • POST /api/image/generate-image - Generate new image
  • GET /api/users/history - Get user's generation history

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add some amazing feature'
  4. Push to the branch
    git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed

πŸ› Issues & Support

Found a bug or have a feature request?

πŸ“ˆ Roadmap

Short-term

  • Image editing tools
  • Social sharing features
  • Favorites system
  • Batch generation

Long-term

  • Mobile app (React Native)
  • Custom AI model training
  • Marketplace for AI art
  • API for developers

πŸ“Š Stats

GitHub Activity Graph

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Show Your Support

If you find this project helpful, please consider:

  • ⭐ Starring the repository
  • 🍴 Forking for your own use
  • πŸ“’ Sharing with others
  • πŸ› Contributing to improve it

Made with ❀️ by Utkarsh

Transform your imagination into visual reality with AI Studio


Built with ❀️ using MERN Stack β€’ Β© 2025 InspiraPIX

About

Built with the MERN stack, the app provides an intuitive interface where users can type in text prompts, and the AI generates images in real time. It aims to explore the potential of AI in creative fields like art, design, and content generation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published