{"id":14984139,"url":"https://github.com/guokaigdg/react-enterprise-template","last_synced_at":"2025-04-08T02:36:51.176Z","repository":{"id":122483444,"uuid":"596833536","full_name":"guokaigdg/react-enterprise-template","owner":"guokaigdg","description":"🚀 react模板 react项目模板 React19 + webpack5 + TypeScript5 + mobx6 + react-router7 react 模板 基于react企业级模板 项目模板 简单模板 快速模板 ","archived":false,"fork":false,"pushed_at":"2025-03-28T09:00:57.000Z","size":26086,"stargazers_count":513,"open_issues_count":0,"forks_count":37,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-01T01:37:35.004Z","etag":null,"topics":["axios","babel","eslint","mobx","mobx-react","mobx-react-lite","prettier","react","react-hooks","react-router-dom","stylelint","typescript","vite","webpack","webpack5"],"latest_commit_sha":null,"homepage":"https://guokaigdg.github.io/react-enterprise-template/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guokaigdg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-02-03T02:40:42.000Z","updated_at":"2025-03-28T09:01:02.000Z","dependencies_parsed_at":"2024-06-17T03:47:24.331Z","dependency_job_id":"467476a6-6869-4760-aaa9-6140db1d184a","html_url":"https://github.com/guokaigdg/react-enterprise-template","commit_stats":{"total_commits":80,"total_committers":2,"mean_commits":40.0,"dds":0.0625,"last_synced_commit":"837ca38abca5ecf6028afe1c1d649c8da2a62f08"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guokaigdg%2Freact-enterprise-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guokaigdg%2Freact-enterprise-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guokaigdg%2Freact-enterprise-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guokaigdg%2Freact-enterprise-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guokaigdg","download_url":"https://codeload.github.com/guokaigdg/react-enterprise-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247765728,"owners_count":20992361,"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":["axios","babel","eslint","mobx","mobx-react","mobx-react-lite","prettier","react","react-hooks","react-router-dom","stylelint","typescript","vite","webpack","webpack5"],"created_at":"2024-09-24T14:08:31.884Z","updated_at":"2025-04-08T02:36:51.136Z","avatar_url":"https://github.com/guokaigdg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ereact 模板\u003c/h1\u003e\n\u003cbr/\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src='./docs/images/home.png' style='width: 75%'/\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n    简体中文 | \u003ca href=\"./docs/README.en.md\"\u003eEnglish\u003c/a\u003e\n\u003c/p\u003e\n\n## ⚡️ Vite 版本\n\n- react-template-vite: https://github.com/guokaigdg/react-template-vite\n\n## 🔗 在线 Demo\n\n-   在线预览 (PC 端) [react-enterprise-template](https://guokaigdg.github.io/react-enterprise-template/)\n-   在线预览（移动端） [react-template-mobile](https://github.com/guokaigdg/react-template-mobile)\n\n## 👨🏻‍💻 项目说明\n\n-   移动端模板：[react-template-mobile](https://github.com/guokaigdg/react-template-mobile)\n\n-   react 模板, 一个比 CRA 更丰富的模板\n\n-   开发配置文档说明 [React18 + webpack5 + TypeScript4 + react-router + Mobx](https://juejin.cn/post/7197790401495121977)\n\n-   项目创建教程 [《从 0 到 1 搭建一个 React 项目开发模板 》](https://juejin.cn/post/7223267430231326778)\n\n## 🪅 特性\n\n-   📦 开箱即用，无需配置\n-   📝 全面注释说明，学习低成本\n-   🚀 启动编译迅速\n-   🌱 极易定制, 拓展容易\n\n## 🚀 技术栈\n\n[![react](https://img.shields.io/badge/react-19.0.0-brightgreen.svg)](https://github.com/facebook/react/) [![TypeScript](https://img.shields.io/badge/TypeScript-4.9.4-brightgreen.svg)](https://github.com/microsoft/TypeScript)[![webpack](https://img.shields.io/badge/webpack-5.75.0-brightgreen.svg)](https://github.com/facebook/react/) [![axios](https://img.shields.io/badge/axios-0.18.0-brightgreen.svg)](https://github.com/axios/axios) [![mobx](https://img.shields.io/badge/mobx-6.8.0-brightgreen.svg)](https://github.com/mobx) [![react-router](https://img.shields.io/badge/react--router-7.1.5-brightgreen.svg)](https://github.com/remix-run/react-router) [![MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)]()\n\n-   React v19\n-   react-dom v19\n-   TypeScript v4\n-   webpack v5\n-   axios v1\n-   mobx v6\n-   mobx-react-lite v3\n-   react-router v7\n\n## 🎄 陆续更新内容：\n\n-   新增样式 ✅ [config: 🔧  新增样式文件(css/less/sass/postCss)处理](https://github.com/guokaigdg/react-enterprise-template/commit/11fb415bac609dfa7474a1ee2db93ccb4a350a51)\n-   代码规范 ✅ [config: 🔧  新增 Prettier/ESlint/StyleLint/EditorConfig 代码规范](https://github.com/guokaigdg/react-enterprise-template/commit/87dd1ca333f81203dd245a6eb40479a0745f096f)\n-   路由 ✅ [config: 🔧 新增路由管理 react-router-dom v6](https://github.com/guokaigdg/react-enterprise-template/commit/239446d0709eb52bad2b48af4983eef91c49f60d)\n-   网络请求 ✅ [feat: ✨  新增网络请求 Axios v1](https://github.com/guokaigdg/react-enterprise-template/commit/27cd67f641d5ecf53b89770195f75bd32bccce46)\n-   数据共享 ✅ [feat: ✨  新增状态管理 Mobx v6](https://github.com/guokaigdg/react-enterprise-template/commit/992e1884943d4f8bda836f48c60df473418397d7)\n-   React Hook 规则 ✅ [feat: ✨ 新增 react hooks 规则检查](https://github.com/guokaigdg/react-enterprise-template/commit/15346c07a9ffd74f69dd1bb0dd6a4a42aa72df57)\n-   封装全局 SVG 组件 ✅ [feat: ✨ 封装全局 SVG 组件](https://github.com/guokaigdg/react-enterprise-template/commit/066fc6ff28c1ac3b0d6422ebda8d59cdf9275d3a)\n\n-   移动端适配 ✅ [feat: ✨  增加移动端适配方案: postcss-px-to-viewport](https://github.com/guokaigdg/react-enterprise-template/commit/78b10e2d0bada75f4043eaa43aecffb2973fd357)\n\n-   Mobx 使用区别说明 ✅ [feat: ✨  增加 makeObservable 与 makeAutoObservable 说明与使用示例](https://github.com/guokaigdg/react-enterprise-template/commit/11cee6d4e2f24eebe2d3eec3357d73eca7f9aa8c)\n\n-   mobx-react-lite 优化 ✅ [feat: ✨  新增 mobx-react-lite 中 observer 与 Observer 使用与优化](https://github.com/guokaigdg/react-enterprise-template/commit/fe5620b4281e49d44cb25a945a6ba04f125f3f29)\n\n-   新增 UI 设计资料 ✅ [docs: 📝  更新开发设计资料参考文档](https://github.com/guokaigdg/react-enterprise-template/commit/a75a6a705a0e2367dbfcef5e5d562e72b63057df)\n\n-   现代化的 CSS 样式重置 ✅ [style: 🎨 A Modern CSS Reset 现代化的 CSS 样式重置](https://github.com/guokaigdg/react-enterprise-template/commit/71568e774862fb7430a48f2447ecb6f31b53078b)\n\n## ⌛️ 安装项目依赖\n\n-   `node` \u003e= 16.0.0\n-   `npm` \u003e= 7.0.0\n-   `yarn` \u003e= 1.22.17\n\n```\nnpm install\n```\n\n```\nyarn\n```\n\n```\npnpm install\n```\n\n## 🚀 运行项目\n\n```\nnpm\n$ npm run start\n\nyarn\n$ yarn dev\n```\n\n## 📦 打包编译\n\n```\nnpm run build:qa  // 测试环境\nnpm run build:prod  // 线上环境\n```\n\n## 🏷 分支说明\n\n| 分支   | 说明          |\n| ------ | ------------- |\n| main   | 主分支        |\n| dev    | 开发分支      |\n| deploy | demo 部署分支 |\n\n## 代码提交规范\n\n```\ngit \u003ctype\u003e: \u003csubject\u003e\ngit commit -m “feat: 项目初始化”\n```\n\n### type 参考:\n\n```\nfix       🐛 Bug修复\nfeature   ✨ 引入新特性\ndocs      📝 文档书写改动\nprune     🔥 移除代码或文件\nperf      ⚡ 性能相关优化\nrocket    🚀 部署功能\nstyle     💄 style修改\ninit      🎉 初始化提交\nrelease   🔖 发布版本\nwip       🚧 正在进行中, 且有可能出现不稳定运行的提交\nconfig    🔧 修改配置文件\nrefactot  🔨 重构(既不增加新功能, 也不修改bug的代码改动)\nmerge     🔀 合并分支\n```\n\n## 📂 目录结构\n\n```\n    ├── .vscode\n    │   └──setting.json                 # 先于vscode全局的settings.json配置\n    ├── doc                             # 开发文档记录\n    ├── webpack                         # 打包编译\n    │   └──config                       # webpack配置\n    │       ├── webpack.common.js       # 基础配置\n    │       ├── webpack.dev.js          # 开发环境配置\n    │       └──webpack.prod.js          # 生产环境配置\n    ├── pubilc\n    │   ├──favicon.ico                  # HTML图标\n    │   └──index.html                   # HTML入口模板\n    ├── src\n    |   ├── api                         # 接口配置\n    |   ├── assets                      # 静态资源\n    │   ├── components                  # 项目通用通用组件\n    │   ├── http                        # 请求统一封装\n    │   ├── httpinterface               # ts类型定义\n    │   ├── constData                   # 系统内的常量列表\n    │   ├── router                      # 统一路由入口\n    │   ├── store                       # 数据共享\n    │   ├── styles                      # 全局样式\n    │   ├── utils                       # 工具库\n    │   ├── view                        # 页面\n    │   ├── App.tsx                     # 主界面\n    │   └──index.tsx                    # 入口文件\n    ├── .babelrc.js                     # babel配置\n    ├── .editorconfig                   # 跨编辑器维护一致编码风格\n    ├── .env.json                       # 环境变量配置\n    ├── .eslintignore                   # ESLint忽略检测文件\n    ├── .eslintrc.js                    # ESLint配置\n    ├── .gitignore                      # git提交忽略文件\n    ├── .npmrc\n    ├── .prettierignore                 # prettierc忽略文件\n    ├── .prettierrc                     # prettierc配置\n    ├── .stylelintrc.js                 # 代码风格配置\n    ├── LICENSE                         # 开源协议\n    ├── package-lock.json               # npm安装包锁定管理\n    ├── package.json                    # 依赖包管理\n    ├── README.md                       # 项目说明\n    ├── tsconfig.json                   # ts配置文件\n    └── yarn.lock                       # yarn安装包锁定管理\n\n```\n\n## 📚 开发资料参考\n\n-   \u003ca href=\"./docs/data.md\"\u003e开发资料参考\u003c/a\u003e\n\n## 🤝 如何贡献\n\n-   📬 有问题直接 issues 或者留言\n-   🧙‍♀️ 欢迎所有的贡献者，快来 Issus 或 Pull requests 成为贡献者吧\n-   🙋 [查看如何贡献代码](https://n7j2qc9z43.feishu.cn/docx/HAu9d1PCuo12Cvxrlelc0eEWnNc?from=from_copylink)\n\n## 💡 开源协议\n\n该项目的代码和文档基于  MIT License  开源协议。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguokaigdg%2Freact-enterprise-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguokaigdg%2Freact-enterprise-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguokaigdg%2Freact-enterprise-template/lists"}