GithubHelp home page GithubHelp logo

rzenkov / go-notify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harry-027/go-notify

0.0 0.0 0.0 588 KB

An email automation solution, written in Golang.

License: MIT License

Go 97.05% JavaScript 2.53% Dockerfile 0.17% Makefile 0.25%

go-notify's Introduction

go-notify


An email automation solution written in Golang. It facilitate users to register, send & schedule custom HTML mails for their clients.

Built using rich tech-stack:


Architecture diagram:


Arch_Diagram

DB Schema:


DB_Schema

Features Included:


  • Authentication & authorization using JWT.
  • Swagger included, built using Swago
  • Full proof auth features - signup, login, update password, forgot password, logout.
  • Cors, Helmet, Api-rate limiter included as middleware from security perspective.
  • Users can register their clients & custom HTML templates.
  • Mail scheduling (daily, weekly, monthly) using cron jobs.
  • Subscription & Payment (payment has been stubbed for now and can be replaced with any suitable payment gateway).
  • Api-server can be consumed by any client-side API, however for easy interaction - CLI (built using Cobra) has been included.

Installation & setup :-


  • Go,Docker,Docker compose & Make should be pre-installed.
  • Clone the repository: git clone https://github.com/Harry-027/go-notify.git.
  • Run the command make download (this will install go modules).
  • Create a new file .env under root directory & copy the env variables from .sample-env. (Note that mailgun env variables should be replaced with original credentials. Rest may remain untouched)
  • Run the command make setup (this will start the required docker containers - postgres, redis, apache kafka & zoo-keeper).
  • Run the command docker ps to ensure all the four containers are up & running.
  • Open a new terminal & run the command make server to spin up the api server.
  • Open a new terminal & run the command make consumer to spin up the kafka consumer.
  • Open a new terminal & run the command make cronjob to start the cron processes.
  • Open a new terminal & run the command cli-go. This will install the go-notify cli on your machine.
  • Cli is now ready to operate. Run the command go-notify --help to explore various commands.

CLI

Swagger :-


Swagger

Monitoring (using Prometheus & Grafana):-


  • Before spinning up Prometheus & Grafana for monitoring, replace the HOST_IP variable (under monitoring/prometheus/config.yml) with your machine IP.
  • Run the command make monitor to start Api-server monitoring.
  • Once the containers - Prometheus & Grafana are up, visit http://localhost:3000 on browser for Grafana dashboard.
  • Default credentials for Grafana: username - 'admin' , password - 'admin'
  • Once logged into Grafana, visit settings to select prometheus data source as target to view the dashboard.

Grafana

Load Testing :-


  • Before running load tests, replace the hostip variable value with your machine ip, under loadtesting/tests/loadtests.js
  • Run the command make load-testing to run the load tests.

LoadTesting_results

Sample for a custom HTML received mail :-


Mail

Contributing ๐Ÿป


  • Performance improvements, bug fixes, better design approaches are welcome. Please discuss any changes by raising an issue, beforehand.

Maintainer ๐Ÿ˜Ž


Harish Bhawnani Linkedin Email

License


MIT ยฉ Harish Bhawnani

go-notify's People

Contributors

harry-027 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.