The Notifications API is a RESTful service designed to manage push notifications for applications, ensuring users are kept informed about events, promotions, and important updates.
- Create Notifications: Add new notifications for users. (Future Implementation via SQS Queue)
- Retrieve Notifications: Fetch all notifications or specific ones by ID.
- Update Notifications: Modify existing notifications, including marking them as read.
- Delete Notifications: Deactivate notifications by ID.
GET /notifications
Fetches all notifications for a specific user.
GET /notifications/{id}
Fetches a specific notification by its ID for a user.
DELETE /notifications/{id}
Deactivates a notification by setting its `isActive` flag to false.
PATCH /notifications/{id}/mark-as-read
Marks a notification as read and sets the `readAt` timestamp.
notificationId: Unique identifier for the notification.userId: Identifier for the user receiving the notification.title: Title of the notification.message: Content of the notification.type: Type of notification (e.g., promotion, alert).createdAt: Timestamp when the notification was created.read: Boolean indicating if the notification has been read.readAt: Timestamp when the notification was read.priority: Priority of the notification (e.g., high, medium, low).link: URL or path for more information.isActive: Boolean indicating if the notification is active.
-
Clone the repository:
git clone https://github.com/GilbertoJNJ/NotificationAPI.git -
Navigate to the project directory:
cd notifications-api -
Build the project using Gradle:
./gradlew build -
Run the application:
./gradlew bootRun