File size: 1,936 Bytes
2deb2c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
"use client";

import Link from "next/link";
import { usePathname } from "next/navigation";
import { Activity, BarChart3, Brain, Database, FlaskConical, Gauge, Home, Network, Radar, Search, ShieldAlert } from "lucide-react";
import clsx from "clsx";

const nav = [
  { href: "/", label: "Case Study", icon: Home },
  { href: "/dashboard", label: "Intelligence Dashboard", icon: Gauge },
  { href: "/assets/NVDA", label: "Asset Detail", icon: Activity },
  { href: "/etf-radar", label: "ETF Radar", icon: Radar },
  { href: "/themes", label: "Theme Explorer", icon: Network },
  { href: "/signal-lab", label: "Signal Lab", icon: Search },
  { href: "/backtest", label: "Backtest", icon: FlaskConical },
  { href: "/methodology", label: "Methodology", icon: Brain }
];

export function AppShell({ children }: { children: React.ReactNode }) {
  const pathname = usePathname();
  return (
    <div className="app-shell">
      <aside className="sidebar">
        <div className="brand">
          <div className="brand-mark">B</div>
          <div>
            <strong>Blum</strong>
            <span>AI Financial Intelligence</span>
          </div>
        </div>
        <nav>
          {nav.map((item) => {
            const Icon = item.icon;
            const active = pathname === item.href || (item.href !== "/" && pathname.startsWith(item.href));
            return (
              <Link href={item.href} key={item.href} className={clsx("nav-item", active && "active")}>
                <Icon size={17} />
                <span>{item.label}</span>
              </Link>
            );
          })}
        </nav>
        <div className="system-card">
          <div><Database size={15} /> PostgreSQL</div>
          <div><BarChart3 size={15} /> FastAPI + Next.js</div>
          <div><ShieldAlert size={15} /> Research only</div>
        </div>
      </aside>
      <main className="workspace">{children}</main>
    </div>
  );
}