This project is a clone of the DALL-E application, built with a modern tech stack including Vite, React, Express, MongoDB, Node.js, Cloudinary, and the OpenAI API. The application allows users to generate images from textual descriptions using the OpenAI API and manage these images using Cloudinary.
- Features
- Tech Stack
- Prerequisites
- Installation
- Configuration
- Usage
- Folder Structure
- Contributing
- License
- Generate images from textual descriptions using OpenAI's API.
- Store and manage images with Cloudinary.
- Frontend built with Vite and React for fast development and performance.
- Backend built with Express and Node.js for robust server-side logic.
- MongoDB for database management.
- Frontend: Vite, React
- Backend: Node.js, Express
- Database: MongoDB
- Cloud Storage: Cloudinary
- AI Integration: OpenAI API
Before you begin, ensure you have the following installed:
- Node.js (v14 or later)
- npm or yarn
- MongoDB (local or remote)
- Cloudinary account
- OpenAI API key
-
Clone the repository
git clone https://github.com/yourusername/dalle-clone.git cd dalle-clone -
Install dependencies
- For the backend:
cd server npm install - For the frontend:
cd client npm install
-
- Backend configuration
- Create a .env file in the server directory and add the following environment variables:
MONGO_URI=your_mongo_connection_string CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret OPENAI_API_KEY=your_openai_api_key PORT=5000
- Fronedn configuration
- Create a .env file in the server directory and add the following environment variables:
VITE_API_URL=http://localhost:5000
-
- Start the backend server:
cd server npm start - Start the frontend development server:
cd client npm run dev
- Start the backend server:
-
Contributions are welcome! Please follow these steps
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -m 'Add new feature').
- Push to the branch (git push origin feature-branch).
- Open a pull request.
-
This project is licensed under the MIT License. See the LICENSE file for details.