Difficulty
intermediate
Average duration
4 hrs
Technologies
Javascript
React.js
Generative AI
prompt-engineer
Difficulty
intermediate
Average duration
4 hrs
Technologies
Javascript
React.js
Generative AI
prompt-engineer
Do not clone this repository because we are going to be using a different template.
We recommend opening the react template
using a provisioning tool like Codespaces (recommended) or Gitpod. Alternatively, you can clone the GitHub repository on your local computer using the git clone
command.
This is the repository you need to open or clone:
https://github.com/4GeeksAcademy/react-hello
⚠ You will need to have Node.js installed if you do it locally, but all of that is already installed on Codespaces or Gitpod.
Example:
1const handleGenerateLogo = async ({ companyName, industry, style }) => { 2 const prompt = `Create a detailed description of a logo for a company named "${companyName}", operating in the "${industry}" industry. The logo should have a "${style}" style.`; 3 4 try { 5 const response = await fetch('https://api.openai.com/v1/engines/text-davinci-003/completions', { 6 method: 'POST', 7 headers: { 8 'Authorization': `Bearer YOUR_OPENAI_API_KEY`, 9 'Content-Type': 'application/json', 10 }, 11 body: JSON.stringify({ 12 prompt: prompt, 13 max_tokens: 150, 14 n: 1, 15 stop: null, 16 temperature: 0.7, 17 }), 18 }); 19 20 const data = await response.json(); 21 const description = data.choices[0].text.trim(); 22 setLogoDescription(description); 23 } catch (error) { 24 console.error('Error generating logo description:', error); 25 } 26};
Note: Remember to replace
'YOUR_OPENAI_API_KEY'
with your actual OpenAI API key.
Logo Variations: Allow users to generate multiple logo descriptions with different styles or themes by modifying the prompt.
Styling: Enhance your app's appearance using CSS or styling libraries like Bootstrap or Material-UI.
Save Descriptions: Implement functionality to save or download the generated logo descriptions for future reference.
User Accounts: Add a user authentication system so users can save their logo ideas and access them later.
Error Handling: Add robust error handling to manage API errors, network issues, or invalid inputs gracefully.
Responsive Design: Ensure your app looks good on various screen sizes by implementing responsive design practices.
Explore different enhancements to make your logo generator app more interactive and visually appealing!
Difficulty
intermediate
Average duration
4 hrs
Technologies
Javascript
React.js
Generative AI
prompt-engineer
Difficulty
intermediate
Average duration
4 hrs
Technologies
Javascript
React.js
Generative AI
prompt-engineer
Difficulty
intermediate
Average duration
4 hrs
Technologies
Javascript
React.js
Generative AI
prompt-engineer
Difficulty
intermediate
Average duration
4 hrs
Technologies
Javascript
React.js
Generative AI
prompt-engineer
Difficulty
intermediate
Average duration
4 hrs
Technologies
Javascript
React.js
Generative AI
prompt-engineer
Difficulty
intermediate
Average duration
4 hrs
Technologies
Javascript
React.js
Generative AI
prompt-engineer
In order to prepare better for completing this exercises, we suggest the following materials