Skip to content

lucas-eedu/notification-service

Repository files navigation


Twilio Sendgrid

Node.js Version TypeScript Version Test Coverage

Notification Service

The Notification Service is an application developed in Node.js with the aim of providing a solution for sending notifications via email and SMS. It uses the SendGrid platforms to send emails and Twilio to send SMS messages. The project was built on technologies: Express, TypeScript and MongoDB.

Functionalities

notification-service
├── LICENSE
├── README.md
├── jest.config.js
├── package-lock.json
├── package.json
├── src
│   ├── config
│   │   ├── logger.ts
│   │   └── mongoose.ts
│   ├── controller
│   │   ├── email.controller.ts
│   │   └── sms.controller.ts
│   ├── interfaces
│   │   ├── email.interface.ts
│   │   └── sms.interface.ts
│   ├── middlewares
│   │   └── morganMiddleware.ts
│   ├── models
│   │   ├── email.model.ts
│   │   └── sms.model.ts
│   ├── repositories
│   │   ├── email.repository.spec.ts
│   │   ├── email.repository.ts
│   │   └── sms.repository.ts
│   ├── routes
│   │   ├── email.routes.ts
│   │   ├── main.routes.ts
│   │   └── sms.routes.ts
│   ├── services
│   │   ├── email
│   │   │   ├── send.email.service.spec.ts
│   │   │   ├── send.email.service.ts
│   │   │   ├── update.email.service.spec.ts
│   │   │   └── update.email.service.ts
│   │   └── sms
│   │       └── send.sms.service.ts
│   └── validations
│       ├── email.validator.schema.ts
│       └── sms.validator.schema.ts
└── tsconfig.json

System Requirements

Before running the project, make sure you have the following tools installed:

  • Node.js
  • MongoDB

Installation

  1. Clone the repository to your local environment:
git clone [email protected]:lucas-eedu/notification-service.git
  1. Navigate to the project directory:
cd notification-service
  1. Install project dependencies using npm:
npm install
  1. Configure the environment variables: Copy the .env.example file to .env in the project root and set the following variables:
APP_PORT=3000
APP_URL=http://localhost
APP_STAGE="development"

MONGODB_URI=MongoDBDatabaseURL

SENDGRID_API_KEY=SuaChaveAPIdoSendGrid

TWILIO_SID=YourSendGridAPIKey
TWILIO_AUTH_TOKEN=YourTwilioAuthenticationToken
TWILIO_PHONE=YourPhoneNumberTwilio

Replace the above values with your MongoDB authentication and configuration data.

  1. Start the server:
npm start

The server will be available at http://localhost:3000.

Tests

npm test

Unit tests for email and SMS services, as well as integration tests for controllers.

Contributors

Contributions are welcome! If you encounter any issues, have an idea for a new feature, or want to improve existing code, feel free to open an issue or submit a PR request. Let's build this project together and make it even better!

Contacts

Linkedin: https://www.linkedin.com/in/lucas-eduardo/
E-mail: [email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published