item-atlas/backend/README.md

16 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 后端
后端是一个 Maven 多模块构建。聚合与公共依赖版本放在 `backend/pom.xml`,三个模块各自构建镜像,通过服务接口通信。
| 路径 | 职责 | Maven artifactId |
| --- | --- | --- |
| `gateway/` | API 路由、认证入口、限流和灰度 | `item-atlas-gateway` |
| `inventory-service/` | 家庭权限、物品、位置、搜索、关联、评价和附件 | `item-atlas-inventory-service` |
| `intake-service/` | 草稿、模型、额度、异步任务和确认结果 | `item-atlas-intake-service` |
聚合项目使用 `item-atlas-backend`,Java 根包为 `com.tutudog.itematlas`。各模块采用 Maven 的 `src/main/java`、`src/main/resources`、`src/test/java` 和 `src/test/resources`。部署镜像的 Dockerfile 与各自模块放在一起。
业务服务按领域组织包,例如物品服务的 `item`、`location`、`household`。领域内有相关职责时再拆 `api`、`application`、`domain` 和 `infrastructure`。Flyway 脚本随所属服务放进 `src/main/resources/db/migration`。网关按路由和访问控制组织。
[系统架构](../docs/architecture/system.md) · [Maven 标准目录](https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html) · [Maven 多模块指南](https://maven.apache.org/guides/mini/guide-multiple-modules.html)