5.0 KiB
5.0 KiB
善缘丹阳 V1.1 技术架构基线
确认 V1.1 的技术栈、模块边界和架构约束。
2026-09-09 基线说明:V1.1 是 V1.0 的增量升级,六份客户修订文档共同约束实现。当前目录未包含
.git元数据,无法验证来源分支、提交号和工作区洁净度;在原仓库恢复或用户明确授权创建新仓库前,不得伪造 Git 版本基线。
技术栈(保持不变)
Backend: Java 21 + Spring Boot 3.2.5 + MyBatis-Plus 3.5.5
Database: PostgreSQL 15+(Flyway管理迁移)
Cache: Redis 7+
Messaging: WebSocket(Spring WebSocket)
Storage: S3-Compatible Private Object Storage(MinIO)
Admin Web: Vue 3 + TypeScript + Vite + Pinia + Element Plus
Miniapp: 微信小程序原生 + TypeScript
Deployment: Docker + Docker Compose + Nginx
架构约束
禁止引入
- Kubernetes
- Kafka / RabbitMQ
- Elasticsearch / ClickHouse / Neo4j / Milvus
- 微服务拆分
- 复杂工作流引擎
保持不变
- 1个后端服务(模块化单体)
- 1个PostgreSQL
- 1个Redis
- 1个Object Storage
- 1个Admin Web
- 1个小程序
后端领域模块(V1.1扩展后)
V1.0 原有模块(18个)
auth / user / verification / profile / review / match / relationship
messaging / activity / matchmaker / risk / appeal / notification
organization / permission / analytics / audit / config / photo
V1.1 新增模块(8个)
banner — HomeBanner管理
service_location — 善缘服务站
appointment — 服务预约
counseling — 婚恋咨询与婚前辅导
content — 婚恋课堂/反诈内容管理
service_program — 专项公益服务项目
local_eligibility— 本地资格核验
home — 首页聚合API(HomeApplicationService)
模块边界规则
- 禁止跨模块直接写其他模块数据库表
- 使用 Application Service / Domain Service / 明确接口调用
- 共用基础能力:User / Notification / Audit / Risk / Object Storage
数据库 Migration 现状
| 版本 | 描述 |
|---|---|
| V001~V014 | V1.0 核心41张表 |
| V1xx(待开发) | V1.1 新增14张表 |
V1.1 建议迁移命名:
V100__add_home_banners
V101__add_service_locations
V102__add_service_appointments
V103__add_counseling_services
V104__add_counseling_followups
V105__add_content_categories
V106__add_content_articles
V107__add_user_local_eligibilities
V108__add_local_eligibility_evidences
V109__add_service_programs
V110__add_service_program_members
V111__add_organization_relationships
V112__add_activity_organizations
V113__add_activity_mutual_connection_consents
V114__extend_activities_v11
V115__extend_users_v11
V116__extend_operators_v11
V1.1 新增表清单(14张)
| 表名 | 核心用途 | 敏感度 |
|---|---|---|
| home_banners | 首页Banner运营 | 低 |
| service_locations | 服务站信息 | 低 |
| service_appointments | 用户服务预约 | 中 |
| counseling_services | 婚恋咨询记录 | 高 |
| counseling_followups | 咨询服务摘要 | 高 |
| content_categories | 内容分类 | 低 |
| content_articles | 公益文章内容 | 低 |
| user_local_eligibilities | 本地资格主体 | 中 |
| local_eligibility_evidences | 本地资格佐证文件 | 高 |
| service_programs | 专项公益项目 | 低 |
| service_program_members | 项目成员关联 | 中 |
| organization_relationships | 组织间关系 | 低 |
| activity_organizations | 活动多组织关联 | 低 |
| activity_mutual_connection_consents | 活动互选双向确认 | 中 |
新增角色权限矩阵(V1.1)
| 角色 | 核心权限 | 数据范围 |
|---|---|---|
| service_station_operator | service_location.view, service_appointment.process | 仅本服务站预约 |
| counselor | counseling.service.view/process, counseling.note.create | 仅Assigned服务 |
| counseling_manager | counseling.service.assign/complete | 全部咨询(不看正文) |
| content_editor | content.view/create/edit/publish | 无用户数据权限 |
敏感访问规则
以下数据需要特殊权限 + 业务理由 + SensitiveAccessLog:
- 完整身份证
- 本地资格原始佐证文件
- 咨询敏感备注
- 私人聊天(仅案件上下文)
Feature Flags(V1.1)
counselingEnabled — 婚恋咨询功能开关
premaritalEnabled — 婚前辅导功能开关
serviceLocationEnabled — 善缘服务站功能开关
contentEnabled — 内容中心功能开关
localEligibilityEnabled — 本地资格功能开关
imageChatEnabled — 图片聊天功能开关
matchmakerEnabled — 公益红娘功能开关
activityEnabled — 活动功能开关
livenessVerificationEnabled — 人脸核验功能开关(V1.2预留)
部署架构(保持不变)
Nginx → Backend Container
↓
PostgreSQL + Redis + MinIO
↓
Docker Compose 一键部署
生成时间: 2026-09-08 | Codex首轮执行期间生成