[6.1] Push Notifications System - FEUP-MEIC-DS-2025-26/madeinportugal.store GitHub Wiki
🌐 Overview
Our team is responsible for developing and testing the Push Notifications System for the Made in Portugal Store's platform.
The goal is to ensure that users (sellers, admins, and buyers) receive timely, relevant, and configurable notifications based on platform activity, even when they are outside the browser, through reliable and secure real-time and email updates.
The system must integrate with Jumpseller’s existing webhooks and other Microservices.
Repository: https://github.com/FEUP-MEIC-DS-2025-26/prototype-push-notifications-6-1
🛠️ Functionalities Overview
Our push notification system , in more detail , will cover the following points :
- Push Notification System
- Website notifications for new messages
- Notification Delivery and Read Status
- Notification Delivery via WebSockets
- Notification Preferences Management
- Notification UI
⛩️ System Architecture
The system is composed of four main services, each containerized and deployed via Docker Compose:
| Service | Description | Tech Stack |
|---|---|---|
| Backend | Core API handling push notifications. | Go |
| Broker | Routes messages to subscribers based on topics. | Go |
| Frontend | Web dashboard for monitoring notification delivery. | React |
| Database | Persistent storage for notifications. | Firebase |
| IaC | Each service is built and deployed using GC Artifact Registry, Docker Compose and Terraform. | Google Cloud Platform |
🔌 API Endpoints (Overview)
| Method | Endpoint | Handler Function | Description |
|---|---|---|---|
GET |
/:user_id/notifications |
GetAllNotifications |
Retrieve all notifications for a user |
GET |
/:user_id/notifications/unseen |
GetUnseenNotifications |
Retrieve notifications which haven't been marked as seen |
PATCH |
/:user_id/notifications/:notification_id/seen |
MarkNotificationSeen |
Retrieve notifications which have been marked as seen |
GET |
/:user_id/preferences |
GetPreferences |
Retrieve user's notifications preferences |
PATCH |
/:user_id/preferences |
UpdatePreferences |
Update user's notifications preferences |
Protocol Buffer for Notifications:
syntax = "proto3";
package notifications;
option go_package = "myapp/proto;proto";
// Main message used to publish through Pub/Sub
message NotificationMessage {
string user_id = 1;
string type = 2; // e.g. wishlist, bid, etc.
string title = 3; // Title shown in the UI
string payload = 4; // Long description
string hyperlink = 5; // Link to redirect the user
string created_at = 6; // ISO timestamp
}
Example Notification Object in JSON:
{
"title": "Wishlist item available",
"payload": "The item biological honey is now available in the shop bees4live",
"hyperlink": "https://madeinportugal/wishlist/1", // Used for redirecting to the mentioned page in the website
"type": "wishlist",
"timestamp": "2025-11-21T17:01:59Z", // Time in ISO 8601
"user_id": 1
}
🚀 Getting Started
Prerequisites
- Docker
- Docker Compose
- Go ≥ 1.25.3
- Google Cloud (When not using locally)
1️⃣ Run Locally
To build and start all containers:
./rebuild.sh
2️⃣ Run on Google Cloud Run
TODO
ℹ️ Additional Information:
Group: 61
Members:
- Ângelo Oliveira (up202207798)
- José Lopes (up202208288)
- Mário Araújo (up202208374)
- Pedro Marinho (up202206854)
- Sérgio Nossa (up202206856)