Skip to content

nishaaannnt/openai-image-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Image Generation

sampleImg

Based on API provided by OpenAI

This project is an AI-powered image generation application built using the MERN stack (MongoDB, Express.js, React.js, Node.js), Tailwind CSS, OpenAI API, and Cloudinary. It allows users to generate realistic images based on their inputs and showcase them in the community.

Features

  • User-friendly interface for generating AI-generated images
  • Integration with OpenAI API for image generation
  • Image storage and management using Cloudinary
  • MongoDB database for storing user information and generated images
  • Community page to showcase your work
  • Responsive design powered by Tailwind CSS

Installation

Follow the instructions below to set up and run the project on your local machine:

  1. Clone the repository:
    git clone https://github.com/nishaaannnt/openai-image-website
  1. Navigate to the project directory:
cd ai-image-generation
  1. Install the dependencies for the backend:
cd server
npm install
  1. Configure the environment variables:
  • Create a .env file in the server directory.

  • Set up the necessary environment variables in the .env file. For example:

    PORT=5000
    DATABASE_URL=<your-mongodb-url>
    OPENAI_API_KEY=<your-openai-api-key>
    CLOUDINARY_CLOUD_NAME=<your-cloudinary-cloud-name>
    CLOUDINARY_API_KEY=<your-cloudinary-api-key>
    CLOUDINARY_API_SECRET=<your-cloudinary-api-secret>
    
  • You can obtain the API keys by heading to their respective websites

  1. Install the dependencies for the frontend:
cd ../client
npm install
  1. Build the frontend assets:
npm run build
  1. Start the server:
cd ../server
npm start
  1. Access the application on http://localhost:5000 in your browser.

Note

API used in the application is mine personal so if you cannot generate an image there is a possibility that API requests have reached their limit

About

An AI image generation website with the help of OpenAI api.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published