{"id":28738006,"url":"https://github.com/chimake/microservices_project","last_synced_at":"2025-06-16T03:43:19.899Z","repository":{"id":222847894,"uuid":"758538609","full_name":"chimake/microservices_project","owner":"chimake","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-16T15:05:47.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-02-17T15:55:59.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/chimake.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}},"created_at":"2024-02-16T14:38:05.000Z","updated_at":"2024-02-16T14:50:01.000Z","dependencies_parsed_at":"2024-02-16T15:56:01.333Z","dependency_job_id":"c481692a-a37f-461b-adc3-da973831008e","html_url":"https://github.com/chimake/microservices_project","commit_stats":null,"previous_names":["chimake/microservices_project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chimake/microservices_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chimake%2Fmicroservices_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chimake%2Fmicroservices_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chimake%2Fmicroservices_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chimake%2Fmicroservices_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chimake","download_url":"https://codeload.github.com/chimake/microservices_project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chimake%2Fmicroservices_project/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260090952,"owners_count":22957288,"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":[],"created_at":"2025-06-16T03:43:08.091Z","updated_at":"2025-06-16T03:43:19.890Z","avatar_url":"https://github.com/chimake.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microservices Application with Docker\n\nThis project consists of two microservices, \"users\" and \"notifications\", communicating via a message bus. The services are orchestrated using Docker Compose.\n\n## Overview\n\nThe microservices architecture allows for scalable, decoupled, and independently deployable components, enabling efficient development and maintenance of complex systems. In this setup, the \"users\" service handles user data submission, while the \"notifications\" service processes and logs the received data.\n\n## Laravel\n\nLaravel is a PHP web application framework used for building the microservices in this project. It provides a robust set of tools and features for developing scalable and maintainable applications.\n\n## Docker Compose Configuration\n\nThe `docker-compose.yml` file defines the services and their configurations:\n\n### Services\n\n- **Redis**: Acts as the message broker for communication between microservices.\n- **Users Service**: Handles user data submission via POST requests and dispatches events to the message broker.\n- **Notifications Service**: Consumes events from the message broker and logs the received data.\n\n### Ports\n\n- **Users Service**: Exposed on port 8000.\n- **Notifications Service**: Exposed on port 8001.\n\n### Volumes\n\n- Both services mount volumes for log storage to persist logs outside the containers.\n\n## Task Description\n\nThe microservices application follows these requirements:\n\n1. **User Service**:\n    - Exposes an endpoint `POST /users` to receive user data (`{\"email\",\"firstName\",\"lastName\"}`) and stores it.\n    - Upon data submission, generates an event and sends it through the message broker to the \"notifications\" service.\n\n2. **Notifications Service**:\n    - Consumes events from the message broker.\n    - Logs the received data in a log file.\n\n3. **Test Coverage**:\n    - The codebase is covered with unit, integration, and functional tests to ensure reliability and correctness.\n\n## Instructions\n\n### Setup and Testing\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/chimake/microservices_project.git\n\n2. **Navigate to the Project Directory**:\n   ```bash\n   cd microservices_project\n\ndocker-compose build\ndocker-compose up -d\n\n# For Users Service\ndocker-compose exec users php artisan test\n\n# For Notifications Service\ndocker-compose exec notifications php artisan test\n\n# For Users Service\ndocker-compose exec users cat /var/log/users.log\n\n# For Notifications Service\ndocker-compose exec notifications cat /var/log/notifications.log\n\ndocker-compose down\n\n### API Endpoints\n/users\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchimake%2Fmicroservices_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchimake%2Fmicroservices_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchimake%2Fmicroservices_project/lists"}