Skip to content
bitzorcas
EN

Guide

贡献指南

如何为 BitzOrcas 做贡献 — 代码风格、提交规范、PR 流程和项目结构。

Last updated

感谢你对 BitzOrcas 贡献的兴趣!

项目结构

src/
├── BuildingBlocks/ → 共享基础设施(10 个包)
├── Platform/ → 业务模块(3 个项目)
├── Hosts/ → 可执行宿主(4 个项目)
└── Tooling/ → CLI 工具和模板
tests/
├── BitzOrcas.Unit.Tests
├── BitzOrcas.Application.Tests
├── BitzOrcas.Integration.Tests
├── BitzOrcas.Architecture.Tests
└── BitzOrcas.CodeGeneration.Tests

代码风格

  • 语言:C#,启用可空引用类型
  • 命名:公共成员使用 PascalCase,私有字段使用 _camelCase
  • 注释:源码中使用中文注释(团队约定)
  • AOT 感知:AOT 启用的项目(API Host)中不使用反射

提交规范

  • 使用约定式提交:feat:fix:docs:refactor:test:
  • 在适用时关联 Issue 编号

PR 流程

  1. Fork 仓库
  2. 创建功能分支
  3. 进行修改
  4. 运行 dotnet builddotnet test
  5. 提交 Pull Request

模块创建清单

添加新模块时:

  • Infrastructure.Persistence.Models 中的实体
  • Platform.Application 中的服务端口
  • Platform.Application 中的 InMemory/Null 默认实现
  • Infrastructure.SqlSugar 中的 SqlSugar 仓储
  • SaaS.Contracts 中的集成事件 DTO
  • Api/Endpoints 中的 Minimal API 端点
  • PersistenceRegistration 中的 DI 注册
  • 模块边界的架构测试

另见