feat: optimize interface and database connection

Adjust MongoDB mock connector and update database structure.
Enhance sidebar, data platform, and AI analysis tools.
Clean up unnecessary code and update development docs.

#VERCEL_SKIP

Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
This commit is contained in:
v0
2025-07-21 00:11:52 +00:00
parent 892c5b4855
commit ecd8a48863
26 changed files with 1821 additions and 1024 deletions

View File

@@ -8,14 +8,15 @@ import {
Database,
LayoutDashboard,
Settings,
Users,
Target,
ChevronLeft,
ChevronDown,
ChevronRight,
Tag,
BarChart3,
TrendingUp,
UserCheck,
Layers,
BrainCircuit,
Smartphone,
} from "lucide-react"
import { Badge } from "@/components/ui/badge"
@@ -23,8 +24,7 @@ export default function Sidebar() {
const pathname = usePathname()
const [expanded, setExpanded] = useState(true)
const [expandedSections, setExpandedSections] = useState({
"user-portrait": true,
"user-value": false,
"user-portrait": true, // 用户画像默认展开
})
const toggleSidebar = () => {
@@ -38,60 +38,57 @@ export default function Sidebar() {
}))
}
// 重新设计的导航结构
// 重新设计的导航结构 - 遵循新规则
const navItems = [
{
title: "概览",
title: "数据概览",
href: "/",
icon: <LayoutDashboard className="h-5 w-5" />,
primary: true,
},
{
title: "数据集成",
href: "/data-integration",
title: "数据中台",
href: "/data-platform",
icon: <Database className="h-5 w-5" />,
primary: true,
tag: "核心",
},
{
title: "用户画像",
title: "用户画像", // 整合用户池功能
href: "/user-portrait",
icon: <Users className="h-5 w-5" />,
icon: <Target className="h-5 w-5" />,
primary: true,
expandable: true,
section: "user-portrait",
children: [
{
title: "用户",
href: "/user-portrait/user-keywords",
icon: <Tag className="h-4 w-4" />,
title: "用户管理", // 原用户池的用户管理
href: "/user-portrait/management",
icon: <UserCheck className="h-4 w-4" />,
},
{
title: "标签管理",
title: "用户分群", // 原用户池的用户分群
href: "/user-portrait/segmentation",
icon: <Layers className="h-4 w-4" />,
},
{
title: "标签管理", // 原用户画像的标签管理
href: "/user-portrait/tags",
icon: <Tag className="h-4 w-4" />,
},
],
},
{
title: "用户估值",
href: "/user-value",
icon: <Target className="h-5 w-5" />,
title: "设备管理", // 提升为一级菜单 [^2]
href: "/devices",
icon: <Smartphone className="h-5 w-5" />,
primary: true,
},
{
title: "AI智能助手", // 新增AI智能助手
href: "/ai-assistant",
icon: <BrainCircuit className="h-5 w-5" />,
primary: true,
expandable: true,
section: "user-value",
children: [
{
title: "估值模型",
href: "/user-value/model",
icon: <BarChart3 className="h-4 w-4" />,
},
{
title: "用户升级路径",
href: "/user-value/upgrade-paths",
icon: <TrendingUp className="h-4 w-4" />,
},
],
},
]
@@ -119,7 +116,7 @@ export default function Sidebar() {
<Database className="h-5 w-5 text-blue-600" />
</div>
<h1 className="text-lg font-semibold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
</h1>
</div>
) : (
@@ -139,7 +136,7 @@ export default function Sidebar() {
<div
className={cn(
"flex items-center px-4 py-3 text-sm font-medium rounded-xl transition-all duration-300 group",
pathname === item.href
pathname === item.href || (item.children && pathname.startsWith(item.href))
? "glass-heavy text-blue-700 shadow-glass"
: "glass-light text-gray-700 hover:glass-heavy hover:text-blue-600 hover:scale-105",
)}