# Context Map
This is a multi-module Maven monorepo. Each `crm-{域}` module is a bounded context with its own ubiquitous language in a per-module `CONTEXT.md` . This file is the index — read it first, then open the relevant module's `CONTEXT.md` .
## Contexts
| Module | Context | Glossary |
| --- | --- | --- |
| `crm-auth` | 认证与第三方登录 | [`crm-auth/CONTEXT.md` ](./crm-auth/CONTEXT.md ) |
feat(dict): data dictionary module — two-level flat model, CRUD/default/cache/permission/seed (ADR-0015)
- 4 tables (dict_group/dict_item/dict_group_default/dict_ref_count), delete_key soft-delete reuse
- DictGroup/DictItem full CRUD + force-delete + status toggle + enabled-list
- DictReferenceService: increment/decrement/batchApply/isReferenced, same-tx ref_count, no cache
- DictQueryService: Caffeine 10s cache + 2s negative cache for empty results, group.status join
- Default item: INSERT ON DUPLICATE KEY UPDATE, hibernate on group disable, auto-restore
- Permission seeds: 10 perm codes → sys_menu tree, bound to ROLE_ADMIN, no crm-auth import
- Built-in dict initializer: idempotent upsert, builtin=false never touched (US-41), value not overwritten
- 48 tests pass; full project compiles
1 month ago
| `crm-dict` | 数据字典(平台级键值字典) | [`crm-dict/CONTEXT.md` ](./crm-dict/CONTEXT.md ) |
| `crm-file` | 文件存储(上传/预览) | [`crm-file/CONTEXT.md` ](./crm-file/CONTEXT.md ) |
| `crm-base` | 基础包(通用能力,非业务域) | [`crm-base/CONTEXT.md` ](./crm-base/CONTEXT.md ) |
| `crm-app` | 唯一启动入口 | _(暂无独立领域语言)_ |
## System-wide decisions
ADR 目录 `docs/adr/` (系统级决策)。`README.md` 当前引用了 ADR-0003 / 0004 / 0006,但文件尚未落地——由 `/domain-modeling` 在决策真正被解决时补齐。ADR-0016 记录了 PermissionSeeder seam 决策(消除跨模块权限种子化的影子实体)。
## Adding a new context
新建 `crm-{域}` 模块时:在模块根放 `CONTEXT.md` (领域语言),并在本表新增一行。