/notifications

Dummy notification system

Primary LanguageTypeScript

LinkedIn


Notifications System

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contact
  6. Acknowledgments

About The Project

Toy application to simulate a Notification system (think of it like AWS SNS). In the web app, you're able to send a message by selecting a specific category/topic. It will be sent to all users subscribed to the selected category through "channels" like SMS, Email, Push notifications, etc.

To avoid complexity, both the frontend and backend projects are contained in this same repository.

Keep in mind the following:

  • There are no real users here. They are mocked and stored in a JSON file.
  • No real notifications are being sent through any kind of service. We randomly simulate sending them and succeeding or failing in the process.

(back to top)

Built With

  • React
  • Bulma
  • TypeScript
  • NodeJS
  • Express
  • Docker

(back to top)

Getting Started

Prerequisites

  • Make sure you have Docker and Docker Compose installed on your machine. You can follow the instructions here https://www.docker.com/ to set it up.

Installation

  1. Clone the repo
    git clone https://github.com/geratarra/notifications.git
  2. In your terminal, get into the root folder.
    cd notifications
  3. Run docker compose up. This should build and run 2 services. One for the SPA application and another one for allocating the backend project.

(back to top)

Usage

Once you have your Docker containers up and running, you should be able to access http://localhost:3000 in your browser. You'll see the main view, Publish, where you can select a message category and write a message. Once you submit the form, a notification will be sent to all users subscribed to the selected category. There are different "channels" through which the notification will be sent.

The Logs page is a simple view where you can see a list of notifications sent through different channels and users, along with the corresponding status.

(back to top)

Roadmap

  • Add more test coverage, either unit, integration, etc.
  • Set up Docker watch to automatically update and preview the running Compose services as the code is edited and saved.
  • Add a new service for allocating the database.
  • It would be probably a good idea to introduce Worker Threads to "divide and conquer" the task of sending a notification through multiple channels.
  • Currently, if there are no users to send a message or if there are users but none of them has any channel where to receive a notification, the API response will resolve successfully. This is probably ok but it would be good to at least respond with a more detailed message. Another alternative would be to respond not with a 200 HTTP status code.

Contact

Get to know me

Project Link: https://github.com/geratarra/notifications

(back to top)

Acknowledgments

(back to top)