Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arjunsumarlan/birthday-message-app
App to send birthday messages to users at their local time
https://github.com/arjunsumarlan/birthday-message-app
Last synced: 28 days ago
JSON representation
App to send birthday messages to users at their local time
- Host: GitHub
- URL: https://github.com/arjunsumarlan/birthday-message-app
- Owner: arjunsumarlan
- License: mit
- Created: 2024-05-09T04:25:40.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-05-10T08:18:57.000Z (6 months ago)
- Last Synced: 2024-05-11T07:44:03.220Z (6 months ago)
- Language: TypeScript
- Size: 161 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Birthday Message Scheduler App
This project is a Birthday Message Scheduler application built using Node.js, Express, MongoDB, and Axios. It sends automatic birthday messages to users at 9 AM their local time, based on the user's location and birthday.
## Features
- REST API to create, update, and delete users.
- Schedules and sends customized birthday messages.
- Uses MongoDB for storing user data.
- Handles time zones using moment-timezone.## Prerequisites
Before you begin, ensure you have met the following requirements:
- Node.js installed (version 12.x or above)
- MongoDB installed and running locally or accessible via a network connection
- npm or yarn installed## Installation
To install the project, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/arjunsumarlan/birthday-message-app.git
cd birthday-message-app
```
2. Install the dependencies:
```bash
npm install
```## Configuration
Create a `.env` file in the root directory based on the `.env.example` template. You can start by copying the example file:
```bash
cp .env.example .env
```Update the `.env` file with the necessary details. Here are the key environment variables you need to set:
* **PORT**: The port on which the server will run (default is 3000).
* **MONGO_URI**: Your MongoDB URI.
* **EMAIL_SERVICE_URL**: URL to the email service to send birthday messages.Example of `.env` contents:
```plaintext
PORT=3000
MONGO_URI=mongodb://localhost:27017/birthdayApp
EMAIL_SERVICE_URL=https://youremailservice.com
```## Usage
To run the application, use the following command:
```bash
npm start
```
This will start the server on the port specified in your `.env` file (default is 3000).## API Endpoints
* `POST /user`: Create a new user
* Body parameters: `firstName`, `lastName`, `email`, `birthday`, `location`
* `PUT /user/:id`: Update an existing user
* Body parameters: `firstName`, `lastName`, `email`, `birthday`, `location`
* `DELETE /user/:id`: Delete an existing user## Testing
To run the tests, use the following command:
```bash
npm test
```
This command will execute all tests written in the `tests/` directory.## Contributing
Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.
## License
This project is [MIT licensed](https://github.com/arjunsumarlan/birthday-message-app/blob/master/LICENSE).## Contact
If you have any questions, please contact me at [[email protected]]([email protected]).