https://github.com/gip-recia/notification-poc
POC Of Notifications for the ESCO-Portail
https://github.com/gip-recia/notification-poc
Last synced: 3 months ago
JSON representation
POC Of Notifications for the ESCO-Portail
- Host: GitHub
- URL: https://github.com/gip-recia/notification-poc
- Owner: GIP-RECIA
- License: apache-2.0
- Created: 2017-11-16T10:32:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-16T09:08:08.000Z (7 months ago)
- Last Synced: 2025-01-13T07:11:49.098Z (5 months ago)
- Language: Java
- Size: 3.54 MB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Notifications POC for the ESCO-Portail
This is a proof of concept for emitting and receiving notifications from/to ESCO-Portail.
It leverages [RabbitMQ](http://www.rabbitmq.com/) and [Elastic.io](https://www.elastic.co) products to emit, route,
store and dispatch notifications.## Requirements
[Docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/) are used to setup the
technical environment containing all requirements.## Setting up the environment
* Clone the github repository including submodules
```bash
git clone --recursive https://github.com/GIP-RECIA/Notification-POC.git
```* Source enviromnent file
```bash
. ./env.sh
```* Build CAS Overlay from `cas-esco-overlay` directory (see [GIP-RECIA/cas-esco-overlay/README.md](https://github.com/GIP-RECIA/cas-esco-overlay/blob/master/README.md))
* Download required docker images
```bash
dc pull
```* Build custom docker images
```bash
dc build
```* Start containers
```bash
dc up -d
```## Showcase
- Login with an existing account from on [localhost:8088/notification](http://localhost/notification)
- It should then display **Connected** green badge on navbar (It means websocket is up and ready to receive notifications)
- HTTP **POST** to event service to emit an event
POST [localhost:8081/event/emit](localhost:8081/event/emit)
Content-Type: application/json
Body (Adjust `userUuids` field to the uuid of connected user):```json
{
"header": {
"type": "test",
"userUuids": ["F1000ugr"],
"medias": ["web"]
},
"content": {
"title": "Hello World",
"message": "First notification"
}
}
```- This should display a real time notification on the webapp through established WebSocket.
- When reloading the webapp, the existing notification are loaded through ElasticSearch storage.
## Services
- Notification Web Application: [http://localhost:8088/notification](http://localhost/notification)
- RabbitMQ Management Interface: [http://localhost:8088/rabbitmq/admin](http://localhost/rabbitmq/admin)
- Kibana: [http://localhost:5601](http://localhost:5061)
## Shutdown the environment
```bash
dc down
```#### Clear data from the environment
```bash
dc down -v # All data will be lost !
```