{"id":26621594,"url":"https://github.com/zhitrend/zhitrend-store","last_synced_at":"2026-01-31T10:02:26.183Z","repository":{"id":266104904,"uuid":"897394190","full_name":"zhitrend/zhitrend-store","owner":"zhitrend","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-03T12:34:31.000Z","size":698,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T10:46:03.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/zhitrend.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-12-02T14:57:09.000Z","updated_at":"2024-12-09T03:05:52.000Z","dependencies_parsed_at":"2024-12-05T23:46:26.169Z","dependency_job_id":null,"html_url":"https://github.com/zhitrend/zhitrend-store","commit_stats":null,"previous_names":["zhangrongwu/zhitrend-store","zhitrend/zhitrend-store"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhitrend/zhitrend-store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Fzhitrend-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Fzhitrend-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Fzhitrend-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Fzhitrend-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhitrend","download_url":"https://codeload.github.com/zhitrend/zhitrend-store/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Fzhitrend-store/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28937813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T08:53:31.997Z","status":"ssl_error","status_checked_at":"2026-01-31T08:51:38.521Z","response_time":128,"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":[],"created_at":"2025-03-24T09:17:28.589Z","updated_at":"2026-01-31T10:02:26.168Z","avatar_url":"https://github.com/zhitrend.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 电商系统\n\n一个基于 React + Cloudflare Workers 的现代电商系统。初创公司/个人独立站最好的组合\n\n## 功能特点\n\n### 用户端\n- 商品浏览和搜索\n- 购物车管理\n- 订单管理\n- 商品评价\n- 收藏夹\n- 个人中心\n\n### 管理端\n- 商品管理\n- 库存管理\n- 订单管理\n- 营销活动\n- 数据分析\n- 用户管理\n\n## 技术栈\n\n### 前端\n- React 18\n- TypeScript\n- Vite\n- React Router\n- TanStack Query\n- Tailwind CSS\n- Headless UI\n- Hero Icons\n\n### 后端\n- Cloudflare Workers\n- Hono\n- D1 (SQLite)\n- R2 Storage\n\n## 开始使用\n\n### 前置要求\n- Node.js 16+\n- npm 7+\n- Cloudflare 账号\n\n### 安装步骤\n\n1. 克隆项目 \n\n2. 安装前端依赖\ncd frontend\nnpm install\n3. 安装后端依赖\ncd backend\nnpm install\n\n4. 配置环境变量\n- 复制 `backend/wrangler.toml.example` 为 `backend/wrangler.toml`\n- 更新配置文件中的必要信息：\n  - D1 数据库 ID\n  - R2 存储桶名称\n  - JWT 密钥\n\n5. 初始化数据库\ncd backend\nnpm run db:migrate\n\n6. 启动开发服务器\n\n前端：\ncd frontend\nnpm run dev\n\n后端：\ncd backend\nnpm run dev\n\n## 项目结构\n.\n├── frontend/ # 前端项目\n│ ├── src/\n│ │ ├── components/ # 可复用组件\n│ │ ├── pages/ # 页面组件\n│ │ ├── hooks/ # 自定义 Hooks\n│ │ └── utils/ # 工具函数\n│ └── public/ # 静态资源\n│\n└── backend/ # 后端项目\n├── src/\n│ ├── middleware/ # 中间件\n│ ├── utils/ # 工具函数\n│ └── index.ts # 入口文件\n└── schema.sql # 数据库模式\n\n## API 文档\n\n### 认证 API\n- POST `/api/auth/register` - 用户注册\n- POST `/api/auth/login` - 用户登录\n\n### 商品 API\n- GET `/api/products` - 获取商品列表\n- GET `/api/products/:id` - 获取商品详情\n- POST `/api/products` - 创建商品\n- PUT `/api/products/:id` - 更新商品\n- DELETE `/api/products/:id` - 删除商品\n\n### 购物车 API\n- GET `/api/cart` - 获取购物车\n- POST `/api/cart` - 添加商品到购物车\n- PUT `/api/cart/:id` - 更新购物车商品\n- DELETE `/api/cart/:id` - 删除购物车商品\n\n### 订单 API\n- GET `/api/orders` - 获取订单列表\n- GET `/api/orders/:id` - 获取订单详情\n- POST `/api/orders` - 创建订单\n- PUT `/api/orders/:id` - 更新订单状态\n\n### 管理 API\n- GET `/api/admin/stats` - 获取统计数据\n- GET `/api/admin/users` - 获取用户列表\n- GET `/api/admin/analytics` - 获取分析数据\n\n## 部署\n\n1. 构建前端\ncd frontend\nnpm run build\n\n2. 部署后端\ncd backend\nnpm run deploy\n\n3. 部署前端\n- 将 `frontend/dist` 目录部署到静态托管服务\n- 或部署到 Cloudflare Pages\n\n## 贡献指南\n\n1. Fork 项目\n2. 创建功能分支 (`git checkout -b feature/AmazingFeature`)\n3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)\n4. 推送到分支 (`git push origin feature/AmazingFeature`)\n5. 提交 Pull Request\n\n## 许可证\n\n本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情\n\n## 联系方式\n\nemail: zhitrend@gmail.com\n\n[公司主页](https://zhitrend.us.kg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhitrend%2Fzhitrend-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhitrend%2Fzhitrend-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhitrend%2Fzhitrend-store/lists"}