{"id":26092901,"url":"https://github.com/jazzshu/rocket-chat","last_synced_at":"2026-04-05T22:37:07.170Z","repository":{"id":143113507,"uuid":"567011317","full_name":"jazzshu/Rocket-Chat","owner":"jazzshu","description":"Real-time messagging app","archived":false,"fork":false,"pushed_at":"2022-11-23T20:42:01.000Z","size":481,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T17:53:50.666Z","etag":null,"topics":["cicd","compute-engine","docker","google-cloud","javascript","jenkins","react","socket-io","spring-boot"],"latest_commit_sha":null,"homepage":"https://main.d3vox0wtd88d1z.amplifyapp.com/","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/jazzshu.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":"2022-11-16T22:06:25.000Z","updated_at":"2023-01-02T09:52:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f390ebc1-5c2e-4aa0-8e00-969983d48a59","html_url":"https://github.com/jazzshu/Rocket-Chat","commit_stats":null,"previous_names":["jazzshu/rocket-chat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jazzshu/Rocket-Chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FRocket-Chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FRocket-Chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FRocket-Chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FRocket-Chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jazzshu","download_url":"https://codeload.github.com/jazzshu/Rocket-Chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FRocket-Chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31452899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cicd","compute-engine","docker","google-cloud","javascript","jenkins","react","socket-io","spring-boot"],"created_at":"2025-03-09T11:10:23.464Z","updated_at":"2026-04-05T22:37:06.959Z","avatar_url":"https://github.com/jazzshu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rocket-Chat\nRocket-Chat is a real-time messagging app created using a very simple stack: **ReactJs** in the frontend, **Spring Boot** in the backend, and **Socket.io** as the live-socket based\nmessagging tool to communicate between clients and a **MongoDB** Database.\n\nThe app is then been deployed on *Google Cloud Platform (GCP)* where it responds to requests coming from the frontend \ndeploy on *AWS Amplify*.\n\nThe whole app is made of 3 very simple domains: \"User\", \"Conversation\" and \"Contact\". Here we will be describing in detail\neach one of them.\n\n### User\nThe app has a User domain where it stores its basic user information, such as username, password and image.\nThis informations are stored directly in the MongoDB database through a simple login/signup page that shows up only\nonce when the user makes its first access to the app.\n\nOnce the user has successfully logged-in, its basic info (id, username, image) are stored as an object in the localstorage\nof the clients browser, so everytime the user lands on the website url it doesn't need to re-enter its credentials.\n\n### Contact\nOnce a user has been created it has the possibility to add some contacts to its contact list through the username. The username\nis unique for all the users so  there cannot be 2 users with the same username. Once the logged user has found its contact he/she can subsequently\nadd it to its list. \n\n### Conversation\nOnce a user has added at least one user to its contacts, it can then create a conversation with one or more users. If he/she chooses to create\na conversation with just one User, no further informations are needed and a conversation can take place. If he/she chooses\nto add more contacts to its conversation then a Group name and a Group image can be provided to identify various groups. \nThere are no checks on the Group name so there can be groups with the same name.\nWhen the group is created, a message written in such group will be received by all the group members\nsimultaneously.\n\n##Socket.io\n\nThe real-time messagging is possible thanks to [Socket.io](https://socket.io/). It uses WebSockets in its server to listen to events \ncoming from different clients. It is sufficient to declare a \"topic\" (much like Apache Kafka) and attach a payload\nto it, so the server then receives the payload if it is prepared to receive it on the declared \"topic\".\n\nIn our case we just send to the socket.io server the conversationId and the recipients as our payload. This way we can\nsend from the server back to all the clients (the recipients) the conversationId. \n\nIn doing so, we have implemented a **useEffect** hook in the client where everytime we receive this payload from \nthe socket.io server we trigger a re-render of the page, making a new request to the Backend to retrieve the new\nmessages received on conversation with the correct conversationId.\n\n### CI/CD\n\nFor the deployment of the application we used 2 simple CI/CD pipeline implemented in Jenkins: one for the Backend and\nthe other one for the socket.io server.\nThe pipelines get triggered everytime there is a push to the repository. \n\n#### Backend Pipeline\nIt runs the Junits and archives the artifact.\nOnce the Junits are correctly compiled, it then pushes the artifact (after it has renamed it using the %BUILD_NUMBER% \nenvironment variable it uniquely identify each build), to the GCP Cloud Storage service, much similar to the AWS S3.\nAfter it has successfully completed such task, it builds the docker image described in the corresponding Dockerfile\nand pushes such image to Docker Hub.\n\nAfter that we login to our remote e2-micro linux Debian machine in GCP Compute Engine storage, where we\nstop the running container, delete the old image and pull the newly pushed image from the Docker Hub.\nOnce it has successfully got the updated image it runs the image in the machine, making it available to be called.\n\n#### Socket Server Pipeline\nThe socket server is deployed on the same machine as the backend, it just listens on a different port. The pipeline is \ntriggered always by a push in the repository, and it skips the Junit test part and directly build a Node JS\nDocker image and pushes it to the Docker Hub. \n\nOnce there, it then connects through ssh in the remote machine, and like for the Backend, it stops and delete the\nprevious container to download the new image and run it.\n\n#### Author: Jason Shuyinta (DotJson)\n\nWidely inspired by [Whatsapp Clone](https://www.youtube.com/watch?v=tBr-PybP_9c)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazzshu%2Frocket-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjazzshu%2Frocket-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazzshu%2Frocket-chat/lists"}