## Tech Design Complete

**Date**: 2026-05-26
**Epic**: EPIC-006
**Generated By**: tech-design skill

### Artifacts Produced

- [x] TECH-DESIGN.md
- [x] IMPL-PLAN-API.md (api-kingston affected)
- [x] IMPL-PLAN-WEB.md (web-kingston affected)
- [ ] IMPL-PLAN-APP.md (app-kingston out of scope — confirmed in EPIC-006.md)

### Key Technical Decisions

1. **EAV value = text, not optionId** — bảo toàn lịch sử khi option thay đổi
2. **Level-1 components = flat** — `Component.structureId` FK trực tiếp, không cần tree traversal
3. **Prisma naming** — `Component.componentTypeId` + relation `"componentVariantTypeRelation"` để tránh conflict với `componentType` relation hiện có (→ MasterData)
4. **`AttributeTypeOption` seeded via migration**, không có CRUD UI ở MVP
5. **No domain events** — Variant CRUD không trigger downstream effects

### Next Step

Run `/implement-feature EPIC-006 api` để implement api-kingston.
Run `/implement-feature EPIC-006 web` để implement web-kingston.

### Implementation Order (đề xuất)

1. `api-kingston` — Steps 1-18 trong IMPL-PLAN-API.md
2. `web-kingston` — Steps 1-11 trong IMPL-PLAN-WEB.md (sau khi API endpoints live)
