Skip to content

mrchandrayee/AI-SaaS-Image-Generator-Chatbot-React-NextJs-TypeScript-

Repository files navigation

AI SaaS Image Generator & Chatbot

A modern SaaS application built with Next.js 14, React, and TypeScript that combines AI image generation capabilities with an intelligent chatbot interface.

Features

  • 🎨 AI Image Generation: Create unique images using advanced AI models
  • 🤖 AI Chatbot: Intelligent conversation system using GeminiAI
  • 💳 Credit System: Built-in credit management for service usage
  • 📊 User Dashboard: Track and manage generated images
  • 💰 Payment Integration: PayPal integration for credit purchases
  • 🌓 Dark/Light Mode: Full theme support with mode toggle
  • 📱 Responsive Design: Fully responsive UI for all devices

Tech Stack

  • Framework: Next.js 14
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Database: MongoDB (via built-in models)
  • Authentication: Next.js built-in auth
  • Payment: PayPal integration
  • AI Services:
    • OpenAI for image generation
    • GeminiAI for chat functionality
  • UI Components: Custom components with shadcn/ui

Project Structure

├── actions/          # Server actions for API functionality
├── app/              # Next.js app router pages and layouts
├── components/       # Reusable React components
├── context/         # React context providers
├── lib/             # Utility functions and helpers
├── models/          # MongoDB models
├── public/          # Static assets
└── utils/           # Types and database utilities

Setup Instructions

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Set up environment variables:
    OPENAI_API_KEY=your_openai_key
    GEMINI_API_KEY=your_gemini_key
    MONGODB_URI=your_mongodb_uri
    PAYPAL_CLIENT_ID=your_paypal_client_id
  4. Run the development server:
    npm run dev
  5. Open http://localhost:3000 in your browser

Key Features in Detail

Image Generation

  • Generate custom images using OpenAI's DALL-E model
  • Save and manage generated images
  • Edit or regenerate images as needed

Chatbot Interface

  • Interactive chat using GeminiAI
  • Context-aware conversations
  • Real-time responses

Credit System

  • Pay-per-use credit system
  • Credit purchase through PayPal
  • Credit usage tracking

User Dashboard

  • View all generated images
  • Manage credit balance
  • Track usage history

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

AI-image-generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published