A delightful web application that delivers daily jokes and humor to brighten your mornings through personalized email subscriptions.
- Personalized joke topics selection
- Multi-language support
- Customizable delivery time
- Text-to-Speech audio generation
- Interactive-particle.js background
- Responsive design
- Frontend: HTML, CSS, JavaScript (with GSAP animations)
- Backend: Node.js, Express
- Database: MongoDB
- APIs:
- OpenAI GPT for joke generation
- 11Labs for Text-to-Speech
- SendGrid for email delivery
-
Clone the repository
-
Install dependencies:
cd app npm install -
Create a
.envfile in the/appdirectory with the following:MONGO_URI=your_mongodb_connection_string OPENAI_API_KEY=your_openai_api_key ELEVEN_LABS_API_KEY=your_11labs_api_key ELEVEN_LABS_VOICE_ID=your_voice_id SENDGRID_API_KEY=your_sendgrid_api_key FROM_EMAIL=your_verified_sender_email PORT=3000 -
Start the server:
node server.js
-
Visit http://localhost:3000 in your browser
- Users select their preferred joke topics and delivery time.
- A cron job runs hourly to check for scheduled deliveries.
- For each scheduled delivery:
- Generates personalized jokes using OpenAI
- Converts text to speech using 11Labs
- Sends email with audio attachment via SendGrid
- /www – Static frontend files
- /app/src
- /config – Environment and database configuration
- /controllers – Request handlers
- /models – MongoDB schemas
- /routes – API routes
- /services – External API integrations
- /jobs – Scheduled tasks
Feel free to submit issues and pull requests.