diff --git a/.env b/.env deleted file mode 100644 index 5149149..0000000 --- a/.env +++ /dev/null @@ -1,4 +0,0 @@ -VITE_API_URL=http://localhost:8000/api/v1 -VITE_APP_NAME=danable -VITE_USE_MOCK_DATA=true - diff --git a/.gitignore b/.gitignore index 1d3c3af..e58ef3e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,14 @@ dist-ssr .env.local .DS_Store +# Local environment files (VITE_* values are public, but keep local config out of Git) +.env +.env.* +!.env.example + +# TypeScript incremental build cache +*.tsbuildinfo + +design-figma +img-plan +docs diff --git a/index.html b/index.html index 7fb046b..0c4278a 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ danable · Nền tảng dữ liệu cho AI - +
diff --git a/public/assets/arrow-right.svg b/public/assets/arrow-right.svg new file mode 100644 index 0000000..e9d16ae --- /dev/null +++ b/public/assets/arrow-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/building-2.svg b/public/assets/building-2.svg new file mode 100644 index 0000000..fa8d2cb --- /dev/null +++ b/public/assets/building-2.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/assets/eye-off.svg b/public/assets/eye-off.svg new file mode 100644 index 0000000..0aaa033 --- /dev/null +++ b/public/assets/eye-off.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/assets/lock-keyhole.svg b/public/assets/lock-keyhole.svg new file mode 100644 index 0000000..3ac0ab7 --- /dev/null +++ b/public/assets/lock-keyhole.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/mail.svg b/public/assets/mail.svg new file mode 100644 index 0000000..b045a1b --- /dev/null +++ b/public/assets/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/nh-giao-th-ng.jpg b/public/assets/nh-giao-th-ng.jpg new file mode 100644 index 0000000..b0a5fc0 Binary files /dev/null and b/public/assets/nh-giao-th-ng.jpg differ diff --git a/public/assets/shield-check.svg b/public/assets/shield-check.svg new file mode 100644 index 0000000..3ced34b --- /dev/null +++ b/public/assets/shield-check.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/feedback/ErrorBoundary.tsx b/src/components/feedback/ErrorBoundary.tsx index eb5e4e5..038f365 100644 --- a/src/components/feedback/ErrorBoundary.tsx +++ b/src/components/feedback/ErrorBoundary.tsx @@ -1,4 +1,4 @@ -import React, { Component, ErrorInfo, ReactNode } from 'react' +import { Component, ErrorInfo, ReactNode } from 'react' import { Button } from '../ui/Button' export interface ErrorBoundaryProps { diff --git a/src/layouts/AuthLayout.tsx b/src/layouts/AuthLayout.tsx index a176f5a..8930ec5 100644 --- a/src/layouts/AuthLayout.tsx +++ b/src/layouts/AuthLayout.tsx @@ -1,67 +1,10 @@ import React from 'react' -import { Outlet, Link } from 'react-router-dom' -import { showToast } from '../components/feedback/Toast' +import { Outlet } from 'react-router-dom' export const AuthLayout: React.FC<{ children?: React.ReactNode }> = ({ children }) => { return ( -
- {/* Top Bar */} -
- -
- - - -
- - danable - - - NỀN TẢNG DỮ LIỆU CHO AI - - - -
- Chưa có tài khoản?{' '} - -
-
- - {/* Main Content */} -
- {children || } -
- - {/* Footer */} - +
+ {children || }
) } diff --git a/src/layouts/DashboardLayout.tsx b/src/layouts/DashboardLayout.tsx index 31081fb..6c55279 100644 --- a/src/layouts/DashboardLayout.tsx +++ b/src/layouts/DashboardLayout.tsx @@ -7,15 +7,16 @@ export const DashboardLayout: React.FC<{ children?: React.ReactNode }> = ({ children, }) => { const { pathname } = useLocation() - const isProjectList = pathname === '/projects' + const isProjectWorkspaceScreen = + pathname === '/projects' || /^\/projects\/[^/]+$/.test(pathname) return ( -
- +
+
-
-
-
{children || }
+
+
+
{children || }
diff --git a/src/layouts/components/Header/Header.tsx b/src/layouts/components/Header/Header.tsx index e91545f..b5968da 100644 --- a/src/layouts/components/Header/Header.tsx +++ b/src/layouts/components/Header/Header.tsx @@ -6,17 +6,17 @@ import { UserMenu } from './UserMenu' export interface HeaderProps { breadcrumbItems?: BreadcrumbItem[] - isProjectList?: boolean + isProjectWorkspace?: boolean } -export const Header: React.FC = ({ breadcrumbItems, isProjectList = false }) => { +export const Header: React.FC = ({ breadcrumbItems, isProjectWorkspace = false }) => { return ( -
+
-
- - - +
+ + +
) diff --git a/src/layouts/components/Header/NotificationBell.tsx b/src/layouts/components/Header/NotificationBell.tsx index f139e63..c23124e 100644 --- a/src/layouts/components/Header/NotificationBell.tsx +++ b/src/layouts/components/Header/NotificationBell.tsx @@ -28,7 +28,7 @@ const MOCK_NOTIFICATIONS: NotificationItem[] = [ }, ] -export const NotificationBell: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => { +export const NotificationBell: React.FC<{ isProjectWorkspace?: boolean }> = ({ isProjectWorkspace = false }) => { const [open, setOpen] = useState(false) const [notifications, setNotifications] = useState(MOCK_NOTIFICATIONS) const ref = useRef(null) @@ -54,10 +54,10 @@ export const NotificationBell: React.FC<{ isProjectList?: boolean }> = ({ isProj diff --git a/src/layouts/components/Header/SystemStatus.tsx b/src/layouts/components/Header/SystemStatus.tsx index 5b46385..be30566 100644 --- a/src/layouts/components/Header/SystemStatus.tsx +++ b/src/layouts/components/Header/SystemStatus.tsx @@ -1,9 +1,9 @@ import React from 'react' -export const SystemStatus: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => { +export const SystemStatus: React.FC<{ isProjectWorkspace?: boolean }> = ({ isProjectWorkspace = false }) => { return ( -
- +
+ Hệ thống ổn định
) diff --git a/src/layouts/components/Header/UserMenu.tsx b/src/layouts/components/Header/UserMenu.tsx index acbe34f..b6d7875 100644 --- a/src/layouts/components/Header/UserMenu.tsx +++ b/src/layouts/components/Header/UserMenu.tsx @@ -3,14 +3,14 @@ import { useNavigate } from 'react-router-dom' import { Dropdown } from '../../../components/ui/Dropdown' import { showToast } from '../../../components/feedback/Toast' -export const UserMenu: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => { +export const UserMenu: React.FC<{ isProjectWorkspace?: boolean }> = ({ isProjectWorkspace = false }) => { const navigate = useNavigate() return ( +
MA
} diff --git a/src/layouts/components/Sidebar/RecentProjects.tsx b/src/layouts/components/Sidebar/RecentProjects.tsx index 5085634..aed48c1 100644 --- a/src/layouts/components/Sidebar/RecentProjects.tsx +++ b/src/layouts/components/Sidebar/RecentProjects.tsx @@ -3,7 +3,7 @@ import { Link, useLocation } from 'react-router-dom' import clsx from 'clsx' import { getProjects, subscribeProjectsStore } from '@/pages/projects/projectData' -export const RecentProjects: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => { +export const RecentProjects: React.FC<{ isProjectWorkspace?: boolean }> = ({ isProjectWorkspace = false }) => { const location = useLocation() const [recentProjects, setRecentProjects] = useState(() => getProjects().slice(0, 3)) @@ -11,13 +11,12 @@ export const RecentProjects: React.FC<{ isProjectList?: boolean }> = ({ isProjec return (
-
+
DỰ ÁN GẦN ĐÂY
{recentProjects.map((project) => { const projectPath = `/projects/${project.id}` - const dotColors = ['bg-[#a29fff]', 'bg-[#a29fff]', 'bg-[#a29fff]'] const isCurrent = location.pathname.startsWith(projectPath) return ( = ({ isProjec to={projectPath} className={clsx( 'flex items-center transition-colors', - isProjectList - ? 'gap-2 px-2.5 py-0.5 text-[11px] font-normal leading-[17px] text-[#332926]' + isProjectWorkspace + ? 'gap-2 px-2.5 py-0.5 text-[11px] font-normal leading-[17px] text-[var(--project-heading)]' : 'gap-2.5 rounded-lg px-2.5 py-2 text-xs font-medium', - isCurrent - ? 'bg-slate-100 text-slate-900 font-semibold' - : 'text-slate-600 hover:bg-slate-50 hover:text-slate-900' + isProjectWorkspace + ? 'text-[var(--project-heading)]' + : isCurrent + ? 'bg-slate-100 text-slate-900 font-semibold' + : 'text-slate-600 hover:bg-slate-50 hover:text-slate-900' )} > - + {project.name} ) diff --git a/src/layouts/components/Sidebar/Sidebar.tsx b/src/layouts/components/Sidebar/Sidebar.tsx index fb8936a..094b71f 100644 --- a/src/layouts/components/Sidebar/Sidebar.tsx +++ b/src/layouts/components/Sidebar/Sidebar.tsx @@ -6,13 +6,13 @@ import { RecentProjects } from './RecentProjects' import { StorageUsage } from './StorageUsage' import { UserInfo } from './UserInfo' -export const Sidebar: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => { +export const Sidebar: React.FC<{ isProjectWorkspace?: boolean }> = ({ isProjectWorkspace = false }) => { return ( -
- - {/* Main 2-Column Content */} -
-
- {/* Left Column: HeroSection */} -
- -
- - {/* Right Column: LoginForm */} -
- + {item} + + ))}
-
+
- {/* Bottom Footer Links */} - - - {/* Contact Admin Info Modal */} + {/* Hộp thoại thông tin khi bấm "Liên hệ quản trị viên" */} {contactModalOpen && (
-

+

Liên hệ quản trị viên không gian nhóm

-

+

danable hoạt động theo mô hình lời mời nội bộ để đảm bảo an toàn dữ liệu. Vui lòng liên hệ Quản trị viên nhóm của bạn (ví dụ:{' '} - + minhanh@visionlab.vn ) để nhận email lời mời tham gia dự án. @@ -136,7 +116,8 @@ export const LoginPage: React.FC = () => { diff --git a/src/pages/auth/components/HeroSection.tsx b/src/pages/auth/components/HeroSection.tsx index e98d3f1..fe623aa 100644 --- a/src/pages/auth/components/HeroSection.tsx +++ b/src/pages/auth/components/HeroSection.tsx @@ -1,149 +1,196 @@ -import React, { useState } from 'react' +import React from 'react' +import { LOGIN_COLORS, createInsetOutlineStyle } from '@/styles/theme' + +interface BoundingBoxItem { + id: string + label: string + color: string + position: { + left: number + top: number + width: number + height: number + } + badgeWidth: number +} + +/** + * Danh sách các khung nhận diện vật thể (Bounding Box) hiển thị trên ảnh minh họa. + * Tách cấu hình tọa độ và màu sắc rõ ràng thay vì gán cứng trong JSX. + */ +const TRAFFIC_BOUNDING_BOXES: BoundingBoxItem[] = [ + { + id: 'car', + label: 'Ô tô', + color: LOGIN_COLORS.boundingBox.carCyan, // #16b9c9 + position: { left: 248, top: 157, width: 74, height: 65 }, + badgeWidth: 33, + }, + { + id: 'bus', + label: 'Xe buýt', + color: LOGIN_COLORS.boundingBox.busPurple, // #ae7cff + position: { left: 155, top: 96, width: 106, height: 87 }, + badgeWidth: 49, + }, +] + +const PREVIEW_STATS = [ + { + value: '4.320', + description: 'ảnh trong không gian nhóm', + }, + { + value: 'Bạn quyết định', + description: 'duyệt nhãn trước khi xuất', + }, +] + +const AI_TASK_TYPES = ['Classification', 'Object Detection', 'Segmentation'] + +/** + * Hàm tạo style cho khung Bounding Box và nhãn tên đối tượng theo màu định nghĩa. + */ +function getBoundingBoxStyles(box: BoundingBoxItem): { + frameStyle: React.CSSProperties + badgeStyle: React.CSSProperties +} { + return { + frameStyle: { + left: `${box.position.left}px`, + top: `${box.position.top}px`, + width: `${box.position.width}px`, + height: `${box.position.height}px`, + ...createInsetOutlineStyle(box.color, 2), + }, + badgeStyle: { + width: `${box.badgeWidth}px`, + backgroundColor: box.color, + }, + } +} export const HeroSection: React.FC = () => { - const [hoveredBox, setHoveredBox] = useState<'bus' | 'car' | null>(null) - const [activeTask, setActiveTask] = useState('Object Detection') - return ( -

-
-

+

+ {/* Thanh thương hiệu phía trên */} +
+
+ Biểu trưng danable +

+ danable +

+
+

+ NỀN TẢNG DỮ LIỆU CHO AI +

+
+ + {/* Tiêu đề & thông điệp chính */} +
+

TỪ DỮ LIỆU THÔ ĐẾN NHÃN CHẤT LƯỢNG

- -

+

Giải pháp dữ liệu cho AI

- -

+

Kiểm soát chất lượng mô hình AI của bạn từ những bước bắt đầu.

+
- {/* Interactive Preview Card */} -
- {/* Card Top Bar */} -
- - Giao thông đô thị - - - - Đã duyệt thủ công - -
- - {/* Street Traffic Image + Bounding Box Overlays */} -
- Giao thông đô thị Việt Nam - - {/* Subtle road scene gradient for crisp bounding box contrast */} -
- - {/* Purple Bounding Box: Xe buýt */} -
setHoveredBox('bus')} - onMouseLeave={() => setHoveredBox(null)} - style={{ - left: '28%', - top: '35%', - width: '20%', - height: '31%', - }} - className={`absolute border-2 transition-all duration-150 cursor-pointer ${ - hoveredBox === 'bus' - ? 'border-[#A855F7] bg-[#A855F7]/20 shadow-[0_0_0_2px_rgba(168,85,247,0.3)]' - : 'border-[#C084FC] bg-[#A855F7]/10' - }`} - > - - Xe buýt - - {/* Corner handles */} - - - - -
- - {/* Cyan Bounding Box: Ô tô */} -
setHoveredBox('car')} - onMouseLeave={() => setHoveredBox(null)} - style={{ - left: '45.5%', - top: '57%', - width: '13.5%', - height: '24%', - }} - className={`absolute border-2 transition-all duration-150 cursor-pointer ${ - hoveredBox === 'car' - ? 'border-[#06B6D4] bg-[#06B6D4]/25 shadow-[0_0_0_2px_rgba(6,182,212,0.35)]' - : 'border-[#22D3EE] bg-[#06B6D4]/10' - }`} - > - - Ô tô - - {/* Corner handles */} - - - - -
-
- - {/* Card Bottom Stats */} -
-
-
- 4.320 -
-
- ảnh trong không gian nhóm -
-
- -
-
- Bạn quyết định -
-
- duyệt nhãn trước khi xuất -
-
-
+ {/* Thẻ minh họa gán nhãn giao thông đô thị */} +
+ {/* Tiêu đề thẻ minh họa */} +
+

+ Giao thông đô thị +

+

+ Đã duyệt thủ công +

- {/* Bottom Task Tags */} -
- {(['Classification', 'Object Detection', 'Segmentation'] as const).map( - (task) => { - const isSelected = activeTask === task - return ( - - ) - } - )} +

+ {box.label} +

+
+
+ ) + })} +
+ + {/* Thông số thống kê bên dưới ảnh */} +
+ {PREVIEW_STATS.map((stat) => ( +
+

+ {stat.value} +

+

+ {stat.description} +

+
+ ))}
- {/* Footer Copyright */} -

+ {/* Các loại bài toán gán nhãn hỗ trợ */} +

+ {AI_TASK_TYPES.map((taskName) => ( +

+ {taskName} +

+ ))} +
+ + {/* Bản quyền */} +

© 2026 danable. Dữ liệu của bạn, quyền kiểm soát của bạn.

diff --git a/src/pages/auth/components/LoginForm.tsx b/src/pages/auth/components/LoginForm.tsx index 94acd97..f31e4fd 100644 --- a/src/pages/auth/components/LoginForm.tsx +++ b/src/pages/auth/components/LoginForm.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react' import { Link } from 'react-router-dom' -import { LoginRequest } from '../../../types' +import { LoginRequest } from '@/types' +import { LOGIN_COLORS, createInsetOutlineStyle } from '@/styles/theme' import { SSOButton } from './SSOButton' export interface LoginFormProps { @@ -38,196 +39,194 @@ export const LoginForm: React.FC = ({ }) } + const inputBoxOutlineStyle = createInsetOutlineStyle( + LOGIN_COLORS.borderControl, + 1 + ) + return ( -
- {/* Header */} -
-

+

+ {/* Phần tiêu đề chào mừng */} +
+

CHÀO MỪNG TRỞ LẠI

-

+

Đăng nhập vào danable

-

+

Tiếp tục xây dựng bộ dữ liệu tốt hơn, cùng đội ngũ của bạn.

- {/* SSO Button */} + {/* Nút đăng nhập bằng SSO công ty */} - {/* Divider */} -
-
- + {/* Đường phân cách "hoặc sử dụng email" */} +
+
+

hoặc sử dụng email - -

+

+
- {/* Error Alert */} + {/* Thông báo lỗi nếu có */} {errorMessage && ( -
+
{errorMessage}
)} - {/* Form */} - - {/* Email Field */} -
- -
- - - - - - - setEmail(e.target.value)} - placeholder="name@company.vn" - className="w-full pl-10 pr-4 py-2.5 rounded-xl border border-slate-200 bg-white text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:border-[#C95C3C] focus:ring-2 focus:ring-[#C95C3C]/15 transition-all" - /> -
-
- - {/* Password Field */} -
- -
- - - - - - - setPassword(e.target.value)} - placeholder="Nhập mật khẩu" - className="w-full pl-10 pr-10 py-2.5 rounded-xl border border-slate-200 bg-white text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:border-[#C95C3C] focus:ring-2 focus:ring-[#C95C3C]/15 transition-all" - /> - -
-
- - {/* Remember Me & Forgot Password */} -
- - - - Quên mật khẩu? - -
- - {/* Terracotta Submit Button */} - - - - {/* Security Badge */} -
- +
- - - - Kết nối được mã hóa. Dữ liệu luôn riêng tư. + Biểu tượng email + setEmail(e.target.value)} + placeholder="minhanh@visionlab.vn" + className="flex-1 min-w-0 bg-transparent font-sans text-[13px] font-normal leading-[20px] focus:outline-none" + style={{ color: LOGIN_COLORS.textRightPrimary }} + /> +
-
+ + {/* Trường nhập Mật khẩu */} +
+ +
+ Biểu tượng khóa + setPassword(e.target.value)} + placeholder="••••••••••••" + className="flex-1 min-w-0 bg-transparent font-sans text-[13px] font-normal leading-[20px] focus:outline-none" + style={{ color: LOGIN_COLORS.textRightPrimary }} + /> + +
+
+ + {/* Ghi nhớ đăng nhập & Quên mật khẩu */} +
+ + + + Quên mật khẩu? + +
+ + {/* Nút Đăng nhập chính */} + + + {/* Cam kết bảo mật */} +
+ Biểu tượng bảo mật +

+ Kết nối được mã hóa. Dữ liệu luôn riêng tư. +

+
+ ) } diff --git a/src/pages/auth/components/SSOButton.tsx b/src/pages/auth/components/SSOButton.tsx index e49466f..08d9e13 100644 --- a/src/pages/auth/components/SSOButton.tsx +++ b/src/pages/auth/components/SSOButton.tsx @@ -1,4 +1,5 @@ import React from 'react' +import { LOGIN_COLORS, createInsetOutlineStyle } from '@/styles/theme' export interface SSOButtonProps { onClick?: () => void @@ -14,31 +15,20 @@ export const SSOButton: React.FC = ({ type="button" onClick={onClick} disabled={isLoading} - className="w-full flex items-center justify-center gap-2.5 px-4 py-3 rounded-xl border border-slate-200 bg-white text-slate-800 text-sm font-medium hover:bg-slate-50 hover:border-slate-300 active:bg-slate-100 transition-all disabled:opacity-60" + className="shrink-0 h-[46px] self-stretch flex justify-center items-center gap-2.5 rounded-[8px] overflow-hidden hover:bg-slate-50 transition-colors disabled:opacity-60" + style={createInsetOutlineStyle(LOGIN_COLORS.borderControl, 1)} > - {/* Building Icon */} - + - - - - - - - - - - - - - Đăng nhập bằng SSO công ty + Đăng nhập bằng SSO công ty + ) } diff --git a/src/pages/projects/ProjectDetailPage.tsx b/src/pages/projects/ProjectDetailPage.tsx index fc29b38..928964f 100644 --- a/src/pages/projects/ProjectDetailPage.tsx +++ b/src/pages/projects/ProjectDetailPage.tsx @@ -65,7 +65,7 @@ export const ProjectDetailPage: React.FC = () => { } return ( -
+
{/* Hidden file input for header "↑ Tải ảnh lên" button */} { /> {/* Top Header matching MVP · Project dashboard.png */} -
-
-

+
+
+

{project.name}

-

- {project.slug} +

+ {project.slug} {' · '} {TASK_DISPLAY_NAME[project.taskType]} {' · '} @@ -93,14 +93,14 @@ export const ProjectDetailPage: React.FC = () => {

-
+
{/* Tabs navigation matching MVP · Project dashboard.png */} -
-