# proj.kitchen **Repository Path**: kimikkorow/proj.kitchen ## Basic Information - **Project Name**: proj.kitchen - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-30 - **Last Updated**: 2026-04-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # React + TypeScript + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) ## 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... }, }, ]) ``` --- ## Docker 部署 项目提供 Docker 多阶段构建和 docker-compose 编排,支持生产与开发两种模式。 ### 生产部署 ```bash # 构建并启动 docker compose --profile prod up -d # 仅构建 docker compose --profile prod build # 查看日志 docker compose --profile prod logs -f # 停止 docker compose --profile prod down # 访问 http://localhost:5174 ``` - 基于 `nginx:alpine`,镜像体积约 25MB - 静态资源缓存 1 年(利用文件名哈希) - API JSON 缓存 1 天 - 开启 Gzip 压缩 - SPA 路由自动回退到 `index.html` ### 开发模式(热重载) ```bash docker compose --profile dev up -d # 访问 http://localhost:5173 ``` - 源码挂载到容器内,修改后自动热更新 - Vite 开发服务器运行在容器内 ### 文件结构 ``` ├── Dockerfile # 多阶段构建 ├── docker-compose.yml # 编排配置(prod/dev 双模式) ├── nginx.conf # Nginx 配置 └── .dockerignore # 构建上下文排除 ```