{"id":22369227,"url":"https://github.com/gunksd/order-management","last_synced_at":"2025-03-26T16:20:42.445Z","repository":{"id":263439999,"uuid":"890360252","full_name":"gunksd/order-management","owner":"gunksd","description":"order-management server system","archived":false,"fork":false,"pushed_at":"2025-01-10T10:17:05.000Z","size":20013,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T19:13:39.292Z","etag":null,"topics":["backend","frontend","js","management","node","react","server","system"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gunksd.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":"2024-11-18T12:45:17.000Z","updated_at":"2025-01-10T10:17:09.000Z","dependencies_parsed_at":"2025-01-10T10:45:00.102Z","dependency_job_id":null,"html_url":"https://github.com/gunksd/order-management","commit_stats":null,"previous_names":["gunksd/order-management"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunksd%2Forder-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunksd%2Forder-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunksd%2Forder-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunksd%2Forder-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunksd","download_url":"https://codeload.github.com/gunksd/order-management/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245689474,"owners_count":20656418,"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":["backend","frontend","js","management","node","react","server","system"],"created_at":"2024-12-04T19:18:30.976Z","updated_at":"2025-03-26T16:20:42.439Z","avatar_url":"https://github.com/gunksd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# order-management\n# 点餐管理系统\n\n## 使用指南：\n#### 环境需求：node 18 + react + express等\n### 1.首先需要配置一下本地数据库，在数据库里面输入本项目database文件夹的`order.sql`文件，来创建相对应的初始数据库。除此之外数据库的sa密码要正确填入backend的`.env`文件。\n\n### 2.然后打开电脑上的sql server配置管理器，在里面启动TCP/IP协议，默认端口1433，在本地防火墙也要添加允许这个端口通过（如果需要的话）。\n\u003cimg src=\"frontend/order-management-frontend/public/image.png\" alt=\"配置管理器\" style=\"width:300px; height:auto;\"\u003e\n\n```js\nps:此步不能改数据库的1433端口，否则会报错。1433是默认端口。\n```\n### 3.下面配置后端的`.env`文件。\n具体内容应该如下：\n```bash\nDB_USER=\nDB_PASSWORD=\nDB_SERVER=\nDB_NAME=\nJWT_SECRET=\nPORT=\n```\n1.DB_USER为了图方便我直接sa，生产环境应该是别的情况。\u003c/br\u003e\n2.DB_PASSWORD填你的密码，我这里就是sa的密码。\u003c/br\u003e\n3.DB_SERVER本地就是localhost，云端填你云端数据库的远程服务器的 IP 地址或者域名。\u003c/br\u003e\n4.DB_NAME我这里就是OrderManagement，你可以改成你起的数据库名，但一定要对应上。\u003c/br\u003e\n5.JWT_SECRET是中间件的验证密钥，你可以自己想一个复杂的或者用工具生成。\u003c/br\u003e\n6.PORT由于我是本地我就填了5000,如果是远程服务器就填远程服务器端口，例如8080.\u003c/br\u003e\n\n### 4.此时应该就可以运行后端服务器了，具体步骤如下：\n1.切换到`/backend`文件夹下面：\u003c/br\u003e\n```bash\ncd backend\n```\n2.下载依赖：\n```bash\nnpm install\n```\n3.运行后端服务器：\n```bash\nnode server.js\n```\n4.检验：\u003c/br\u003e\n\n此时打开端口应当看到正常启动服务器，如若没有请根据报错信息排查。\n![alt text](frontend/order-management-frontend/public/backend.png)\n\n### 5.前端配置：\n1.前端的`.env`文件配置：\n```s\n# 服务器的 API 基础 URL\nREACT_APP_API_URL=\n\n# 应用模式（例如开发模式）\nREACT_APP_MODE=\n```\nURL填写你服务器端口的url，例如我的本地就是http://localhost:3000\n\nmode可以不管他，是为了区分处于哪一种环境下的。\n\n2.下载模块：\u003c/br\u003e\n```bash\ncd frontend/order-management-frontend\nnpm install \n```\n3.启动前端服务：\n```bash\ncd frontend/order-management-frontend\nnpm start\n```\n4.此时前端应该能正常运行，可以在浏览器端口中查看并且与后端和数据库进行交互了。\n\n### 6.最终成品展示：\n(1).登录页：\n![login page](./frontend/order-management-frontend/public/登录页面.png)\n(2).注册页面：\n![register page](./frontend/order-management-frontend/public/注册页面.png)\n(3).管理员页面：\n![admin page](./frontend/order-management-frontend/public/管理员页面1.png)\n![admin page](./frontend/order-management-frontend/public/管理员页面2.png)\n![admin page](./frontend/order-management-frontend/public/管理员页面3.png)\n(4).添加菜品：\n![dish card](./frontend/order-management-frontend/public/添加菜品.png)\n(5).添加菜品成功：\n![success](./frontend/order-management-frontend/public/成功动画.png)\n(6).顾客页面：\n![customer page](./frontend/order-management-frontend/public/顾客页面1.png)\n![customer page](./frontend/order-management-frontend/public/顾客页面2.png)\n(7).批量：\n![sum](./frontend/order-management-frontend/public/批量1.png)\n![sum](./frontend/order-management-frontend/public/批量2.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunksd%2Forder-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunksd%2Forder-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunksd%2Forder-management/lists"}