# jvc-standard **Repository Path**: linuxof/jvc-standard ## Basic Information - **Project Name**: jvc-standard - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-27 - **Last Updated**: 2026-03-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # JVC-Standard > **Java Vue Code Standard** - 一键安装企业级代码规范、AI 评审规则、架构最佳实践到任何 Spring Boot 项目 [![npm version](https://img.shields.io/npm/v/jvc-standard.svg)](https://www.npmjs.com/package/jvc-standard) [![License](https://img.shields.io/npm/l/jvc-standard.svg)](https://npmjs.org/package/jvc-standard) [![npm](https://img.shields.io/npm/dt/jvc-standard.svg)](https://www.npmjs.com/package/jvc-standard) --- ## 📖 简介 JVC-Standard 是一套**企业级项目规范模板**,集成了: - ✅ **阿里巴巴 Java 开发手册** 完整规范 - ✅ **CodeRabbit AI 代码评审** 配置 - ✅ **分布式系统架构规范**(事件驱动/消息队列/异步处理) - ✅ **高并发解决方案**(Redis 缓存/本地缓存/分库分表) - ✅ **性能优化方案**(索引优化/缓存策略/SQL 调优) - ✅ **定时任务规范**(XXL-Job/Quartz/@Scheduled) 通过 NPM 包的形式,**一键安装**到任何 Spring Boot 项目,帮助团队快速建立统一的代码规范体系。 --- ## 🚀 快速开始 ### 1. 安装 ```bash npx jvc-standard install [your-project] ``` ### 2. 使用 ```bash cd your-project # 1. 初始化项目规范 jvc-standard init # 2. 更新模板(可选) jvc-standard update # 3. 检查规范遵守情况(可选) jvc-standard check ``` --- ## 📁 安装后文件结构 ``` your-project/ ├── .coderabbit.yaml # AI 代码评审规则(核心) ├── docs/ │ ├── code-style/ │ │ ├── alibaba-java-style-guide.md # 阿里巴巴 Java 开发手册 │ │ └── log-handling-standard.md # 日志处理规范 │ ├── architecture/ │ │ ├── scheduled-task-standard.md # 定时任务规范 │ │ ├── message-queue-standard.md # 消息队列规范 │ │ ├── event-driven-standard.md # 事件驱动架构 │ │ ├── async-processing-standard.md # 异步处理规范 │ │ └── local-cache-standard.md # 本地缓存规范 │ ├── performance/ │ │ └── performance-optimization-report-template.md # 性能优化模板 │ └── superpowers/ │ ├── checklists/ │ │ └── code-review-checklist.md # 代码评审清单 │ └── settings.json # 项目配置 ├── templates/examples/ │ ├── default-config.json # 默认配置示例 │ ├── ecommerce-config.json # 电商项目配置 │ ├── cms-config.json # CMS 项目配置 │ └── README.md # 配置说明 └── scripts/ # 测试脚本 ├── order-full-flow-test.ps1 ├── test-api-performance.ps1 └── ... ``` --- ## 📋 规范覆盖范围 ### 1. Java 编码规范(89% 覆盖) | 类别 | 覆盖度 | 文档 | |------|--------|------| | 阿里巴巴 Java 开发手册 | 90% | `docs/code-style/alibaba-java-style-guide.md` | | Spring Boot 最佳实践 | 95% | `.coderabbit.yaml` | | MyBatis Plus 规范 | 95% | `.coderabbit.yaml` | | 异常处理规范 | 90% | `.coderabbit.yaml` | | 日志处理规范 | 90% | `docs/code-style/log-handling-standard.md` | | 事务处理规范 | 95% | `.coderabbit.yaml` | ### 2. 架构规范(全新) | 类别 | 优先级 | 状态 | |------|--------|------| | **定时任务** | P0 | ✅ 强制(分布式只用 XXL-Job) | | **消息队列** | P0 | ✅ 强制(幂等性/ACK/死信队列) | | **事件驱动** | P0 | ✅ 强制(事务提交后发布) | | **异步处理** | P0 | ✅ 强制(@Async 线程池配置) | | **本地缓存** | P1 | ✅ 推荐(Caffeine + Redis 双层) | ### 3. AI 代码评审规则 通过 `.coderabbit.yaml` 配置 **60+ 检查项**,自动拦截: - 🔴 **P0 阻塞项**:API 兼容性、分布式任务选型、消息幂等性、线程池配置 - 🟡 **P1 警告项**:日志级别、缓存一致性、事件命名 - 🟢 **P2 建议项**:代码重构、性能优化 --- ## 🔧 核心功能 ### 1. 一键安装 ```bash # 交互式安装(推荐) npx jvc-standard install my-project # 或使用示例配置 npx jvc-standard install my-project --config=ecommerce ``` ### 2. 可自定义配置 通过 `config.json` 自定义占位符替换: ```json { "project_name": "my-shop", "package_name": "com.myshop", "api_prefix": "/api/v1", "table_prefix": "shop_", "server_port": "9000" } ``` ### 3. AI 自动评审 集成 **CodeRabbit** AI 代码评审,提交 PR 时自动: - 检查代码规范 - 识别性能问题 - 发现安全隐患 - 提供修复建议 --- ## 📖 文档 ### 快速入门 - [安装指南](#) - [快速开始](#) - [配置说明](#) ### 核心规范 - [定时任务规范](templates/docs/architecture/scheduled-task-standard.md) - [消息队列规范](templates/docs/architecture/message-queue-standard.md) - [事件驱动架构](templates/docs/architecture/event-driven-standard.md) - [异步处理规范](templates/docs/architecture/async-processing-standard.md) - [本地缓存规范](templates/docs/architecture/local-cache-standard.md) - [日志处理规范](templates/docs/code-style/log-handling-standard.md) ### AI 评审 - [CodeRabbit 配置](templates/.coderabbit.yaml) - [代码评审清单](templates/docs/superpowers/checklists/code-review-checklist.md) --- ## 🎯 使用场景 | 场景 | 推荐方案 | |------|----------| | **新项目启动** | `jvc-standard install` - 完整安装 | | **老项目改造** | `npx jvc-standard init` - 增量添加 | | **规范更新** | `jvc-standard update` - 同步最新规范 | | **代码评审** | 启用 CodeRabbit - AI 自动评审 | --- ## 🤝 贡献 欢迎提交 Issue 和 Pull Request! ### 开发 ```bash git clone https://gitee.com/linuxof/jvc-standard.git cd jvc-standard npm install npm start ``` ### 测试 ```bash # 本地测试安装 npm link jvc-standard install /tmp/test-project ``` --- ## 📄 License MIT License - 详见 [LICENSE](LICENSE) 文件 --- ## 👥 团队 - **Author**: Bee Team - **Maintainer**: @linuxof --- ## 🔗 相关链接 - [NPM 包](https://www.npmjs.com/package/jvc-standard) - [Gitee 仓库](https://gitee.com/linuxof/jvc-standard) - [CodeRabbit](https://coderabbit.ai/) - [阿里巴巴 Java 开发手册](https://developer.aliyun.com/topic/java8) --- ## ⭐ Star History 如果你觉得这个项目有帮助,请给个 Star! [![Star History Chart](https://api.star-history.com/svg?repos=linuxof/jvc-standard&type=Date)](https://star-history.com/#linuxof/jvc-standard&Date)