/ColourScribe

ColourScribe as the name suggests is a full stack web application which uses OpenAI's Chat API to generate a colour palette based on the mood set by the user through a prompt. It is built using the MERN Stack.

Primary LanguageJavaScript

ColourScribe

This repository contains a Web App created using the MERN Stack (without MongoDB) using Express, React and Node.js.

What is ColourScribe?

ColourScribe is a Web App which generates colour palette based on a mood set by the user input as a prompt.

What are technologies used to build this web app?

  • React for the Frontend of the application
  • Express.js used for the backend
  • Node.js used to handle API Request
  • OpenAI's Chat API (GPT-3.5-Turbo or GPT-4) for generating the colour palette based on prompt
  • Prompt Engineering to alter the output of the Model to our specific needs.

How to setup this project locally?

The project is setup in the following format:

project/
  |- frontend/
  |    |- package.json
  |    |- ...
  |
  |- backend/
  |    |- package.json
  |    |- ...
  |
  |- package.json (root)

But the installation of node_modules in frontend and backend can be done simply by running npm install in the root directory.

  1. Make sure you have setup .env file in the backend directory with your openai api key stored in a variable OPENAI_API_KEY. For more details check the next section.

  2. Clone this repository

     git clone https://github.com/raghavkorde/ColourScribe.git
  3. Go to the root folder of the project

    cd <path-to-project-direcotry>
  4. Then execute

    npm run install-all
  5. To run the project, in the root directory, execute

    npm start

Setting up .env file (Environment Variables)

The .env file, short for "environment file," is used to store configuration variables and sensitive information that are specific to an application's environment.

Follow the steps to set-up a .env file for this project:

  1. Make sure you are in the backend directory
    cd ./backend
  2. Generare an OpenAI API key (initial 5$ credit is added for free on new signup) form OpenAI API.
  3. Then create a file .env in the backend folder.
    touch .env
  4. Open it in VS Code or a text-editor then create an environment variable and set its value to the API-Key as obtained above.
    OPENAI_API_KEY=<your-api-key-Eg:sk-....>
    

How can I suggest new features?

If you want to suggest some changes / optimizations / features or even point out bugs, feel free to open an issue in the issues section.

How Can I contribute to this project?

Currently, this project has been created just as a fun project to showcase my skills and fluency the technologies used for building this web app. If you still want to contribute feel free to create a pull request after opening an Issue.