This repository contains a Web App created using the MERN Stack (without MongoDB) using Express, React and Node.js.
ColourScribe is a Web App which generates colour palette based on a mood set by the user input as a prompt.
React
for the Frontend of the applicationExpress.js
used for the backendNode.js
used to handle API RequestOpenAI's Chat API (GPT-3.5-Turbo or GPT-4)
for generating the colour palette based on promptPrompt Engineering
to alter the output of the Model to our specific needs.
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.
-
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. -
Clone this repository
git clone https://github.com/raghavkorde/ColourScribe.git
-
Go to the root folder of the project
cd <path-to-project-direcotry>
-
Then execute
npm run install-all
-
To run the project, in the root directory, execute
npm start
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:
- Make sure you are in the backend directory
cd ./backend
- Generare an OpenAI API key (initial 5$ credit is added for free on new signup) form OpenAI API.
- Then create a file
.env
in the backend folder.touch .env
- 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-....>
If you want to suggest some changes / optimizations / features or even point out bugs, feel free to open an issue in the issues section.
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.