Image2Code is a cutting-edge project created for learning purposes, leveraging the power of artificial intelligence to convert images into code snippets. With a focus on simplicity and efficiency, this tool aims to streamline the process of translating visual designs into functional code.
Before you begin, ensure you have the following prerequisites:
- Node.js
- npm or yarn
- OpenAI Account: You must have an account on OpenAI to obtain an API key.
-
Clone the repository:
git clone https://github.com/Othamae/image2code.git
-
Navigate to the project directory:
cd image2code -
Install dependencies:
npm install # or yarn install -
Create a
.envfile in the root of the project with the following content:OPENAI_API_KEY=your_openai_api_key
Replace your_openai_api_key with your actual OpenAI API key.
To run the project in development mode, use the following script:
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.