{"id":16795315,"url":"https://github.com/bartoszherba/notifications-service","last_synced_at":"2026-04-09T02:01:19.353Z","repository":{"id":125055056,"uuid":"122309908","full_name":"bartoszherba/notifications-service","owner":"bartoszherba","description":"Messages service to manage notification for customers","archived":false,"fork":false,"pushed_at":"2018-03-06T12:29:02.000Z","size":568,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T03:13:55.867Z","etag":null,"topics":["expressjs","microservice","mongodb","nodejs","socket-io"],"latest_commit_sha":null,"homepage":"https://bartoszherba.github.io/notifications-service/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bartoszherba.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-21T08:26:32.000Z","updated_at":"2018-03-06T18:44:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"9598d68b-fc3e-4c4d-a1b6-d34208150c0f","html_url":"https://github.com/bartoszherba/notifications-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bartoszherba/notifications-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartoszherba%2Fnotifications-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartoszherba%2Fnotifications-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartoszherba%2Fnotifications-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartoszherba%2Fnotifications-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartoszherba","download_url":"https://codeload.github.com/bartoszherba/notifications-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartoszherba%2Fnotifications-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","microservice","mongodb","nodejs","socket-io"],"created_at":"2024-10-13T09:16:00.269Z","updated_at":"2026-04-09T02:01:19.325Z","avatar_url":"https://github.com/bartoszherba.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notification Microserevice\n\nNotification microservice was created as a server side, event driven messages storage which is able to emit notifications to the client in real time through the web sockets. Exposing easy to use API allows any client to push and receive notifications and display them to the user without significant delay.\n\n## Technology stack\n* nodejs.org \n* expressjs.com \n* socket.io\n* mongodb.com\n* swagger.io\n\n## Available Clients\n* [magento 2](https://bartoszherba.github.io/magento2-notifications-service-client/)\n\n\n## How to run up the service?\n\nEverything required to run up service is available in the package\n\n### Configuration\n\nConfiguration sample files are in CONFIG directory. There are different samples for running up service locally and with docker. For any approach simply copy and adjust configuration.\n\n### Local\n\nIf you want to run service locally you will likely to use default.json configuration file. There is an assumption that you already have installed mongodb and nodejs.\n\nUpdate configuration with appropriate details and run:\n\n``npm install \u0026\u0026 npm start``\n\n### Docker\n\nIf you have a docker then the simplest way to run up service is to use docker.json config file. Copy it, rename, adjust details and run:\n\n``docker-compose up -d``\n\n*Note: running up service with docker was tested only in linux environment and therefore might not work in osx or windows*\n\n## Api Documentation\n\nAfter running up the service Swagger API documentation will be available at http://[hostname:port]/api-docs/index.html (*default: http://localhost:3000/api-docs/index.html)*\n\n\n# Socket - Client\n\n## Connection\nEach connection is expected to be done with IDENTIFIER query parameter. Based on this parameter each client will be put into a different space. Multiple clients can share the same identifier and therefore will receive the same events.\n\n*EXAMPLE CONNECTION:*\n\n```javascript\noptions = {\n    forceNew: true,\n    reconnectionAttempts: 5,\n    query: {\n        identifier: 'some-dientifier',\n    },\n};\n\nconst socket = io('http://yourwebsite.local', options);\n```\n\n## Events\n* **new-message** - will broadcast new message object along with total messages counter\n* **new-message-list** - will broadcast array with all messages objects with a given identifier\n* **update-message** - will broadcast updated message object\n\n*EXAMPLE LISTENER*\n```javascript\nsocket.on('new-message', (response) =\u003e {\n    console.log(response.newMsg);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartoszherba%2Fnotifications-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartoszherba%2Fnotifications-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartoszherba%2Fnotifications-service/lists"}