Giao diện
Quy ước phát triển
Cấu trúc thư mục frontend
src/
components/ Component dùng chung của site
components/ui/ Component shadcn (button, card, dialog, select...)
pages/ Mỗi route một file
lib/ API client, types, logic thuần
i18n/ Từ điển và provider song ngữ
index.css Token của Design SystemNgôn ngữ
Mọi giao diện nội bộ đều song ngữ Việt – Anh, chuyển đổi bằng switch ở góc trên bên phải.
- Thuật ngữ Enterprise Architecture (Capability, Maturity, Value Stream) giữ nguyên tiếng Anh khi đứng trong tên riêng của khái niệm, nhưng phần mô tả thì dịch.
- Dữ liệu song ngữ lưu thành hai cột:
name_en/name_vi,definition_en/definition_vi. - Trong code, đọc dữ liệu song ngữ bằng
pick(row, 'name')chứ không tự ghép chuỗi.
TypeScript
strictbật; không dùngany.erasableSyntaxOnlybật, nên không dùng parameter property (constructor(private x)) — khai báo field tường minh.- Alias
@/trỏ tớisrc/.
Git
- Không commit
.dev.vars,.env.local,node_modules,dist. - Không deploy từ máy cá nhân; merge vào
mainlà cách duy nhất để lên production.