A simple notification service which can send email notification to users. This notification service is developed with event-driven pattern and written in Golang.
Table of Contents
This project is a simple notification service implemented in Golang, designed to efficiently deliver notifications to users using an event-driven pattern. This service is built with event drivent architecture where it consumes notification events from message queue/bus, ensuring timely and reliable delivery of notifications. In the example, the notification service focuses on sending emails to users, but it can be easily extended to support other notification methods.
In this example, we demonstrate a user registration which needs an email verification process. The flow is as follow:
- A service, for example, user management service receives a user registration request.
- The user management service generates a OTP code for email verification and wants to send it to the user’s registered email
- The user management service publishes an event to message broker alongside the information to be sent
- The event is queued in the message broker and waits to be consumed
- The Notification Service consume the event and proceed the event
- The Notification service send an email to the user
The overall architecture is shown on the image below:
- Golang
- Make
- Redis
- PostgreSQL
- RabbitMQ
- Clone the repo
git clone https://github.com/ardimr/go-project-template
- Install Go packages
go mod install
- Run the program
make run_app
{
"fullname" : "John Doe",
"email" : "john.doe@mail.com",
"password" : "john.doe#wir321"
}
{
"email" : "john.doe@mail.com"
}
Check the email's inbox and it should have email like this
- Add authentication and authorization
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Rizky Ardi Maulana - rizkyardimaulana@gmail.com
Project Link: *

