# e-commerce-admin **Repository Path**: y_ttitt/e-commerce-admin ## Basic Information - **Project Name**: e-commerce-admin - **Description**: 跨境电商管理平台前端 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-03-11 - **Last Updated**: 2026-05-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 网站管理系统 — 前端 React + TypeScript + Vite + Ant Design ## 服务器部署信息 | 项目 | 值 | |------|------| | 服务器 | 49.234.53.232 | | SSH 用户 | ubuntu | | 项目源码目录 | `/opt/website-management/e-commerce-admin` | | Nginx 静态资源目录 | `/var/www/website-management/current` | | Nginx 配置 | `/etc/nginx/sites-enabled/default` | ### 日常部署说明 前端线上正式发布默认由后端项目中的总脚本统一触发: ```bash cd ../e-commerce-api bash scripts/deploy_full_remote_update.sh ``` 这个总脚本会在服务器上自动完成前端: - `git pull` - `npm ci` - `npm run build` - 覆盖发布到 `/var/www/website-management/current` - reload nginx 如果你明确只需要单独重发前端,也可以在前端项目里单独执行: ```bash bash scripts/deploy_remote_update.sh ``` > **注意**:Nginx root 是 `/var/www/website-management/current`,不是项目源码的 `dist/` 目录。线上真正生效的是 current 目录;标准日常发布入口仍然是后端项目中的 `scripts/deploy_full_remote_update.sh`。 ## 本地开发 ## React Compiler The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). ## Expanding the ESLint configuration If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: ```js export default defineConfig([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Remove tseslint.configs.recommended and replace with this tseslint.configs.recommendedTypeChecked, // Alternatively, use this for stricter rules tseslint.configs.strictTypeChecked, // Optionally, add this for stylistic rules tseslint.configs.stylisticTypeChecked, // Other configs... ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ``` You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: ```js // eslint.config.js import reactX from 'eslint-plugin-react-x' import reactDom from 'eslint-plugin-react-dom' export default defineConfig([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Enable lint rules for React reactX.configs['recommended-typescript'], // Enable lint rules for React DOM reactDom.configs.recommended, ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ```