{"id":27249054,"url":"https://github.com/elsayed85/microservice-food","last_synced_at":"2025-10-09T23:11:00.831Z","repository":{"id":262152481,"uuid":"886373724","full_name":"elsayed85/microservice-food","owner":"elsayed85","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-11T07:28:58.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T01:14:04.015Z","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/elsayed85.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-11-10T20:36:49.000Z","updated_at":"2025-03-07T17:05:45.000Z","dependencies_parsed_at":"2024-11-10T21:29:38.374Z","dependency_job_id":"a1352835-aaa5-4a72-aa2e-ad3c0975fea2","html_url":"https://github.com/elsayed85/microservice-food","commit_stats":null,"previous_names":["elsayed85/food","elsayed85/microservice-food"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elsayed85/microservice-food","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fmicroservice-food","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fmicroservice-food/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fmicroservice-food/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fmicroservice-food/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsayed85","download_url":"https://codeload.github.com/elsayed85/microservice-food/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fmicroservice-food/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002341,"owners_count":26083340,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2025-04-10T23:53:41.889Z","updated_at":"2025-10-09T23:11:00.809Z","avatar_url":"https://github.com/elsayed85.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Building Steps \n\n## Step 1: Preparing Services [ Mysql , PhpMyAdmin , Redis ]\n```bash\ndocker compose up -d --build\n```\n\n```bash\n##### MYSQL \u0026 PHPMYADMIN #####\n\nDB_DATABASE=food_ordering\nDB_USERNAME=root\nDB_PASSWORD=pass_@123\nDB_ROOT_PASSWORD=pass_@123\nDB_PORT=3306\n\nPHP_MYADMIN_MY_PORT=8002\nPHPMYADMIN_DB_USERNAME=root\nPHPMYADMIN_DB_PASSWORD=pass_@123\nPHPMYADMIN_PORT=8365\n\nNETWORK_NAME=food_network\n\nDB_UPLOAD_MAX_FILESIZE=100M\n\n\n##### REDIS #####\nREDIS_PORT=6372\n```\n\n## Step 2: Which Service You Want To Test [ Monolithic , MicroServices ]\n\n### Monolithic [ Foodics ] [ With Test Cases ]\n```bash\n===== Monolithic =====\ncd monolithic/foodics\ndocker compose up -d --build\ndocker exec -it -uroot foodics-service php artisan test\n```\n\n###  MicroServices [ Notification , Order , Stock ] [ Without Test Cases , sorry :( ]\n```bash\n===== Notification =====\n```bash\ncd micro-service/src/Notification\ndocker compose up -d --build\n\n===== Order =====\ncd micro-service/src/Order\ndocker compose up -d --build\n\n===== Stock =====\ncd micro-service/src/Stock\ndocker compose up -d --build\n```\n\n## Step 3: Testing Services [ Monolithic ]\n```bash\ndocker exec -it -uroot foodics-service php artisan test\n\n   PASS  Tests\\Feature\\PlaceOrderTest\n  ✓ it places an order successfully                                      1.14s  \n  ✓ it dispatches PlaceNewOrderJob when placing an order                 0.03s  \n  ✓ it stores the order with \"Processing\" status                         0.05s  \n  ✓ it attaches products to the order                                    0.05s  \n  ✓ it reserves product ingredients for the order                        0.05s  \n  ✓ it deducts ingredient stock based on order quantity                  0.05s  \n  ✓ it triggers a low stock alert when stock is low                      0.07s  \n  ✓ it cancels the order when stock is not enough                        0.05s  \n  ✓ it dispatches SendLowStockAlertJob when an ingredient is low in sto… 0.04s  \n  ✓ it dispatches SendLowStockAlertJob only once when multiple orders a… 0.04s  \n\n  Tests:    10 passed (13 assertions)\n  Duration: 1.65s\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Fmicroservice-food","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsayed85%2Fmicroservice-food","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Fmicroservice-food/lists"}