{"id":16175799,"url":"https://github.com/snapre/macaca-datahub-sample","last_synced_at":"2025-04-21T11:33:30.357Z","repository":{"id":38336154,"uuid":"477050673","full_name":"snapre/macaca-datahub-sample","owner":"snapre","description":"一个 Demo 教你用 Macaca DataHub 解决前端开发时的数据 Mock 问题","archived":false,"fork":false,"pushed_at":"2025-03-26T22:23:22.000Z","size":5156,"stargazers_count":54,"open_issues_count":12,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-26T23:27:12.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/snapre.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-04-02T12:39:20.000Z","updated_at":"2025-01-16T10:28:48.000Z","dependencies_parsed_at":"2023-01-21T08:06:05.796Z","dependency_job_id":"6f8a9f06-e46c-4868-8c99-188cb86f2b53","html_url":"https://github.com/snapre/macaca-datahub-sample","commit_stats":{"total_commits":48,"total_committers":4,"mean_commits":12.0,"dds":0.6041666666666667,"last_synced_commit":"96582f8f2628a70161fb3247b6e812bb2b59eb3c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapre%2Fmacaca-datahub-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapre%2Fmacaca-datahub-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapre%2Fmacaca-datahub-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapre%2Fmacaca-datahub-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snapre","download_url":"https://codeload.github.com/snapre/macaca-datahub-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250048101,"owners_count":21366176,"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":"2024-10-10T04:46:14.144Z","updated_at":"2025-04-21T11:33:29.927Z","avatar_url":"https://github.com/snapre.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Macaca DataHub sample\n\n\u003e 如何用 DataHub 解决前端工程师开发过程中的数据 Mock 问题\n\n## 启动前端开发服务 (React + Vite)\n\n```bash\n$ cd frontend\n$ npm install\n$ npm run dev\n```\n\n## 配置 DataHub 环境\n\n1. 全局安装 macaca-datahub:\n```bash\n$ npm install macaca-datahub -g\n```\n\n2. 一键启动服务:\n```bash\n$ datahub server\n```\n\n3. 打开 DataHub 启动的地址:\n```bash\n$ http://127.0.0.1:9200\n```\n\n4. 创建一个 Hub 并打开数据上传模式:\n![创建 Hub](./docs/public/datahub-create-hub.png)\n![打开数据上传模式](./docs/public/open-upload-button.png)\n\n5. 导入此目录下的模板数据: `project_sample.json`\n![导入模板数据](./docs/public/upload-data.png)\n\n6. 进入刚创建的 Hub，开始用 DataHub 助力前端开发:\n![Dashboard](./docs/public/main.png)\n![Frontend Dev](./docs/public/frontend-dev.png)\n\n## Just enjoy the data out-of-the-box\n\n![Demo](./docs/public/demo.gif)\n\n## 进阶\n\n### 启动后端服务联调 (Eggjs)\n```bash\n$ cd server\n$ npm install\n$ npm run dev\n```\n\n### 可在联调阶段通过实时快照快速录入场景数据\n![Snapshot Import](./docs/public/snapshot-import.png)\n\n\u003c!-- GITCONTRIBUTOR_START --\u003e\n\n## Contributors\n\n|[\u003cimg src=\"https://avatars.githubusercontent.com/u/52845048?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003esnapre\u003c/b\u003e\u003c/sub\u003e](https://github.com/snapre)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/in/15368?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003egithub-actions[bot]\u003c/b\u003e\u003c/sub\u003e](https://github.com/apps/github-actions)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/1011681?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003exudafeng\u003c/b\u003e\u003c/sub\u003e](https://github.com/xudafeng)\u003cbr/\u003e|\n| :---: | :---: | :---: |\n\n\nThis project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Apr 19 2022 14:11:24 GMT+0000`.\n\n\u003c!-- GITCONTRIBUTOR_END --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapre%2Fmacaca-datahub-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnapre%2Fmacaca-datahub-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapre%2Fmacaca-datahub-sample/lists"}