ImagiNUTS is a repository containing a client-side component for an OpenAI-based image generation project. Users can provide a prompt, and the system will generate images based on that prompt.
To run this project, follow these steps:
Before you begin, make sure you have the following installed:
-
Clone the repository to your local machine:
git clone https://github.com/Steffany-Martins/ImagiNUTS.git
-
Change to the project directory:
cd ImagiNUTS
-
Install project dependencies:
npm install # or yarn install
Before running the project, you need to configure your OpenAI API key. You can provide your API key either via environment variables or as part of the project's configuration.
Create a .env.local
file in the project root directory and add your OpenAI API key:
API_KEY=your-api-key-here
In the Form.tsx
file, make sure the publicRuntimeConfig
object is set up correctly:
const apiKey = (typeof publicRuntimeConfig !== 'undefined' && publicRuntimeConfig ? publicRuntimeConfig.apiKey : process.env.API_KEY);
Once you have configured your API key, you can run the project locally using one of the following commands:
-
Development mode:
npm run dev # or yarn dev
-
Build and start in production mode:
npm run build npm start # or yarn build yarn start
The project should now be running locally at http://localhost:3000
.
- React - JavaScript library for building user interfaces.
- Next.js - A React framework for server-rendered applications.
- OpenAI API - Used for generating images based on user prompts.
- Tailwind CSS - A utility-first CSS framework.
- dotenv - Used for managing environment variables.
- Other dependencies as listed in the
package.json
file.
This project is licensed under the MIT License - see the LICENSE file for details.