Giter Club home page Giter Club logo

reminder-service's Introduction

Version Travis Badge MIT License PR's Welcome Code of Conduct

Overview

Reminder Service manages CRUD operations on the reminder entity. Clients can interact with API endpoints provided by this service to perform these operations.

  • This service interfaces with PostgreSQL database to store the reminders created by various users.
  • The most recent state of the reminder entity is maintained in the reminders database.
  • All the operations that are being performed on the reminder entity by the user are packed as an event-object and published to an AWS SNS topic which then forwards the event-message to the AWS SQS event-queue from where this event-message is consumed by the event-service.

Operating Instructions

Fork

  • Fork this repository
    • "Forking" adds a copy of adisakshya/reminder-service repository to your GitHub account as https://github.com/YourGitHubUserName/reminder-service
  • Or you can download or clone this repository
    • You can clone the repository executing below command in a location of your choice in your system
    • $ git clone https://github.com/adisakshya/reminder-service.git
  • Source code for the reminder-service can be found at /src
  • All CI/CD resources are located in .travis directory
  • requirements.txt contain the python packages required for the CI/CD process
  • .env.example is a template env file

Local Development

Prerequisites

  • Make sure you have
    • Installed Docker (when running using docker)
    • PostgreSQL reminders-database running and is accessible using host-url, username and password
    • AWS SNS event-topic setup and is accessible using ARN

Using Docker

  • In source directory src/ run the following command
    • $ yarn install - install required dependencies
    • $ yarn build - build source code
    • $ yarn test - run test (optional)
    • $ docker build -t reminder-service . - build docker image
  • With successful execution of above commands you will have a docker-image for the reminder-service
  • The docker-image can be run using the following command
    • docker run -p 3000:3000 --env-file ./.env reminder-service
  • On successful start, the API documentaion (built using Swagger) for the service will be accssible on http://<DOCKER_HOST>:3000/docs

Without Docker

  • Replace the env-variables at /src/src/common/api-config.service.ts
  • Use the following commands to start the service
    • $ yarn install - install required dependencies
    • $ yarn test - run test (optional)
    • $ yarn start - start reminder-service
  • On successful start, the API documentaion (built using Swagger) for the service will be accssible on http://localhost:3000/docs

Architecture

Reminder Service Architecture Fig 1 - Reminder Service Architecture

Clients can interact with the service using HTTP/HTTPs requests (interfaced by API Gateway). The reminder-service module has 3 components namely:

  1. Reminder Controller - Handles incoming requests and returning responses to the client
  2. Reminder Service - Defines the logic to serve incoming requests
  3. Event Module - Module to handle publishing of events to AWS SNS event-topic

CI/CD and Deployment Guide

A brief description of the deployment strategy is described in documentation of continuous-improvement project.

Contributing

There are multiple ways to contribute to this project, read about them here.

License

All versions of the app are open-sourced, read more about this LICENSE.

reminder-service's People

Contributors

adisakshya avatar dependabot[bot] avatar utkarshchauhan021 avatar

Watchers

 avatar  avatar

reminder-service's Issues

Ansible playbook for automated deployment to AWS EKS

There is a need for an ansible playbook that can be run as part of the CI/CD process once the desired state is met. The playbook can use the k8s-YML files in this git-repository from /kubernetes directory and deploy the service on an active AWS EKS cluster in a specific namespace (development or production -- that is defined in the YML file) based on the branch on which the build is triggered.

Transform due-date input

Reminder-notifications are scheduled every minute. The due-date must not consider seconds in the ISO date string rather the seconds/milliseconds field should be set to zero before creating or updating a reminder.

Handling reminders with passed due-dates and notify-offset

Presently any valid date will be accepted as an input to the due date for the reminder-notification, even if the input due date was in the past (relative to the system). As the sole purpose of creating reminders is to get a notification, it doesn't benefit in any way to schedule a notification on a date that has already passed.

The API response must be a suitable error-message for past due-date input while creating or updating a reminder.

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.