AI Roast Generator is a fun web application that generates personalized roasts based on user input. It uses advanced AI models to craft witty, humorous, and sometimes savage responses. The app supports multiple languages and allows users to customize the roast's tone and length.
- Personalized Roasts: Enter your name and a fun fact, and let the AI do the rest.
- Language Support: Generate roasts in English, Spanish, French, and Vietnamese.
- Advanced Settings: Adjust roast level, humor level, and response length.
- Interactive UI: A sleek and responsive interface for a seamless experience.
- Localization: Dynamic UI updates based on the selected language.
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express.js
- AI Integration: Gemini API
- Environment Management: dotenv
- HTTP Requests: Axios
- Node.js (v16 or higher)
- npm or pnpm installed
- A Gemini API key
-
Clone the repository:
git clone https://github.com/dadadadas111/ai-roast-generator.git cd ai-roast-generator -
Install dependencies:
pnpm install
-
Create a
.envfile in the root directory and add your API key:GEMINI_API_KEY=your-gemini-api-key -
Start the server:
pnpm start
-
Open your browser and navigate to:
http://localhost:3000
-
public/: Contains static files like HTML, CSS, JavaScript, and localization data.index.html: Main HTML file for the app.style.css: Stylesheet for the app.script.js: Frontend logic for interacting with the backend and updating the UI.localization.json: Translations for supported languages.
-
server.js: Backend logic for handling API requests and communicating with the Gemini API. -
.env: Environment variables for the API key (not included in the repository). -
package.json: Project metadata and dependencies. -
pnpm-lock.yaml: Lockfile for dependency management.
- Open the app in your browser.
- Enter your name and a fun fact in the input box.
- Select your preferred language from the dropdown.
- Click "Roast Me" to generate a roast.
- Use the "Advanced Settings" button to customize the roast level, humor level, and response length.
- Enjoy the roast and share it with your friends!
The app supports the following languages:
- English (
en) - Spanish (
es) - French (
fr) - Vietnamese (
vi)
To add more languages:
- Update the
localization.jsonfile with translations for the new language. - Add the language option in the
index.htmldropdown.
Handles the roast generation logic with advanced AI models.
-
Error: "Gemini API error"
Ensure yourGEMINI_API_KEYis valid and correctly set in the.envfile. -
Localization not working
Check thelocalization.jsonfile for syntax errors or missing translations. -
Server not starting
Ensure all dependencies are installed and Node.js is properly set up.
Contributions are welcome! Feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy roasting responsibly! 🔥