AI Roaster is an AI-powered roasting platform that generates witty and hilarious "roasts" for team members based on their unique characteristics. This project combines a serverless backend with dynamic AI processing, voice-based interactions, and customizable roast outputs.
- 🌶 Funny and Personalized Roasts: Create tailored and hilarious roasts for team members using their characteristics and data.
- 🔥 Dynamic Roast Image Generation: Generate roast-themed images unique to each team member.
- 🌐 Web Application: A polished web interface for users to interact with the roasting experience.
- 🔗 Unique URLs for Roasts: Share roasts easily using one-click URLs.
- 🎙 Voice Output Support: Listen to your roast via Text-to-Speech (TTS) audio.
And it’s totally SERVERLESS! 😎
- Backend: Python (Flask), AWS Lambda
- Frontend: HTML, CSS, JavaScript
- Serverless Framework: AWS infrastructure setup and deployment
- Dependencies:
- Flask, Werkzeug, OpenAI API
- Boto3 for AWS interactions
- You will need the following tools:
- Python 3.10 or later
- Node.js for Serverless Framework integration
- AWS CLI configured with the required permissions
-
Create a Bucket to store assets:
- Create an S3 bucket in your AWS account to store the roast images and other assets.
- Update the
ASSET_BUCKET
value in the.env
file with the bucket name.
-
Create a Deployment Role:
The GitHub workflow uses GitHub AWS OIDC.- Create an IAM role in your AWS account for GitHub Actions.
- Update the
GITHUB_CI_ROLE
value in the.env
file (GitHub Actions will use this role to deploy the project).
-
Set Up the OpenAI API Key:
- Generate an OpenAI API Key.
- Store the key in AWS Secrets Manager.
- Update the
OPENAI_KEY_SECRET_NAME
in the.env
file with the key's secret name.
-
Set Other Environment Variables:
- Update
ASSET_BUCKET
,AWS_ACCOUNT
andREGION
in the.env
file.
- Update
To bring the roasting experience to life, you need to provide descriptions and images for your teammates. Follow the steps below to populate the database:
-
Create Roast Descriptions:
- Provide a detailed description of the person, including quirky traits, unique experiences, and anything that can serve as roast material—bonus points if you include pre-written roasts!
- Save each roast in a separate
.txt
file within thesrc/roasts
directory. - Use clear, descriptive file names (e.g.,
john_doe.txt
).
-
Add Corresponding Images:
- For each teammate, provide their image.
- Save the images in the
src/static/images/team
directory. - Use the same naming convention as the
.txt
files (e.g.,john_doe.png
orjohn_doe.jpg
).
- Set Up the Environment:
pip install poetry poetry install
- Configure environment variables: Ensure your
.env
file is set up correctly and has the correct values. - Start the Server:
python -m src.main
- Open the application in your browser at:
http://127.0.0.1:5000/
The project uses the Serverless Framework for deployment on AWS Lambda, with GitHub Actions for deploying to AWS. To deploy:
- Commit your changes to the
master
branch. - The GitHub Actions pipeline will deploy to AWS and host your website.
Ai-Roaster/
├── src/
│ ├── main.py # Flask app and API handlers
│ ├── bedrock.py # Core AI logic for finding team members and roasting
│ ├── roasts/ # Roast content files
│ ├── static/ # Frontend assets (CSS, JS, images)
│ ├── templates/ # HTML templates for the web app
├── serverless.yml # Serverless configuration
├── pyproject.toml # Python dependencies (Poetry)
├── package.json # Node.js dependencies
- Fork the repository and create a branch for your feature.
- Submit a pull request with detailed changes and test cases.
This project is licensed under the MIT License.