{"id":20655051,"url":"https://github.com/harry-027/go-notify","last_synced_at":"2025-08-20T10:31:48.802Z","repository":{"id":40487954,"uuid":"316553275","full_name":"Harry-027/go-notify","owner":"Harry-027","description":"An email automation solution, written in Golang.","archived":false,"fork":false,"pushed_at":"2023-03-14T21:55:11.000Z","size":5688,"stargazers_count":194,"open_issues_count":1,"forks_count":21,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-12T04:42:19.139Z","etag":null,"topics":["apache-kafka","cobra","go","gofiber","golang","grafana","k6","postgres","prometheus","redis"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Harry-027.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-11-27T16:42:14.000Z","updated_at":"2024-10-12T07:27:44.000Z","dependencies_parsed_at":"2024-01-14T04:45:07.802Z","dependency_job_id":"9b4dcd98-fb75-45a2-9890-14adcc7be3ed","html_url":"https://github.com/Harry-027/go-notify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-027%2Fgo-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-027%2Fgo-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-027%2Fgo-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-027%2Fgo-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Harry-027","download_url":"https://codeload.github.com/Harry-027/go-notify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230415318,"owners_count":18222158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-kafka","cobra","go","gofiber","golang","grafana","k6","postgres","prometheus","redis"],"created_at":"2024-11-16T18:08:41.593Z","updated_at":"2024-12-19T10:09:11.509Z","avatar_url":"https://github.com/Harry-027.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-notify\n---\nAn email automation solution written in [Golang](https://golang.org/).\nIt facilitate users to register, send \u0026 schedule custom HTML mails for their clients.\n\n## Built using rich tech-stack:\n---\n* Api-server built using [Go-fiber](https://gofiber.io/).\n* [Apache Kafka](https://kafka.apache.org/) as a message broker.\n* [Postgres](https://www.postgresql.org/) as database.\n* [Redis](https://redis.io/) as cache.\n* Client CLI built using [Cobra](https://github.com/spf13/cobra).\n* [Mailgun](https://www.mailgun.com/) as Email service.\n* [K6](https://k6.io/) for load testing.\n* [Prometheus](https://prometheus.io/) \u0026 [Grafana](https://grafana.com/) for Api-server monitoring.\n\n## Architecture diagram:\n---\n\n![Arch_Diagram](https://github.com/Harry-027/go-notify/blob/master/snapshots/system_diagram.png \"Arch_Diagram\")\n\n## DB Schema:\n---\n\n![DB_Schema](https://github.com/Harry-027/go-notify/blob/master/snapshots/dbSchema.PNG \"DB_Schema\")\n\n## Features Included:\n---\n* Authentication \u0026 authorization using [JWT](https://jwt.io/).\n* Swagger included, built using [Swago](https://github.com/swaggo/swag)\n* Full proof auth features - signup, login, update password, forgot password, logout.\n* Cors, Helmet, Api-rate limiter included as middleware from security perspective.\n* Users can register their clients \u0026 custom HTML templates.\n* Mail scheduling (daily, weekly, monthly) using cron jobs.\n* Subscription \u0026 Payment (payment has been stubbed for now and can be replaced with any suitable payment gateway).\n* Api-server can be consumed by any client-side API, however for easy interaction - CLI (built using [Cobra](https://github.com/spf13/cobra)) has been included.\n\n## Installation \u0026 setup :-\n---\n* Go,Docker,Docker compose \u0026 Make should be pre-installed.\n* Clone the repository: `git clone https://github.com/Harry-027/go-notify.git`.\n* Run the command `make download` (this will install go modules).\n* Create a new file .env under root directory \u0026 copy the env variables from .sample-env.\n  (Note that mailgun env variables should be replaced with original credentials. Rest may remain untouched)\n* Run the command `make setup` (this will start the required docker containers - postgres, redis, apache kafka \u0026 zoo-keeper).\n* Run the command `docker ps` to ensure all the four containers are up \u0026 running.\n* Open a new terminal \u0026 run the command `make server` to spin up the api server.\n* Open a new terminal \u0026 run the command `make consumer` to spin up the kafka consumer.\n* Open a new terminal \u0026 run the command `make cronjob` to start the cron processes.\n* Open a new terminal \u0026 run the command `cli-go`. This will install the go-notify cli on your machine.\n* Cli is now ready to operate. Run the command `go-notify --help` to explore various commands.\n\n![CLI](https://github.com/Harry-027/go-notify/blob/master/snapshots/cli_snapshot.PNG \"CLI\")\n\n## Swagger :-\n---\n* Once the server starts listening on port 3001, visit http://localhost:3001/swagger/ on browser for swagger definition.\n\n![Swagger](https://github.com/Harry-027/go-notify/blob/master/snapshots/swagger_snapshot.PNG \"Swagger\")\n\n## Monitoring (using Prometheus \u0026 Grafana):-\n---\n* Before spinning up Prometheus \u0026 Grafana for monitoring, replace the HOST_IP variable (under monitoring/prometheus/config.yml) with your machine IP.\n* Run the command `make monitor` to start Api-server monitoring.\n* Once the containers - Prometheus \u0026 Grafana are up, visit http://localhost:3000 on browser for Grafana dashboard.\n* Default credentials for Grafana: username - 'admin' , password - 'admin'\n* Once logged into Grafana, visit settings to select prometheus data source as target to view the dashboard.\n\n![Grafana](https://github.com/Harry-027/go-notify/blob/master/snapshots/grafana.PNG \"Grafana\")\n\n## Load Testing :-\n---\n* Before running load tests, replace the hostip variable value with your machine ip, under loadtesting/tests/loadtests.js\n* Run the command `make load-testing` to run the load tests.\n\n![LoadTesting_results](https://github.com/Harry-027/go-notify/blob/master/snapshots/loadTestingResults.PNG \"LoadTesting_results\")\n\n## Sample for a custom HTML received mail :-\n---\n\n![Mail](https://github.com/Harry-027/go-notify/blob/master/snapshots/mailSample.PNG \"Mail\")\n\n# Contributing :beers:\n---\n* Performance improvements, bug fixes, better design approaches are welcome. Please discuss any changes by raising an issue, beforehand.\n\n# Maintainer :sunglasses:\n---\n[Harish Bhawnani Linkedin](https://www.linkedin.com/in/harish-bhawnani-86728457)\n[Email](harishmmp@gmail.com)\n\n## License\n---\n[MIT](LICENSE) © Harish Bhawnani\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharry-027%2Fgo-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharry-027%2Fgo-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharry-027%2Fgo-notify/lists"}