Giter VIP home page Giter VIP logo

serverless-notifications's Introduction

Serverless Notifications Using Azure Functions + Twilio + SendGrid

The solution implements a serverless notification framework. Azure functions are used to archive the serverless architecture. Twilio and sendgrid are used as the notification providers. Azure storages tables are used to store the application configurations. Azure Queue storage was used for internal communication of the functions. One single POST endpoint was provided to send out the notifications HINT: /api/notifications.

High-level architecture diagram

alt text

What's included:

Table of Content

Quick Start

After setting up your local DEV environment, you can clone this repository and run the solution. Make sure to configure the local.settings.json with the provided setting values. If you are using a Azure storage account replace AzureWebJobsStorage value with storage account connection string.

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet"
  }
}

Prerequisites

You'll need the following tools:

Development Environment Setup

First clone this repository locally.

  • Install all of the the prerequisite tools mentioned above.
  • Connect your Azure storage account into Azure storage explore link Or use default emulator storage account.
  • Create Configurations table in table storage
  • Add below Table storage configurations to the created table

alt text

Build and run from source

With Visual studio: Open up the solutions using Visual studio.

  • Restore solution nuget packages.
  • Rebuild solution once.
  • Run the solution.
  • POST Endpoint

Sample SMS notification request

{
  "body": "{\"Id\":\"ed32ef8d-1b19-40cc-915b-b8ff1b4d6ff0\",\"FromNumber\":null,\"ToNumber\":\"+NUMBER_WITH_COUNTRY_CODE\",\"MessageBody\":\"Hello there\"}",
  "notificationType": 1,
  "isScheduled": false,
  "scheduledDateTime": "2021-04-30T00:00:00"
}

License

Licensed under the MIT license.

serverless-notifications's People

Contributors

gayankanishka avatar

Watchers

 avatar

serverless-notifications's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.