{"id":18111543,"url":"https://github.com/alvartaco/notification-docker-compose","last_synced_at":"2025-07-15T04:06:39.445Z","repository":{"id":258607494,"uuid":"872515327","full_name":"alvartaco/notification-docker-compose","owner":"alvartaco","description":"Notification App that uses Docker Compose - (Spring Boot - Spring Security - Spring JDBC Client- Spring JPA - KafKa - KafkaUI - MySql - Health Services Validator - Mongo-DB - HTMX - React.js - Node.js). The middleware handles Messages creation.","archived":false,"fork":false,"pushed_at":"2025-03-12T18:09:03.000Z","size":903,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T03:22:41.686Z","etag":null,"topics":["docker-compose","kafka","mongodb","mysql-database","nodejs","reactjs","spring-boot","spring-data-jpa","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvartaco.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-14T15:11:10.000Z","updated_at":"2025-03-12T02:56:24.000Z","dependencies_parsed_at":"2024-11-01T22:20:53.305Z","dependency_job_id":"cc93f677-7daa-4452-9789-b4f9d3a9b065","html_url":"https://github.com/alvartaco/notification-docker-compose","commit_stats":null,"previous_names":["alvartaco/notification-docker-compose"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/alvartaco/notification-docker-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvartaco%2Fnotification-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvartaco%2Fnotification-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvartaco%2Fnotification-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvartaco%2Fnotification-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvartaco","download_url":"https://codeload.github.com/alvartaco/notification-docker-compose/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvartaco%2Fnotification-docker-compose/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265402301,"owners_count":23759124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["docker-compose","kafka","mongodb","mysql-database","nodejs","reactjs","spring-boot","spring-data-jpa","spring-security"],"created_at":"2024-11-01T01:06:10.462Z","updated_at":"2025-07-15T04:06:39.436Z","avatar_url":"https://github.com/alvartaco.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Notification App.\n\nIt was required to create a system capable of receiving messages, which will have a\ncategory and the body of the message. These messages will need to be forwarded to\nthe system's users, who will already be pre-populated. In addition to being subscribed\nto message categories, these users will have specified the channels through which they\nwould like to be notified, such as SMS, Email or Push Notification.\nWith this configuration, users will only receive notifications of messages that fall within\nthe categories they are subscribed to and through the channels they have specified.\nThere will be three message categories:\n\n    • Sports\n    • Finance\n    • Movies\n\nAnd there will be three types of notifications, each requiring its own class to manage\nthe sending logic independently:\n\n    • SMS\n    • E-Mail\n    • Push Notification\n\nIt was necessary to design the architecture for sending notifications through various\nchannels. At a minimum, there should be one class for each channel, along with a\nstrategy to select the appropriate channel. Real messages need not be sent using third-\nparty services; the focus is on establishing a structure to implement the logic in the\nfuture.\n\nAdditionally, it was essential to store all the relevant information required to verify that the\nnotification has been successfully delivered to the respective subscriber. This includes\ndetails such as the message type, notification type, user data, timestamp, and any\nother pertinent information.\n\nNo user administration is required, it is used a Mock of users in the source code, and\nthey must have the following information:\n\n    • ID\n    • Name\n    • Email\n    • Phone number\n    • Subscribed [ ] here you need to list all the categories where the user issubscribed.\n    • Channels [ ] a list of the notification's channels (SMS | E-Mail | Push Notification).\n\nAs a user interface, you must display 2 main elements.\n\n1. Submission form. A simple form to send the message that contains 2 fields:\n  \n    • Category. List of available categories.\n\n    • Message. Text area, confirm that the message is not empty.\n\n2. Log history. A list of all data records in the log, sorted from newest to oldest. They are the Sent Notifications.\n\n-----------------------------------------------------------------------------------------------\n\nFor buildeng the application uses:\n\n      .   ____          _            __ _ _\n     /\\\\ / ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\n    ( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n     \\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n      '  |____| .__|_| |_|_| |_\\__, | / / / /\n     =========|_|==============|___/=/_/_/_/\n     \n     :: Spring Boot ::                (v3.3.4)\n\n    -\u003e Docker Compose : SpringBoot App - KafKa - KAfKa Ui - MySql - MongoDb - (NodeJs / ReactJs)\n\n    -\u003e Docker Compose Image : https://hub.docker.com/r/alvartaco/notification-docker-compose\n\n    -\u003e RUNNING the Apps:\n\n        -\u003e Clone or unzip this Project code.\n\n        -\u003e Start Docker Compose from this Github Project's (cloned/downloaded) sorce folder: \n        \n            /notification-docker-compose$ docker-compose up -d  \n\n        -\u003e Restart ALL Docker Container Services.\n\n        -\u003e Wait for all containers to be up and running.\n\n        ==\u003e\u003e GO TO : http://localhost:3000\n\n    -\u003e Building the Apps:\n\n        -\u003e Build the Spring Boot Application with: \n        \n            /notification-docker-compose$ mvn clean install\n\n        -\u003e Start the Application: \n\n            java -jar target/notification-docker-compose-0.0.3-SNAPSHOT.jar\n\n            Note: If application fails to start, try restaring Docker Services.\n\n        -\u003e Build the NodeJS/ReactJS Application with:\n\n            /notification-docker-compose/src/main/node_server$ npm install\n            /notification-docker-compose/src/main/node_server$ npm run build\n\n        -\u003e Start the NodeJS Application:\n            \n            /notification-docker-compose/src/main/node_server$ npm start\n\n       ==\u003e\u003e GO TO : http://localhost:3000\n\n    -\u003e JDK : 21\n\n    -\u003e HTTP Ports External App: 8082 / 3000\n\n    -\u003e HTTP Ports Docker Internal App: 8082 / 3000\n\n    -\u003e KafKa UI : 8081\n\n    -\u003e MAVEN\n   \n    -\u003e JDBC Client for DB Connection - MySQL at Docker Compose\n\n    -\u003e Dpting Data / Reository - Mongo-DB at Docker Compose\n\n    -\u003e Thymeleaf Java engine for processing and creating HTML, XML, JavaScript, CSS and text\n\n    -\u003e HTMX a small JavaScript library that allows you to use custom attributes in HTML\n\n    -\u003e NodeJS and ReactJS for the Login and Registration of Users in Mongo-DB.\n\n    -\u003e Dessign Pattern: Factory / Strategy for different notification channels like SMS, e-mail, Push notifications. \n    And Observer for the main objetive of Users receiving updates in their subsctipyed Message Categories.\n\n    -\u003e Git / Github :D and Git Flow\n\n    -\u003e Responsive Flex Design\n\n    -\u003e API REST\n\n    -\u003e Junit for Tests\n\n\n![img.png](img.png)\n\nAdding some testing results of the first Iteration:\n\n\n![categoryTable](https://github.com/user-attachments/assets/cbddbf3c-6f00-4518-9d6c-15b82f4d867c)\n![messageTable](https://github.com/user-attachments/assets/ad6966c4-e187-4451-8d56-cbc6838baf67)\n![notificationTable](https://github.com/user-attachments/assets/950ed279-7d70-4de3-bfe3-897bf3cc285a)\n\nThe Log and some json files, related to users and categories are also uploaded in the root/xDocuments\n\nWithout authentication, it was possible to test creation of Messages, that fire the Notifications the User's that are Subscribed, using the REST API; with this command:\n\n    curl -X POST localhost:8082/api/messages -H 'Content-type:application/json' -d '{\"categoryId\": \"2\", \"messageBody\": \"the boddy\"}'\n\nNow it is suggested to use Postman:\n\n* Send a Message to /api/messages (using the JWT token / SECRET_KEY / CSRF Token):\n* It needs to be more detailed.!!!! \n\nCreate a new POST request in Postman:\n\nURL: http://localhost:8082/api/messages\nHeaders:\nContent-Type: application/json\nAuthorization: Bearer your_jwt_token\nReplace your_jwt_token with the token you copied in the previous step.\n\nBody (raw JSON):\n\n{\n\"categoryId\": \"2\",\n\"messageBody\": \"This is a test message from Postman\"\n}\n\nImportant: categoryId and messageBody are mandatory.\n\nClick Send.\n\nExpected Response: A 201 Created response.\n\nCheck the logs: you should see the message #NOTIFICATIONS-D-C - Sent message to kafka, category:2, message:This is a test message from Postman! Additional Scenarios to Test (Very Important)\n\nSent Notifications List:\n\n![img_1.png](img_1.png)\n\nLatest Version Includes Login + Registration pages implemented with NodeJS and ReactJS.\n\nUsers are stored in MongoDB.\n\nSecurity is Implemented with Spring JWT Security.\n\nError pages are implemented too.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvartaco%2Fnotification-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvartaco%2Fnotification-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvartaco%2Fnotification-docker-compose/lists"}