CoverLetterGenerator is a web application that helps users generate professional cover letters based on their input. The app is built using React for the frontend and Express for the backend.
- User-friendly interface to input job position, company name, skills, company values, and job listing.
- Generates a concise and professional cover letter using OpenAI's GPT-3.5 API.
- Option to copy the generated cover letter to the clipboard for easy use.
Ensure you have the following installed on your machine:
- Node.js (version 14.x or higher)
- npm (Node Package Manager)
-
Clone the repository:
git clone [email protected]:ryanhood10/BlogPostWriter.git cd BlogPostWriter
-
Install dependencies for the client and server:
cd client npm install cd ../server npm install
-
Obtain an OpenAI API key:
Go to OpenAI and sign up for an API key. Once you have your API key, create a
.env
file in theserver
directory and add your API key:OPENAI_API_KEY=your_openai_api_key
-
** Change the handleGenerateCoverLetter function to call Local Host** In the MainPage.jsx, comment out line 44 and uncomment line 45; So that we are calling localhost instead of the deployed application.
// "https://cover-letter-generator-ai-b7323a56ca78.herokuapp.com/completions", options ); "http://localhost:3001/completions", options );
-
Start the frontend (React) server:
cd client npm start
-
Start the backend (Express) server:
cd ../server npm start
Once both servers are running, open your browser and navigate to http://localhost:3000
. Follow these steps to generate a cover letter:
- Fill in the prompts with your job position, company name, relevant skills, company values, and the job listing.
- Click on the "Generate Cover Letter" button.
- The generated cover letter will appear below the form. You can then copy it to the clipboard for use in your job application.
To deploy the application to Heroku, follow these steps:
-
Create a Procfile in the root of your project:
web: cd server && npm install && npm run start
-
Set up the Heroku remote:
heroku create your-app-name git push heroku main
-
Configure environment variables:
Ensure that you set your OpenAI API key and any other necessary environment variables on Heroku.
heroku config:set OPENAI_API_KEY=your_openai_api_key
-
Deploy the application:
git push heroku main
Contributions are welcome! Please open an issue or submit a pull request for any changes.
This project is licensed under the MIT License - see the LICENSE file for details.