No description
Find a file
2026-11-12 22:54:59 +07:00
.github/workflows chore: align frontend deployment name 2026-11-12 22:03:00 +07:00
img-plan feat: scaffold complete danable frontend architecture with all pages, layouts, stores, and 3 annotator modes 2026-10-30 00:33:07 +07:00
public feat: publish danable frontend updates 2026-10-31 18:09:52 +07:00
src feat: persist and resume ZIP import jobs 2026-11-12 22:54:59 +07:00
.env.example feat: scaffold complete danable frontend architecture with all pages, layouts, stores, and 3 annotator modes 2026-10-30 00:33:07 +07:00
.gitignore feat: publish danable frontend updates 2026-10-31 18:09:52 +07:00
docker-compose.yml chore: align frontend deployment name 2026-11-12 22:03:00 +07:00
Dockerfile fix: default production frontend to real API 2026-11-12 22:14:39 +07:00
index.html feat: publish danable frontend updates 2026-10-31 18:09:52 +07:00
package-lock.json feat: add dataset import and upload flow 2026-11-12 17:31:42 +07:00
package.json feat: add dataset import and upload flow 2026-11-12 17:31:42 +07:00
postcss.config.js feat: scaffold complete danable frontend architecture with all pages, layouts, stores, and 3 annotator modes 2026-10-30 00:33:07 +07:00
README.md feat: scaffold complete danable frontend architecture with all pages, layouts, stores, and 3 annotator modes 2026-10-30 00:33:07 +07:00
restart_web.sh Connect annotator to real API: JWT login, services real-mode, Konva canvas, autosave, paginated images, tracing 2026-11-12 15:13:07 +07:00
tailwind.config.js feat: publish danable frontend updates 2026-10-31 18:09:52 +07:00
tsconfig.json feat: scaffold complete danable frontend architecture with all pages, layouts, stores, and 3 annotator modes 2026-10-30 00:33:07 +07:00
vite.config.ts feat: publish danable frontend updates 2026-10-31 18:09:52 +07:00

danable · Nền tảng dữ liệu gán nhãn cho AI (Frontend)

Dự án frontend cho nền tảng gán nhãn dữ liệu hình ảnh danable (hỗ trợ 3 bài toán: Classification, Object Detection, và Segmentation), được thiết kế theo kiến trúc phân lớp rõ ràng để sẵn sàng tích hợp với Backend / Orchestrator.


1. Khởi chạy dự án

# Cài đặt dependencies
npm install

# Chạy môi trường phát triển (http://localhost:3000)
npm run dev

# Kiểm tra TypeScript & build production
npm run build

2. Cấu trúc thư mục

  • public/ — Tài nguyên tĩnh (favicon.svg, ảnh minh họa...)
  • src/app/ — Cấu hình cấp ứng dụng (router.tsx, providers.tsx, constants.ts)
  • src/layouts/ — 3 Layout chính (AuthLayout, DashboardLayout, AnnotatorLayout) cùng Sidebar & Header
  • src/pages/ — Mỗi trang được tách thành folder riêng kèm components/ nội bộ:
    • auth/ — Đăng nhập (/login), Quên mật khẩu (/forgot-password)
    • projects/ — Danh sách dự án (/projects), Modal tạo dự án, Tổng quan dự án (/projects/:id)
    • users/ — Quản lý người dùng & phân quyền (/users)
    • annotator/ — Giao diện gán nhãn 3-panel (/projects/:id/annotate) tự động chuyển đổi theo bài toán (Classification, Object Detection, Segmentation)
  • src/components/ — Thư viện UI dùng chung (ui/, feedback/, data-display/)
  • src/services/ — Tầng giao tiếp API duy nhất (api.ts, projectService.ts, annotationService.ts...)
  • src/stores/ — Quản lý state với Zustand (authStore, projectStore, annotationStore, canvasStore, uiStore)
  • src/hooks/ — Custom hooks tách biệt business logic khỏi giao diện
  • src/types/ — Định nghĩa TypeScript interfaces/types dùng chung
  • src/utils/ — Hàm tiện ích (chuyển đổi tọa độ canvas, xuất LabelMe JSON, xuất mask PNG, định dạng số...)

3. Hướng dẫn nối vào Backend / Orchestrator

  1. Mở file .env và cập nhật địa chỉ API Gateway / Orchestrator:
    VITE_API_URL=https://orchestrator.your-domain.com/api/v1
    VITE_USE_MOCK_DATA=false
    
  2. Toàn bộ HTTP client được cấu hình tập trung tại src/services/api.ts (đã gắn sẵn Bearer Token interceptor).
  3. Các hàm trong src/services/*Service.ts đã định nghĩa đầy đủ chữ ký hàm và kiểu trả về chuẩn theo src/types/.