Code Monkey home page Code Monkey logo

notificationservice's Introduction

NotificationService

Notification service based on Spring boot

Features

  • Use dynamic templates to send notifications / SMS
  • Dynamic languages ( you can use with any language )
  • Send notification / SMS to group of people
  • Ready to work with SMS or push notification provider

Technologies Used

  • Springboot

  • RabbitMQ as a message broker

  • docker-compose for containerization

  • Tomcat Server

  • Swagger — UI for API documentation

  • Postgres database

  • SpringBoot Unit test

API Documentation

Postman Collection => Download Collection

Swagger => http://localhost:8080/swagger-ui.html

img.png

DB Schema

img.png

How to send a notification

  • first you need to create a customer POST /api/v1/customer/create

    {
      "email":"[email protected]",
      "language":"en",
      "phone_number":"123456789",
      "username":"Amr Emaish"
    }
  • second you need to create a device for customer POST /api/v1/device/{customerID}/create

    • deviceType will be iOS or Android

      {
        "deviceType" : "iOS",
        "deviceToken" : "472b07b9fcf2c2451e8781e944bf5f77cd8457c8",
        "appVersion" : "15"
      }
  • third now you can send your message POST /api/v1/notification/send

    • you should remove groud_id in case of you wan to send only for one customer

       {
          "groud_id": 1,
          "customer_id": 3,
          "type":"sms",
          "templates": {
            "en": "Hi %username% Your bus is about to reach his destination prepare yourself",
            "ar": "اهلا %username% الباص الخاص بك سوف يصل الى وجهته جهز نفسك "
          },
          "params": {
            "username_ar": "عمرو",
            "username_en": "Amr"
          }
      }

Installation

docker-compose up --build

Testing

mvn test

notificationservice's People

Contributors

amremaish avatar olx-amremaish avatar

Stargazers

Ibrahim AboElyazeed avatar

Watchers

James Cloos avatar  avatar

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.