{"id":23554454,"url":"https://github.com/amrmuhamedd/ordering-system","last_synced_at":"2026-04-10T00:34:02.085Z","repository":{"id":149586087,"uuid":"555096121","full_name":"amrmuhamedd/ordering-system","owner":"amrmuhamedd","description":"Explore a Nest.js microservices app with auth, billing, and orders. Utilizes RabbitMQ for async communication and Docker for easy deployment. Modular, scalable, and efficient.","archived":false,"fork":false,"pushed_at":"2023-08-04T22:32:08.000Z","size":532,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-26T12:15:38.517Z","etag":null,"topics":["docker","docker-compose","docker-image","microservices","mongodb","mongoose","nestjs","rabbitmq","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/amrmuhamedd.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-10-21T00:11:28.000Z","updated_at":"2024-07-02T10:51:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"d44afabe-a1fe-46c9-a092-aedf4d92b03c","html_url":"https://github.com/amrmuhamedd/ordering-system","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrmuhamedd%2Fordering-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrmuhamedd%2Fordering-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrmuhamedd%2Fordering-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrmuhamedd%2Fordering-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amrmuhamedd","download_url":"https://codeload.github.com/amrmuhamedd/ordering-system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239294269,"owners_count":19615099,"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","docker-compose","docker-image","microservices","mongodb","mongoose","nestjs","rabbitmq","typescript"],"created_at":"2024-12-26T12:14:30.014Z","updated_at":"2025-11-01T14:30:34.159Z","avatar_url":"https://github.com/amrmuhamedd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```markdown\n# Nest.js Microservices Application with RabbitMQ and Docker\n\n## Description\n\nThis project showcases a microservices architecture implemented using Nest.js, with three services: authentication (auth), billing, and orders. The application employs RabbitMQ for asynchronous communication and is containerized using Docker for easy deployment.\n\n## Installation\n\nTo set up the application, run the following command:\n\n```bash\n$ npm install\n```\n\n## Running the Application\n\nThe application can be run using Docker with the following command:\n\n```bash\n# Development\n$ docker-compose up --build -V\n```\n\nAlternatively, you can run each service individually:\n\n```bash\n# Development\n$ npm run start:dev\n```\n\n## Project Structure\n\nThe project follows a modular structure:\n\n- `src/auth`: Contains controllers, services, DTOs, and other related modules for authentication and authorization.\n- `src/billing`: Holds controllers, services, DTOs, etc., for the billing service.\n- `src/orders`: Contains modules for handling orders, including controllers, services, DTOs, etc.\n- `src/main.ts`: The entry point for the application.\n\n## Design Patterns\n\nThe application employs a microservices architecture, promoting loose coupling and independent development of services. Each service has its own set of controllers, services, and DTOs for handling specific tasks.\n\n## Logic and Interaction\n\n- **Authentication Service (auth):** Manages user authentication and authorization using JWT tokens.\n\n- **Billing Service:** Logs order creation events using asynchronous communication with the Orders Service through RabbitMQ.\n\n- **Orders Service:** Allows creating and listing orders. Publishes order creation events to RabbitMQ for the Billing Service.\n\n## Optimization and Validation\n\n- **Validation:** Data validation is performed using Nest.js's built-in validation features and Data Transfer Objects (DTOs) for input validation and transformation.\n\n- **Optimization:** The application employs caching, indexing, and asynchronous processing using RabbitMQ for enhanced performance and responsiveness.\n\n## Docker and Microservices\n\nDocker is utilized to containerize the microservices, ensuring consistent and isolated environments. The `docker-compose.yml` file defines service configurations and dependencies.\n\n## Communication with RabbitMQ\n\nRabbitMQ is employed for asynchronous communication between services. The Orders Service publishes order creation events to a RabbitMQ queue, which the Billing Service consumes, achieving decoupled communication.\n\nThis microservices application, built using Nest.js, RabbitMQ, and Docker, demonstrates a modular, scalable, and maintainable architecture that promotes efficient communication and independent development of services.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrmuhamedd%2Fordering-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famrmuhamedd%2Fordering-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrmuhamedd%2Fordering-system/lists"}