/auth-plus-notification

System for all kind of notifications as Email, SMS, Whatsapp, Telegram, Push Notification

Primary LanguageGoGNU General Public License v3.0GPL-3.0

Auth+ Notification

Coverage

Test Coverage

Codacy Badge

This project it's a sample for notification system. In this application you cand send:

  • Email (Sendgrid, Mailgun, Onesignal)
  • SMS (Amazon SNS, Onesignal)
  • Push Notification (Firebase, Onesignal)
  • Whatsapp (Twilio)
  • Telegram (Telegram API)

Pré-requisite

  • Docker v20.10.11
  • Docker Compose v1.28.4
  • Go v1.19

Enviroment Variables

Please follow example.env

Commands with Docker Setup

# make test on the same condition where it's executed on CI
make test

# developer on docker
make dev

# prune for container, volumes and image
make clean/docker 

Commands with Local Setup

# install dependecies on local
go mod download

# run server on local
go run ./cmd/http_server.go

# run test
go test ./... -v -coverpkg=./... -coverprofile=c.out

# take a look on coverage file in html after test
go tool cover -html=c.out -o cover.html

# run lint
$HOME/go/bin/revive -formatter friendly ./...

How to update packages

go get -u all
go mod tidy

TODO

Business

  • Add Template system
  • Add Queue to retry notifications

Development

  • Add mutation testing with Gremlins
  • Add load testing with k6

Security

  • Add grype for security scan (SAST)
  • Add OWASP ZAP to scan vulnerabilities (DAST)