{"id":36383482,"url":"https://github.com/supravatm/magento2-fake-data-api","last_synced_at":"2026-01-13T23:46:13.257Z","repository":{"id":315207412,"uuid":"1058230394","full_name":"supravatm/magento2-fake-data-api","owner":"supravatm","description":"A lightweight and non-intrusive(no DB bloat unless you extend it to save) developer-friendly Magento 2 module to generate fake customers, products, and orders via GraphQL \u0026 REST APIs","archived":false,"fork":false,"pushed_at":"2025-09-18T12:40:26.000Z","size":24,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T17:18:44.658Z","etag":null,"topics":["data-faker","fake-data","faker","fakerphp","magento2","sample-data","test-data-generator"],"latest_commit_sha":null,"homepage":"","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/supravatm.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-16T19:59:25.000Z","updated_at":"2025-09-22T06:52:19.000Z","dependencies_parsed_at":"2025-09-19T04:19:33.283Z","dependency_job_id":null,"html_url":"https://github.com/supravatm/magento2-fake-data-api","commit_stats":null,"previous_names":["supravatm/magento2-fake-data-api","supravatm/graphql-faker"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/supravatm/magento2-fake-data-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supravatm%2Fmagento2-fake-data-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supravatm%2Fmagento2-fake-data-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supravatm%2Fmagento2-fake-data-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supravatm%2Fmagento2-fake-data-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supravatm","download_url":"https://codeload.github.com/supravatm/magento2-fake-data-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supravatm%2Fmagento2-fake-data-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["data-faker","fake-data","faker","fakerphp","magento2","sample-data","test-data-generator"],"created_at":"2026-01-11T14:59:32.647Z","updated_at":"2026-01-13T23:46:13.249Z","avatar_url":"https://github.com/supravatm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧪 Magento 2 Mock Data Generator (GraphQL + REST API)\n\nA lightweight and non-intrusive(no DB bloat unless you extend it to save) **developer-friendly Magento 2 module** to generate **fake customers, products, and orders** via **GraphQL \u0026 REST APIs**.\nPowered by [FakerPHP](https://fakerphp.org/).\n\nUseful when:  \n✅ You need quick test data for local/staging development  \n✅ Testing GraphQL storefronts (Vue, React, PWA Studio, etc.)  \n✅ Avoiding manual CSV uploads or repetitive admin work  \n\n---\n\n## 🚀 Features\n\n* Generate **Customers, Products, and Orders** with one API call\n* Supports **REST (`/V1/mockdata/generate`)** and **GraphQL**\n* Customizable `entity` and `numberOfItems` parameters\n* Lightweight and non-intrusive (no DB bloat unless you extend it to save)\n\n---\n\n## 📦 Installation\n\n\n\n#### Install via Composer (recommended)\n\nIf your module is published on [Packagist](), you can install it directly:\n\n```bash\n  composer require --dev supravatm/magento2-module-fake-data-api\n  bin/magento module:enable SMG_MockDataGenerator\n  bin/magento setup:upgrade\n```\n\u003ePreferred way : easier upgrades, dependency management, Packagist support.\n  \n#### Manual Installation (alternative)\nDownload the module `.zip` or clone the repo. Extract it into Magento’s `app/code` directory:\n\n```bash\nmkdir -p app/code/SMG\ncd app/code/SMG\ngit clone git@github.com:supravatm/magento2-fake-data-api.git MockDataGenerator\nbin/magento module:enable SMG_MockDataGenerator\nbin/magento setup:upgrade\nbin/magento cache:flush\n```\n\n---\n\n## 🔧 Usage\n\n### ✅ REST API\n\n**Endpoint:**\n\n```\nPOST /rest/V1/mockdata/generate\n```\n\n**Body Example:**\n\n```json\n{\n    \"entity\": \"product\",\n    \"numberOfItems\": 1,\n    \"searchCriteria\": {\n        \"pageSize\": 10,\n        \"currentPage\": 1\n    }\n}\n```\n\n**Response:**\n\n```json\n{\n    \"items\": [\n        {\n            \"entity_id\": 1,\n            \"sku\": \"FAKE-8051WX\",\n            \"name\": \"Portable Smartphone\",\n            \"attribute_set_id\": 4,\n            \"price\": 893.19,\n            \"status\": 1,\n            \"visibility\": 4,\n            \"type_id\": \"simple\",\n            \"created_at\": \"2025-03-02 06:40:17\",\n            \"updated_at\": \"2025-09-14 22:45:57\",\n            \"weight\": 1.92,\n            \"extension_attributes\": {\n                \"website_ids\": [\n                    1\n                ],\n                \"category_links\": [\n                    {\n                        \"position\": 0,\n                        \"category_id\": \"3\",\n                        \"extension_attributes\": {}\n                    }\n                ],\n                \"stock_item\": {\n                    \"item_id\": 0,\n                    \"product_id\": 0,\n                    \"stock_id\": 1,\n                    \"qty\": 32,\n                    \"is_in_stock\": false,\n                    \"use_config_manage_stock\": true,\n                    \"manage_stock\": true,\n                    \"extension_attributes\": {}\n                }\n            },\n            \"product_links\": [],\n            \"options\": [],\n            \"media_gallery_entries\": [],\n            \"tier_prices\": [],\n            \"custom_attributes\": [\n                {\n                    \"attribute_code\": \"description\",\n                    \"value\": \"High-quality Portable Smartphone with long battery life.\"\n                },\n                {\n                    \"attribute_code\": \"short_description\",\n                    \"value\": \"Stylish portable smartphone available in navy.\"\n                },\n                {\n                    \"attribute_code\": \"color\",\n                    \"value\": \"navy\"\n                }\n            ]\n        }\n    ],\n    \"search_criteria\": {\n        \"filter_groups\": [],\n        \"page_size\": 1,\n        \"current_page\": 1\n    },\n    \"total_count\": 1\n}\n```\n\n---\n\n### ✅ GraphQL\n\n**Query:**\n\n```graphql\n{\n  MockDataProduct(numberOfItems: 1) {\n    items {\n      entity_id\n      name\n      price\n      sku\n      status\n      type_id\n      visibility\n      weight\n    }\n    total_count\n  }\n}\n```\n\n**Response:**\n\n```json\n{\n  \"data\": {\n    \"MockDataProduct\": {\n      \"items\": [\n        {\n          \"entity_id\": 1,\n          \"name\": \"Smart Backpack\",\n          \"price\": 531.97,\n          \"sku\": \"FAKE-0348VS\",\n          \"status\": 1,\n          \"type_id\": \"simple\",\n          \"visibility\": 4,\n          \"weight\": 4.41\n        }\n      ],\n      \"total_count\": 1\n    }\n  }\n}\n```\n```graphql\n{\n  MockDataCustomer(numberOfItems: 1) {\n    items {\n      addresses\n      {\n        street\n        country_id\n      }\n      id\n      email\n    }\n    total_count\n  }\n}\n```\n\n**Response:**\n\n```json\n{\n  \"data\": {\n    \"MockDataCustomer\": {\n      \"items\": [\n        {\n          \"addresses\": [\n            {\n              \"street\": [\n                \"23973 Maxime Grove\"\n              ],\n              \"country_id\": \"US\"\n            },\n            {\n              \"street\": [\n                \"9718 Jonathan Rapid Apt. 836\"\n              ],\n              \"country_id\": \"US\"\n            }\n          ],\n          \"id\": 540,\n          \"email\": \"hartmann.dexter@example.net\"\n        }\n      ],\n      \"total_count\": 1\n    }\n  }\n}\n```\n```graphql\n{\n  MockDataOrder(numberOfItems: 1) {\n    items {\n      \n      billing_address {\n        street\n        city\n        country_id\n      }\n      customer_email\n      increment_id\n      grand_total\n      items {\n        sku\n        name\n        qty_ordered\n      }\n      payment {\n        method\n        amount_paid\n      }\n      shipping_amount\n      state\n      status\n      status_histories {\n        comment\n        status\n      }\n    }\n    total_count\n  }\n}\n\n```\n\n**Response:**\n\n```json\n{\n  \"data\": {\n    \"MockDataOrder\": {\n      \"items\": [\n        {\n          \"billing_address\": {\n            \"street\": [\n              \"4994 Jakubowski Bypass\"\n            ],\n            \"city\": \"Port Keatonville\",\n            \"country_id\": \"SA\"\n          },\n          \"customer_email\": \"queen.osinski@example.net\",\n          \"increment_id\": \"427471870\",\n          \"grand_total\": 1533.49,\n          \"items\": [\n            {\n              \"sku\": \"SKU-668UB\",\n              \"name\": \"Ergonomic Laptop\",\n              \"qty_ordered\": 3\n            }\n          ],\n          \"payment\": {\n            \"method\": \"paypal\",\n            \"amount_paid\": 1533.49\n          },\n          \"shipping_amount\": 13.93,\n          \"state\": \"closed\",\n          \"status\": \"pending\",\n          \"status_histories\": [\n            {\n              \"comment\": \"Package delayed due to carrier issues. Informed customer.\",\n              \"status\": \"complete\"\n            }\n          ]\n        }\n      ],\n      \"total_count\": 1\n    }\n  }\n}\n```\n---\n\n## ⚙️ Supported Entities\n\n* `customer`\n* `product`\n* `order`\n\n*(You can extend this to support categories, reviews, invoices, etc.)*\n\n---\n\n## 🧑‍💻 Development Notes\n\n* Uses [FakerPHP](https://fakerphp.org/) for data generation\n* Data is **returned via API response** only (does not save to DB by default)\n* You can extend `MockDataRepository.php` to insert generated entities into Magento DB\n\n---\n\n## 📝 License\n\nThis repository is licensed under the [MIT License](https://opensource.org/licenses/MIT). Feel free to fork, modify, and share.\n\n---\n\n\u0026copy; 2025 Supravat Mondal. All rights reserved.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupravatm%2Fmagento2-fake-data-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupravatm%2Fmagento2-fake-data-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupravatm%2Fmagento2-fake-data-api/lists"}