This is a notification service that push notifications via Firebase Cloud Message
.
It is built using Go (Fiber and gRPC).
- Go 1.20
- Fiber (v2)
- gRPC
- Firebase Cloud Message
- MongoDB
- RabbitMQ
- Redis
- Docker
- Send notification to many devices of a user
- Send campaign notification to many users
- Get notification list of a user
- Get notification detail
- Mark notification as read
- Mark all notifications as read
- Delete all notifications
- [Admin] Health check and metrics
- Clone this repository.
- Assure that you have run MongoDB, RabbitMQ, and Redis and you have the firebase config file.
- Update your config in
config/config.yml
and put the firebase config file in same directory. - Having two way to run this service:
- Run using
Dockerfile
to build the image and run the container (expose port 5020 and 6020) - Run using
Makefile
(recommended)make buildw
to build the service for windowsmake buildl
to build the service for linux- And use
make runw
ormake runl
to run the service
- Run using
- RestAPI port: 5020
- gRPC port: 6020
- API URL:
/api/v1/notifications/*
- Proto file is located in
/internal/grpc-service/notificationGrpc/notification_service.proto
- Put
x-api-key: 123123
in metadata to access the gRPC service
- Put
- Metrics:
/metrics
- Health check:
/health
- Readiness check:
/readiness
- Liveness check:
/liveness
- Readiness check:
- Dashboard:
/fiber/dashboard