This is a web application built using the MERN (MongoDB, Express.js, React.js, Node.js) stack that generates images using OpenAI's GPT-3 API.
- Features
- Front-end Technologies
- Back-end Technologies
- Installation
- Setup
- Run
- Usage
- Demo
- Contributing
- Users can input a text prompt
- The application sends the prompt to the OpenAI GPT-3 API
- The API generates an image based on the prompt
- The image is store in the database
- The image is displayed to the user
- Images can download
- Images can remove from the gallery
- React: front-end library
- Tailwind CSS: ui development
- Vite: fast and optimized development
- Node.js: javascript runtime
- Express: back-end framework
- MongoDB: database
- Cloudinary: manage images
- OpenAI API: generate images
- Clone the repository:
git clone https://github.com/devramod/art-generator.git
- Install dependencies:
npm install
- Create a .env file in the client directory with the following variables
VITE_SERVER_BASE_URL = http://localhost:8080
- Create a .env file in the server directory with the following variables:
MONGODB_URL = "mongodb+srv://ram5sasanga:UNOwafQGgktjSBJm@cluster0.ofprsoi.mongodb.net/?retryWrites=true&w=majority"
OPEN_API_KEY = "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"
CLOUDINARY_CLOUD_NAME = "dxktflojc"
CLOUDINARY_API_KEY = "713374197398355"
CLOUDINARY_API_SECRET = "z9IEYrBq_fRL6rz2DabiNFKhtNk"
- Run the server:
npm start
- Run the client:
npm run dev
- Click "Create" button in the header
- Enter a name in the input field
- Enter a text prompt or click "Suprise me" button in the input field
- Click the "Generate Image" button
- Wait for the image to be generated and displayed
- Click "Sharing with the commiunity"
- Wait for the navigation to homepage
- Image display in the gallery
- This application is deployed on Render.
- Please visit this link: https://client-kln8.onrender.com
Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch for your feature or bug fix
- Commit your changes
- Push your branch to your fork
- Create a pull request