Files
solution-erp/docs/STATUS.md
pqhuy1987 49a5f57a50 [CLAUDE] Docs: database-guide + 6 flow diagrams
docs/database/database-guide.md:
- Conventions (naming, data types, audit fields, soft delete)
- Schema hien tai (Identity tables sau migration Init) + seed 12 role + admin
- Schema planned: Phase 1 dot 2 (Supplier/Project/Department + Permission Matrix)
- Schema planned: Phase 3 (Contract + Approval + Comment + Attachment + Template + Clause + CodeSequence)
- Mermaid ERD cho tung phase
- Migration workflow (create/apply/revert)
- Index strategy + unique indexes
- Backup/restore SQL
- Common pitfalls + SQL cheatsheet

docs/flows/ — 6 flow documentation:
- README.md: index
- auth-flow.md: login/refresh/me/logout (IMPLEMENTED, sequence + edge cases + security checklist)
- permission-flow.md: Phase 1 dot 2 - Role x MenuKey x CRUD resolution + FE guard + BE policy
- contract-creation-flow.md: Phase 2 - Drafter flow chon template -> fill -> preview -> save draft
- contract-approval-flow.md: Phase 3 - state machine 9 phase chi tiet + reject flow + timeline UI
- form-render-flow.md: Phase 2 - OpenXml + ClosedXML + LibreOffice PDF convert
- sla-expiry-flow.md: Phase 3 - BackgroundService auto-approve qua SLA + warning notify

Update references:
- CLAUDE.md (root): them 2 row Tai lieu quan trong
- docs/CLAUDE.md: update project layout voi flows/ + database/
- docs/STATUS.md: log docs addition
- docs/changelog/migration-todos.md: tick Phase 0 docs items

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 11:15:28 +07:00

3.7 KiB
Raw Blame History

STATUS — Snapshot hiện tại

Update rule: trước khi bắt đầu 1 task → ghi row vào 🔥 In Progress. Xong → chuyển sang ✅ Recently Done.

Last updated: 2026-04-21 11:00

📍 Phase hiện tại: Phase 1 — Alpha Core (foundation xong, chờ đợt 2)

🔥 In Progress

(không có — Phase 1 foundation xong, chờ quyết định bước tiếp)

Recently Done (newest on top)

Ngày Ai Task Commit
2026-04-21 Claude Docs additiondatabase-guide.md (conventions + schema + ERD + migration workflow) + flows/ 6 doc (auth implemented + permission/contract-create/contract-approve/form-render/sla-expiry planned) (sắp commit)
2026-04-21 Claude Phase 1 foundation HOÀN TẤT — BE (Clean Arch + Identity + JWT + migration) + FE (2 app, Tailwind 4, Router, AuthContext, Login) — E2E login pass qua Vite proxy 702411f
2026-04-21 Claude Phase 0 HOÀN TẤT — scaffold + parse FORM/QUY_TRINH + docs + skills + git init 25dad7f

Session logs:

🎯 Next up — Phase 1 đợt 2 (CRUD master + Permission Matrix)

Backend

  • Domain/Entities/Supplier, Project, Department (+ EF configurations)
  • Application/Suppliers/{Commands,Queries}/* (Create, Update, Delete, GetById, List)
  • Tương tự cho Project + Department
  • Api/Controllers/{SuppliersController, ProjectsController, DepartmentsController}
  • Pagination, search, sort server-side (GetListQuery với PagedResult<T>)
  • Migration 2: AddMasterData

Permission Matrix

  • Domain/Entities/MenuItem, Permission
  • Seed default menu tree (based on FE screens)
  • Application/Permissions/Queries/GetMyMenuTreeQuery
  • Api/Controllers/{MenusController, RolesController, PermissionsController}
  • Admin UI: Permission Matrix grid (role × menu × CRUD checkbox)

Contract draft (chưa workflow)

  • Domain/Entities/Contract skeleton (không state machine)
  • Basic CRUD controller + FE list page

FE

  • <PermissionGuard menuKey="Contracts"> + usePermission() hook
  • 3 trang CRUD admin (Suppliers / Projects / Departments) với table + modal
  • Route guard theo role (admin-only routes)

📊 Thông số sau Phase 1 foundation

  • Backend LOC: ~400 (Domain 60 + Application 170 + Infrastructure 190 + Api 120)
  • Frontend LOC: ~450 mỗi app (shared 90%)
  • Build time: .NET ~4s, FE TS check ~3s mỗi app, Vite dev ~3s ready
  • E2E verified: Login (fe-admin proxy + fe-user proxy) → API → JWT + user info + /me

🚨 Blockers / risks

  • Gitea remote chưa có URL — push sau
  • ⚠️ Swashbuckle 10.x không tương thích với .NET 10 + Microsoft.OpenApi 2.0 — đã downgrade về 6.9.0. Theo dõi update sau.
  • ⚠️ MediatR 14.x breaking changes — đã downgrade về 12.4.1. Ok cho Phase 1-5.
  • ⚠️ Microsoft.AspNetCore.OpenApi đã remove (conflict Swashbuckle 6.9). Nếu sau muốn dùng built-in OpenAPI thì phải chọn 1 trong 2.
  • ⚠️ Design-time DB (SolutionErp_Design) được tạo khi chạy dotnet ef — có thể drop an toàn (không chứa data thật)
  • ⚠️ 3 file .doc FORM chưa convert được — Phase 2

Credentials mặc định

Email:    admin@solutionerp.local
Password: Admin@123456

URLs dev: