Skip to content

Commit 484704d

Browse files
committed
refactor(frontend): execute The Great Purge and formalize shared UI monorepo workspace
Deleted Tailwind v3 proxy configs, scrubbed Color Story variables, purged old React views, built @quanux/shared-ui package.json, and documented the Monorepo Horizon transition for future UI ingestion.
1 parent 92a0802 commit 484704d

10 files changed

Lines changed: 69 additions & 387 deletions

File tree

client/react/desktop/tauri-app/src/App.tsx

Lines changed: 5 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,11 @@
1-
import React, { useState } from 'react';
2-
import { LaunchAnimation } from './components/LaunchAnimation';
3-
import { ConnectServer } from './components/ConnectServer';
4-
import { Sidebar } from './components/Sidebar';
5-
import { StrategyBuilder } from './pages/StrategyBuilder';
6-
import { Integrations } from './pages/Integrations';
7-
import { Backtests } from './pages/Backtests';
8-
import { Settings } from './pages/Settings';
1+
import React from 'react';
92

103
export const App = () => {
11-
const [stage, setStage] = useState<'launch' | 'connect' | 'dashboard'>('launch');
12-
const [currentView, setCurrentView] = useState(() => {
13-
const path = window.location.pathname;
14-
if (path.includes('strategy')) return 'strategy';
15-
if (path.includes('integrations')) return 'integrations';
16-
if (path.includes('backtests')) return 'backtests';
17-
return 'dashboard';
18-
});
19-
20-
const handleAnimationComplete = () => {
21-
setStage('connect');
22-
};
23-
24-
const handleConnect = () => {
25-
setStage('dashboard');
26-
};
27-
28-
if (stage === 'launch') {
29-
return <LaunchAnimation onComplete={handleAnimationComplete} />;
30-
}
31-
32-
if (stage === 'connect') {
33-
return <ConnectServer onConnect={handleConnect} />;
34-
}
35-
36-
const renderContent = () => {
37-
switch (currentView) {
38-
case 'strategy':
39-
return <StrategyBuilder />;
40-
case 'integrations':
41-
return <Integrations />;
42-
case 'backtests':
43-
return <Backtests />;
44-
case 'settings':
45-
return <Settings />;
46-
case 'dashboard':
47-
default:
48-
return (
49-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
50-
{/* Placeholder cards */}
51-
<div className="p-6 rounded-xl bg-card border border-border/50 hover:border-primary/50 transition-all duration-300 hover:shadow-[0_0_30px_rgba(255,0,255,0.1)] group cursor-pointer">
52-
<h3 className="text-xl font-bold mb-2 group-hover:text-primary transition-colors">Market Data</h3>
53-
<p className="text-muted-foreground tezt-sm">Live stream active. Latency: 12ms.</p>
54-
<div className="mt-4 h-32 bg-background/50 rounded-lg flex items-center justify-center border border-dashed border-muted">
55-
<span className="text-xs text-muted-foreground">CHART PLACEHOLDER</span>
56-
</div>
57-
</div>
58-
59-
<div className="p-6 rounded-xl bg-card border border-border/50 hover:border-secondary/50 transition-all duration-300 hover:shadow-[0_0_30px_rgba(0,255,255,0.1)] group cursor-pointer">
60-
<h3 className="text-xl font-bold mb-2 group-hover:text-secondary transition-colors">Strategies</h3>
61-
<p className="text-muted-foreground text-sm">3 Active strategies. PnL +2.4%</p>
62-
<div className="mt-4 flex gap-2">
63-
<div className="px-3 py-1 rounded-full bg-secondary/10 text-secondary text-xs border border-secondary/20">Alpha</div>
64-
<div className="px-3 py-1 rounded-full bg-primary/10 text-primary text-xs border border-primary/20">Gamma</div>
65-
</div>
66-
</div>
67-
68-
<div className="p-6 rounded-xl bg-card border border-border/50 hover:border-accent/50 transition-all duration-300 hover:shadow-[0_0_30px_rgba(57,255,20,0.1)] group cursor-pointer">
69-
<h3 className="text-xl font-bold mb-2 group-hover:text-accent transition-colors">System Health</h3>
70-
<p className="text-muted-foreground text-sm">All services operational.</p>
71-
<div className="mt-4 space-y-2">
72-
<div className="flex justify-between text-xs"><span>CPU</span><span className="text-accent">12%</span></div>
73-
<div className="w-full h-1 bg-muted rounded-full overflow-hidden"><div className="w-[12%] h-full bg-accent"></div></div>
74-
<div className="flex justify-between text-xs"><span>MEM</span><span className="text-accent">45%</span></div>
75-
<div className="w-full h-1 bg-muted rounded-full overflow-hidden"><div className="w-[45%] h-full bg-accent"></div></div>
76-
</div>
77-
</div>
78-
</div>
79-
);
80-
}
81-
};
82-
83-
// Dashboard / Logged In State
844
return (
85-
<div className="flex h-screen bg-background text-foreground overflow-hidden fade-in">
86-
<Sidebar currentView={currentView} onNavigate={setCurrentView} />
87-
88-
<div className="flex-1 flex flex-col min-w-0 overflow-auto">
89-
<header className="flex justify-between items-center p-8 pb-4">
90-
<h1 className="text-4xl font-black text-transparent bg-clip-text bg-gradient-to-r from-primary to-secondary drop-shadow-[0_0_15px_rgba(255,0,255,0.3)]">
91-
QuanuX
92-
</h1>
93-
<div className="flex items-center gap-4">
94-
<div className="w-3 h-3 rounded-full bg-green-500 shadow-[0_0_10px_#00ff00] animate-pulse"></div>
95-
<span className="text-sm font-mono text-muted-foreground">SYSTEM ONLINE</span>
96-
</div>
97-
</header>
98-
99-
<main className="flex-1 p-8 pt-0 h-full overflow-hidden">
100-
{renderContent()}
101-
</main>
5+
<div className="flex h-screen w-screen items-center justify-center bg-background text-foreground font-mono">
6+
<div className="text-center space-y-4">
7+
<h1 className="text-3xl font-bold tracking-widest uppercase">QuanuX</h1>
8+
<p className="text-sm text-muted-foreground">Tauri Desktop Shell initialized. Awaiting UI configuration.</p>
1029
</div>
10310
</div>
10411
);

client/react/desktop/tauri-app/src/styles/tailwind.css

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -23,78 +23,10 @@
2323
--color-ring: hsl(var(--ring));
2424
}
2525

26-
/* Cyberpunk Theme */
27-
:root {
28-
/* Deep Dark Blue/Black Background */
29-
--background: 240 52% 4%;
30-
/* Neon White Foreground */
31-
--foreground: 240 100% 94%;
32-
33-
/* Glassmorphism Card */
34-
--card: 240 52% 6%;
35-
--card-foreground: 240 100% 94%;
36-
37-
--popover: 240 52% 4%;
38-
--popover-foreground: 240 100% 94%;
39-
40-
/* Neon Pink */
41-
--primary: 300 100% 50%;
42-
--primary-foreground: 0 0% 100%;
43-
44-
/* Cyan */
45-
--secondary: 180 100% 50%;
46-
--secondary-foreground: 240 52% 4%;
47-
48-
/* Dark Muted */
49-
--muted: 240 30% 15%;
50-
--muted-foreground: 240 20% 60%;
51-
52-
/* Neon Green Accent */
53-
--accent: 110 100% 54%;
54-
--accent-foreground: 240 52% 4%;
55-
56-
--destructive: 0 100% 50%;
57-
--destructive-foreground: 0 0% 100%;
58-
59-
--border: 240 30% 20%;
60-
--input: 240 30% 20%;
61-
--ring: 300 100% 50%; /* Pink Ring */
62-
63-
--radius: 0.5rem;
64-
}
65-
66-
/* Force dark mode styles if class is present, or just use root */
67-
.dark {
68-
--background: 240 52% 4%;
69-
--foreground: 240 100% 94%;
70-
--card: 240 52% 6%;
71-
--card-foreground: 240 100% 94%;
72-
--popover: 240 52% 4%;
73-
--popover-foreground: 240 100% 94%;
74-
--primary: 300 100% 50%;
75-
--primary-foreground: 0 0% 100%;
76-
--secondary: 180 100% 50%;
77-
--secondary-foreground: 240 52% 4%;
78-
--muted: 240 30% 15%;
79-
--muted-foreground: 240 20% 60%;
80-
--accent: 110 100% 54%;
81-
--accent-foreground: 240 52% 4%;
82-
--destructive: 0 100% 50%;
83-
--destructive-foreground: 0 0% 100%;
84-
--border: 240 30% 20%;
85-
--input: 240 30% 20%;
86-
--ring: 300 100% 50%;
87-
}
88-
8926
* {
9027
@apply border-border;
9128
}
9229

