Commit Graph

16 Commits

Author SHA1 Message Date
hiderfong e7c7f92b69 chore: 补充生产部署配置
- requirements.txt 添加 requests 依赖
- 新增 docker-compose.prod.yml 生产编排文件
- 新增 frontend/Dockerfile.prod 前端生产镜像
- 新增 frontend/nginx.conf 反向代理配置
2026-04-25 10:45:25 +08:00
hiderfong 474e7aa543 docs: 添加DataPointer产品白皮书与功能架构图
- 编写完整功能介绍白皮书(含产品概述、功能详解、技术架构、部署方案)
- 绘制总体功能架构图、数据流向图、安全闭环图、部署架构图、核心业务流程图
2026-04-25 09:34:41 +08:00
hiderfong ddb8cb8471 security: 修改admin密码并移除前端默认账户显示
- 将admin默认密码从admin123修改为Zhidi@n2023
- 更新数据库中admin用户密码哈希
- 更新后端配置、环境变量模板及测试脚本中的密码
- 移除登录页默认管理员账户密码提示文字
- 清空登录表单密码默认值,避免泄露
- 重新构建前端dist产物
2026-04-25 09:05:08 +08:00
hiderfong 6d70520e79 feat: 全量功能模块开发与集成测试修复
- 新增后端模块:Alert、APIAsset、Compliance、Lineage、Masking、Risk、SchemaChange、Unstructured、Watermark
- 新增前端模块页面与API接口
- 新增Alembic迁移脚本(002-014)覆盖全量业务表
- 新增测试数据生成脚本与集成测试脚本
- 修复metadata模型JSON类型导入缺失导致启动失败的问题
- 修复前端Alert/APIAsset页面request模块路径错误
- 更新docker-compose与开发计划文档
2026-04-25 08:51:38 +08:00
hiderfong 8b2bc84399 feat: implement full RBAC role-based access control
Backend:
- deps.py: add require_admin, require_manager, require_labeler, require_guest_or_above
- user.py: all write endpoints require admin
- datasource.py: write/sync endpoints require admin
- metadata.py: sync endpoint requires admin
- classification.py: category/rule write requires admin; results query requires guest+ with data isolation
- project.py: GET requires manager with created_by filtering; DELETE checks ownership
- task.py: my-tasks requires labeler with assignee_id filtering; create-task requires manager
- dashboard.py: requires guest_or_above
- report.py: requires guest_or_above
- project_service: list_projects adds created_by filter; list_results adds project_ids filter

Frontend:
- stores/user.ts: add hasRole, hasAnyRole, isAdmin, isManager, isLabeler, isSuperadmin
- router/index.ts: add roles to route meta; beforeEach checks role permissions
- Layout.vue: filter menu routes by user roles
- System.vue: hide add/edit/delete buttons for non-admins
- DataSource.vue: hide add/edit/delete/sync buttons for non-admins
- Project.vue: hide add/delete buttons for non-admins
2026-04-23 12:09:32 +08:00
hiderfong 377e9cba22 feat: user management - add/edit/delete users
Backend:
- Add GET /users/roles endpoint (list all roles)
- Add GET /users/depts endpoint (list all departments)

Frontend:
- Add user.ts API client (getUsers, createUser, updateUser, deleteUser, getRoles, getDepts)
- Rewrite System.vue with full user CRUD:
  - User list table with pagination
  - Add User button + dialog form
  - Edit user (username disabled, password hidden)
  - Delete user (disabled for superadmin)
  - Role and department dropdowns
  - Status radio buttons
2026-04-23 11:32:45 +08:00
hiderfong 9d38180745 rebrand: PropDataGuard → DataPointer
- App name: PropDataGuard → DataPointer
- Frontend title: 财险数据分级分类平台 → 数据分类分级管理平台
- LocalStorage keys: pdg_token/pdg_refresh → dp_token/dp_refresh
- Package name: prop-data-guard-frontend → data-pointer-frontend
- Project config: admin@propdataguard.comadmin@datapo.com
- Celery app name: prop_data_guard → data_pointer
- Layout logo, login title, page title all updated
2026-04-23 11:26:28 +08:00
hiderfong dd49c9679d fix: login redirect and res.data access in auth/test/sync APIs
- Fix auth.ts: login/getMe now unwrap res.data before returning
- Fix DataSource.vue: testConnection/syncMetadata use res.data.success/message
- Fix Project.vue: autoClassify uses res.data.message
- Root cause: request.ts interceptor returns full response body, auth.ts was
treating response as if it was already unwrapped
2026-04-23 11:19:00 +08:00
hiderfong 3b50ccc7e1 feat: dashboard & report APIs with real DB stats
Backend:
- Add /dashboard/stats API (data_sources, tables, columns, labeled, sensitive, projects)
- Add /dashboard/distribution API (level/cat/source distribution, project progress, heatmap)
- Add /reports/stats API (total/auto/manual/reviewed counts + level distribution)
- Fix report download: add template relationship to ClassificationProject
- All stats computed from real DB queries

Frontend:
- Dashboard.vue: replace all hardcoded data with API-driven computed charts
- Report.vue: replace all hardcoded data with API-driven charts
- Add dashboard.ts and report.ts API clients
2026-04-23 11:10:16 +08:00
hiderfong 86c487ae40 fix: levels and categories empty due to res vs res.data mismatch
- Fix Classification.vue: levels use res.data, auto-fetch on mount
- Fix Task.vue: levels and categories use res.data
- Fix Project.vue: templates use res.data
2026-04-23 10:51:06 +08:00
hiderfong 5119ca775b fix: classification results empty and res.data access issues
Backend:
- Add GET /classifications/results endpoint with project/level/keyword filters
- Add column relationship to ClassificationResult model
- Fix test data generator to fetch column IDs from DB after bulk insert

Frontend:
- Fix request.ts interceptor to return full response body (keep total/pagination)
- Fix all pages to use res.data instead of res
- Add getClassificationResults API in classification.ts
- Implement fetchData in Classification.vue with proper filtering and pagination
- Fix same res.data issue in Category.vue, Metadata.vue, Project.vue, DataSource.vue, Dashboard.vue, Task.vue
2026-04-23 10:46:51 +08:00
hiderfong 4b08bb5057 feat: add test data generator script
Generate 35,000+ realistic test records:
- 12 data sources (PostgreSQL, MySQL, Oracle, SQL Server, DM)
- 31 databases, 863 tables, 17,152 columns
- 81 users across 13 departments
- 8 classification projects, 24 tasks
- 12,000 classification results with varied confidence levels
- 5,000 operation logs

Covers all insurance domains: policy, claim, customer, finance, channel, actuary, regulatory, vehicle
2026-04-22 18:16:44 +08:00
hiderfong cc7ee0c0a6 fix: make auth tests pass with initial data setup 2026-04-22 17:24:05 +08:00
hiderfong fb4aaad9fc feat: Phase 3-5 - workflow, labeling, reports, dashboard enhancement, tests 2026-04-22 17:22:11 +08:00
hiderfong e71b13fe39 chore: add .gitignore and remove venv/node_modules from tracking 2026-04-22 17:08:15 +08:00
hiderfong 1773bda06b feat: initial commit - Phase 1 & 2 core features 2026-04-22 17:07:33 +08:00