[CLAUDE] Docs: tai cau truc cleanup — archive raw, compact migration-todos, update CLAUDE+flows
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m53s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m53s
User request: 'review cap nhat va tai cau truc lai MD sao cho phu hop voi hien tai, cac phan thua va da dieu chinh co the bo ra luon hoac cap nhat lai'. Cleanup highlights: 1. Archive 2 file Phase 0 raw dump → docs/_archive/ (forms-spec-raw 657 line + workflow-raw 62 line). Update link reference 2 file goc. 2. Compact migration-todos.md 386 → 114 line (-71%). Collapse Phase 0-5 + Tier 3 + Sessions detailed thanh 1 bang summary. Detail xem session logs. Phase 6 iter 1+2 + Phase 7 active checklist. 3. Compact STATUS.md In Progress: bo ~17 row ✅ done (giu chỉ 5+ task pending: 3 PE feature gap + 4 optional polish + 2 Ops). Recently Done table giu day du history. 4. Update flows/README — tat ca 6 flow ✅ Implemented + them PE row reference architecture.md §9. 5. Update docs/CLAUDE.md — project layout co PurchaseEvaluations, _archive, skills 6 (3 dom + 3 ops). Roadmap them Phase 6 ✅ + Phase 7 WIP. Lien he them prod URL solutions.com.vn + SSH config + login admin. 6. Skill ef-core-migration: 13 migration label. Net delta: -800 line docs (chu yeu archive + collapse migration-todos).
This commit is contained in:
@ -2,13 +2,14 @@
|
||||
|
||||
## 1. Giới thiệu
|
||||
|
||||
**SOLUTION_ERP** là hệ thống quản lý Hợp đồng Nhà cung cấp / Thầu phụ / Tổ đội / Dịch vụ cho **Công ty TNHH Xây dựng Solutions**, thay thế quy trình giấy / Word+Excel hiện tại.
|
||||
**SOLUTION_ERP** là hệ thống quản lý Hợp đồng Nhà cung cấp / Thầu phụ / Tổ đội / Dịch vụ + **Phiếu Duyệt NCC tiền-HĐ** cho **Công ty TNHH Xây dựng Solutions**, thay thế quy trình giấy / Word+Excel hiện tại.
|
||||
|
||||
**Scope chính:**
|
||||
1. Số hóa 8 form hợp đồng (template engine điền field → export .docx/.xlsx)
|
||||
2. Workflow 9 phase trình ký (state machine + role guard + SLA auto-approve)
|
||||
2. Workflow 9 phase trình ký HĐ (state machine + role guard + SLA auto-approve + versioned WF per ContractType)
|
||||
3. Tự gen mã HĐ theo Quy định SOL-CCM-RG-001
|
||||
4. Dashboard báo cáo HĐ theo NCC, dự án, trạng thái, giá trị
|
||||
5. **Module Duyệt NCC (Phase 6)** — phiếu trình duyệt so sánh giá tiền-HĐ, 2 quy trình A/B, kế thừa HĐ 1-click khi DaDuyet
|
||||
|
||||
## 2. Kiến trúc tổng thể
|
||||
|
||||
@ -46,39 +47,35 @@
|
||||
```
|
||||
SOLUTION_ERP/
|
||||
├── src/Backend/
|
||||
│ ├── SolutionErp.Domain/ Entities, ValueObjects, Enums, DomainEvents
|
||||
│ ├── SolutionErp.Domain/ Entities + Enums (Contracts/, PurchaseEvaluations/, Forms/, Identity/, Master/, Notifications/)
|
||||
│ ├── SolutionErp.Application/ CQRS handlers, DTOs, Validators, Mappings, Interfaces
|
||||
│ ├── SolutionErp.Infrastructure/ EF DbContext, Identity, Repositories, External
|
||||
│ ├── SolutionErp.Infrastructure/ EF DbContext, Identity, Repositories, External services
|
||||
│ └── SolutionErp.Api/ Controllers, Middleware, Program.cs, appsettings
|
||||
├── fe-admin/ (admin UI — CRUD master data, approve, dashboards)
|
||||
│ └── src/
|
||||
├── fe-user/ (user UI — soạn thảo HĐ, comment, upload)
|
||||
│ └── src/
|
||||
├── fe-admin/ (admin UI — CRUD master, approve, dashboards, workflow designer, permission matrix)
|
||||
├── fe-user/ (user UI — soạn HĐ + duyệt phiếu PE + inbox)
|
||||
├── docs/
|
||||
│ ├── CLAUDE.md (file này)
|
||||
│ ├── STATUS.md
|
||||
│ ├── PROJECT-MAP.md
|
||||
│ ├── forms-spec.md ⭐ 8 form catalog + RG-001 code format
|
||||
│ ├── workflow-contract.md ⭐ 9 phase state machine + role matrix
|
||||
│ ├── STATUS.md ⭐ snapshot hiện tại + Recently Done
|
||||
│ ├── HANDOFF.md ⭐ brief 5 phút cho session tiếp
|
||||
│ ├── PROJECT-MAP.md bản đồ tổng quan
|
||||
│ ├── rules.md coding conventions
|
||||
│ ├── architecture.md layered + PE module §9
|
||||
│ ├── gotchas.md 38 pitfall đã gặp
|
||||
│ ├── forms-spec.md 8 form catalog + RG-001
|
||||
│ ├── workflow-contract.md 9 phase HĐ + role matrix
|
||||
│ ├── database/
|
||||
│ │ └── database-guide.md ⭐ Conventions, schema hiện tại + planned, ERD, migration workflow
|
||||
│ ├── flows/ ⭐ Sequence/state diagram mỗi feature
|
||||
│ │ ├── README.md (index)
|
||||
│ │ ├── auth-flow.md ✅ implemented
|
||||
│ │ ├── permission-flow.md 📝 Phase 1 đợt 2
|
||||
│ │ ├── contract-creation-flow.md 📝 Phase 2
|
||||
│ │ ├── contract-approval-flow.md 📝 Phase 3
|
||||
│ │ ├── form-render-flow.md 📝 Phase 2
|
||||
│ │ └── sla-expiry-flow.md 📝 Phase 3
|
||||
│ ├── guides/ setup, cicd, code-rules...
|
||||
│ └── changelog/
|
||||
│ ├── migration-todos.md Roadmap 5 phase
|
||||
│ └── sessions/ YYYY-MM-DD session logs
|
||||
│ │ ├── database-guide.md conventions + migration workflow
|
||||
│ │ └── schema-diagram.md ERD 47 bảng (+§11 PE)
|
||||
│ ├── flows/ 6 sequence diagram (auth/permission/contract/form/sla + PE ref architecture)
|
||||
│ ├── guides/ setup, cicd, deploy, runbook, security
|
||||
│ ├── changelog/
|
||||
│ │ ├── migration-todos.md roadmap compact (Phase 0-5+Tier3 collapsed)
|
||||
│ │ └── sessions/ session logs YYYY-MM-DD
|
||||
│ └── _archive/ raw dump Phase 0 (forms-spec-raw, workflow-raw)
|
||||
├── .claude/skills/ 6 skill: 3 domain (contract-workflow, form-engine, permission-matrix) + 3 ops (dependency-audit-erp, ef-core-migration, iis-deploy-runbook)
|
||||
├── scripts/ parse_forms.py, parse_workflow.py, seed, deploy
|
||||
├── scripts/ deploy, migrate-domains, backup, deps-audit
|
||||
├── SolutionErp.slnx Solution file
|
||||
├── global.json .NET 10 SDK pin
|
||||
├── docker-compose.yml SQL Server cho dev
|
||||
└── CLAUDE.md Pointer → docs/CLAUDE.md
|
||||
```
|
||||
|
||||
@ -109,18 +106,23 @@ SOLUTION_ERP/
|
||||
- **NamGroup** (`D:\Dropbox\CONG_VIEC\NAMGROUP\SOURCECODE_CÔNG_TY\NAMGROUP\`) — template 2 FE + IIS deploy + permission matrix
|
||||
- **DH_Y_DUOC** (`D:\Dropbox\CONG_VIEC\DAI_Y_DUOC\DH_Y_DUOC_SOURCECODE\DH_Y_DUOC\`) — template backend hiện đại (Clean Arch + CQRS + EF migrations)
|
||||
|
||||
## 6. Roadmap 5 phase (summary)
|
||||
## 6. Roadmap (status 2026-04-24)
|
||||
|
||||
| Phase | Tuần | Focus | Exit criteria |
|
||||
|---|---|---|---|
|
||||
| **0 Draft** | T1 | Scaffold, parse FORM + QUY_TRINH | Build pass, docs đủ |
|
||||
| **1 Alpha Core** | T2-4 | Auth + Permission + CRUD Supplier/Project/Contract | Admin tạo HĐ draft + gán role |
|
||||
| **2 Form Engine** | T5-6 | Template engine 8 form, export .docx/.xlsx | Export 1 HĐ giống mẫu 100% |
|
||||
| **3 Workflow** | T7-9 | State machine 9 phase + SLA + notify | HĐ đi hết quy trình → có mã số |
|
||||
| **4 Report + Polish** | T10-11 | Dashboard, Excel export, UX pass | UAT 5-10 HĐ thật |
|
||||
| **5 Production** | T12-13 | CI/CD IIS, security, runbook, UAT | Go-live |
|
||||
| Phase | Focus | Trạng thái |
|
||||
|---|---|---|
|
||||
| **0 Draft** | Scaffold, parse FORM + QUY_TRINH | ✅ Done |
|
||||
| **1 Alpha Core** | Auth + Permission + CRUD master + Contract draft | ✅ Done |
|
||||
| **2 Form Engine** | OpenXml + ClosedXML + LibreOffice PDF + DynamicForm | ✅ Done |
|
||||
| **3 Workflow** | 9 phase state machine + RG-001 code gen + SLA job + attachments + SignalR | ✅ Done |
|
||||
| **4 Reporting** | Dashboard KPI + Excel export + MyDashboard role-aware | ✅ Done |
|
||||
| **5 Production** | CI/CD Gitea Actions + 3 IIS site + Let's Encrypt + Security headers + Users CRUD | ✅ Done |
|
||||
| **Tier 3** | Versioned WF + 3-panel layout + 4-bảng + 4 catalogs + 16 demo users + Brand identity | ✅ Done |
|
||||
| **6 Module Duyệt NCC** | PE iter 1 (skeleton) + iter 2 (UX polish) + Domain rebrand `.solutions.com.vn` | ✅ Done |
|
||||
| **7 PE feature gap** | Designer UI + Ý kiến 4 phòng ban + Export PDF + UAT thật + SMTP | 📝 WIP |
|
||||
| **8+ Post-launch** | E-signature, Bravo/SAP, Mobile, AI OCR | 📝 Future |
|
||||
|
||||
Chi tiết atomic tasks ở [`changelog/migration-todos.md`](changelog/migration-todos.md).
|
||||
Chi tiết atomic tasks: [`changelog/migration-todos.md`](changelog/migration-todos.md).
|
||||
Session logs: [`changelog/sessions/`](changelog/sessions/).
|
||||
|
||||
## 7. Quy ước code
|
||||
|
||||
@ -142,7 +144,14 @@ Chi tiết atomic tasks ở [`changelog/migration-todos.md`](changelog/migration
|
||||
- SQL injection: EF Core parameterized (không raw SQL trừ khi cần)
|
||||
- Audit log: mọi write → `AuditLog` table
|
||||
|
||||
## 9. Liên hệ
|
||||
## 9. Liên hệ + Production
|
||||
|
||||
- **Dev:** pqhuy1987@gmail.com (solo)
|
||||
- **Dev:** pqhuy1987@gmail.com (solo + Claude)
|
||||
- **Prod login:** `admin@solutions.com.vn` / `Admin@123456` ⚠️ rotate sau login đầu
|
||||
- **3 domain prod:**
|
||||
- https://api.solutions.com.vn — API
|
||||
- https://admin.solutions.com.vn — Admin FE
|
||||
- https://eoffice.solutions.com.vn — User FE
|
||||
- **Gitea remote:** https://git.baocaogiaoduc.vn/vietreport-admin/solution-erp
|
||||
- **SSH VPS:** `ssh vietreport-vps` (config sẵn `~/.ssh/config` user=Administrator key=id_ed25519)
|
||||
- **Domain expert:** TBD (sẽ update sau UAT đầu tiên)
|
||||
|
||||
Reference in New Issue
Block a user