9330
body {
9431
@apply bg-background text-foreground;
95-
/* Cyberpunk Gradient Mesh Background hint */
96-
background-image:
97-
radial-gradient(circle at 15% 50%, rgba(255, 0, 255, 0.08), transparent 25%),
98-
radial-gradient(circle at 85% 30%, rgba(0, 255, 255, 0.08), transparent 25%);
99-
background-attachment: fixed;
100-
}
32+
}

client/react/desktop/tauri-app/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig({
99
alias: {
1010
"@": fileURLToPath(new URL("./src", import.meta.url)),
1111
"@/shared": fileURLToPath(new URL("../shared", import.meta.url)),
12-
"@quanux/shared": fileURLToPath(new URL("../../shared", import.meta.url)),
12+
"@quanux/shared-ui": fileURLToPath(new URL("../../shared", import.meta.url)),
1313
},
1414
},
1515
server: {

client/react/shared/package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "@quanux/shared-ui",
3+
"version": "0.0.1",
4+
"private": true,
5+
"description": "QuanuX Shared UI Library - Shadcn Components & Utils",
6+
"main": "index.ts",
7+
"exports": {
8+
"./components/*": "./components/*",
9+
"./lib/*": "./lib/*",
10+
"./hooks/*": "./hooks/*"
11+
},
12+
"peerDependencies": {
13+
"react": "^18.3.1",
14+
"react-dom": "^18.3.1",
15+
"tailwindcss": "^4.1.18"
16+
},
17+
"dependencies": {
18+
"@radix-ui/react-avatar": "^1.1.11",
19+
"@radix-ui/react-checkbox": "^1.3.3",
20+
"@radix-ui/react-dialog": "^1.1.15",
21+
"@radix-ui/react-dropdown-menu": "^2.1.16",
22+
"@radix-ui/react-icons": "^1.3.2",
23+
"@radix-ui/react-label": "^2.1.8",
24+
"@radix-ui/react-popover": "^1.1.15",
25+
"@radix-ui/react-progress": "^1.1.8",
26+
"@radix-ui/react-radio-group": "^1.3.8",
27+
"@radix-ui/react-scroll-area": "^1.2.10",
28+
"@radix-ui/react-select": "^2.2.6",
29+
"@radix-ui/react-separator": "^1.1.8",
30+
"@radix-ui/react-slider": "^1.3.6",
31+
"@radix-ui/react-slot": "^1.2.4",
32+
"@radix-ui/react-switch": "^1.2.6",
33+
"@radix-ui/react-tabs": "^1.1.13",
34+
"@radix-ui/react-toast": "^1.2.15",
35+
"@radix-ui/react-toggle": "^1.1.10",
36+
"@radix-ui/react-tooltip": "^1.2.8",
37+
"class-variance-authority": "^0.7.1",
38+
"clsx": "^2.1.1",
39+
"lucide-react": "^0.575.0",
40+
"tailwind-merge": "^2.6.1"
41+
}
42+
}

client/react/skills/react-frontend-standards/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,10 @@ Adhere to these Vercel-derived standards for optimal performance.
6363
- **Styling**: Tailwind CSS (strict). Do not write custom CSS files unless absolutely necessary for animations not covered by Tailwind config.
6464
- **Components**: Shadcn UI (Radix based). Reuse existing components from `client/shared` where possible.
6565
- **Icons**: Lucide React.
66+
67+
## 5. Monorepo Transition & Shared UI
68+
69+
To ensure `Tailwind v4` can properly scan CSS classes across project boundaries, the `client/react/shared` directory has been formalized into an internal `pnpm` workspace package named `@quanux/shared-ui`.
70+
71+
- **Do not** use legacy TS path-aliasing (e.g., `@/shared/components`) to reach into the shared folder.
72+
- **Always** import shared components via the package name: `import { Button } from "@quanux/shared-ui/components/ui/button"`.

client/react/tailwind.config.ts

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)