As our business expands, manually tracking and sending well wishes to customers on their birthdays has become inefficient. To streamline this process, we aim to develop a Birthday Reminder App that automates the task of collecting customer information, checking for birthdays, and sending personalized emails.
The Birthday Reminder App will consist of the following components:
-
User Interface: A simple UI interface will be created to collect customers' date of birth, username, and email. This interface will provide a seamless experience for entering and managing customer data.
-
Automated Birthday Check: A cron job will be scheduled to run every day at 7am. This job will query the database to identify customers whose birthdays match the current date.
-
Email Automation: Using nodemailer, emails will be sent to birthday celebrants with personalized well wishes. The email content will be customizable, allowing for personalized messages to be sent to each customer.
To set up the Birthday Reminder App locally, follow these steps:
- Clone the repository to your local machine.
- Install the necessary dependencies using
npm install
. - Set up a MongoDB database to store customer information.
- Configure the environment variables for database connection and email platform credentials.
- Run the application using
npm start:backend
.
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express.js
- Database: MongoDB
- Email Platform: Gmail
- Additional Packages: cron, nodemailer
- Navigate to the UI interface and input customer details including date of birth, username, and email.
- Ensure that the cron job is configured to run daily at 7am to check for upcoming birthdays.
- Once the cron job identifies birthday celebrants, personalized emails will be automatically sent to them using the specified email platform.
Contributions to the Birthday Reminder App are welcome! To contribute, follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to nodemailer for providing an easy-to-use email automation solution.
- Special thanks to the team for their hard work and dedication in developing the Birthday Reminder App.
For any inquiries or support, please contact otavieokuoyo@gmail.com. We'd love to hear from you!
In the model subdirectory we have two schema definitions, both schemas are needed:
Joi schema validates requests Mongoose schema defines document structure in DB
We could have one combined schema but it's cleaner to separate concerns:
- Joi for request validation
- Mongoose for database modeling
- Joi is for requests, Mongoose for database
- Joi validates shape, Mongoose defines types
- Joi catches errors, Mongoose defines schema