No description
sftp/scp bi chan tren duong bastion (Connection closed) trong khi exec channel chay tot. Day compose bang tar pipe, image stream thang vao docker load, bo file tarball trung gian. |
||
|---|---|---|
| .github/workflows | ||
| img-plan | ||
| public | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| tsconfig.json | ||
| vite.config.ts | ||
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ùngSidebar&Headersrc/pages/— Mỗi trang được tách thành folder riêng kèmcomponents/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ệnsrc/types/— Định nghĩa TypeScript interfaces/types dùng chungsrc/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
- Mở file
.envvà cập nhật địa chỉ API Gateway / Orchestrator:VITE_API_URL=https://orchestrator.your-domain.com/api/v1 VITE_USE_MOCK_DATA=false - 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). - Các hàm trong
src/services/*Service.tsđã định nghĩa đầy đủ chữ ký hàm và kiểu trả về chuẩn theosrc/types/.