diff --git a/apps/webui/components.json b/apps/webui/components.json new file mode 100644 index 0000000..db30f5b --- /dev/null +++ b/apps/webui/components.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "tailwind.config.js", + "css": "src/app.css", + "baseColor": "neutral", + "cssVariables": true + }, + "aliases": { + "components": "@/components", + "utils": "@/styles/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/apps/webui/index.html b/apps/webui/index.html index 596c6c0..1847814 100644 --- a/apps/webui/index.html +++ b/apps/webui/index.html @@ -4,6 +4,20 @@
+ diff --git a/apps/webui/package.json b/apps/webui/package.json index 95d3884..b95942b 100644 --- a/apps/webui/package.json +++ b/apps/webui/package.json @@ -10,49 +10,79 @@ }, "dependencies": { "@abraham/reflection": "^0.12.0", - "@ark-ui/solid": "^4.10.2", "@codemirror/language": "6.0.0", "@corvu/drawer": "^0.2.3", "@corvu/otp-field": "^0.1.4", "@corvu/resizable": "^0.2.4", "@graphiql/toolkit": "^0.11.1", - "@kobalte/core": "^0.13.9", - "@kobalte/tailwindcss": "^0.9.0", + "@hookform/resolvers": "^5.0.1", "@outposts/injection-js": "^2.5.1", - "@solid-primitives/graphql": "^2.2.0", - "@solid-primitives/refs": "^1.1.0", - "@tailwindcss/postcss": "^4.0.9", + "@radix-ui/react-accordion": "^1.2.7", + "@radix-ui/react-alert-dialog": "^1.1.10", + "@radix-ui/react-aspect-ratio": "^1.1.4", + "@radix-ui/react-avatar": "^1.1.6", + "@radix-ui/react-checkbox": "^1.2.2", + "@radix-ui/react-collapsible": "^1.1.7", + "@radix-ui/react-context-menu": "^2.2.11", + "@radix-ui/react-dialog": "^1.1.10", + "@radix-ui/react-dropdown-menu": "^2.1.11", + "@radix-ui/react-hover-card": "^1.1.10", + "@radix-ui/react-label": "^2.1.4", + "@radix-ui/react-menubar": "^1.1.11", + "@radix-ui/react-navigation-menu": "^1.2.9", + "@radix-ui/react-popover": "^1.1.10", + "@radix-ui/react-progress": "^1.1.4", + "@radix-ui/react-radio-group": "^1.3.3", + "@radix-ui/react-scroll-area": "^1.2.5", + "@radix-ui/react-select": "^2.2.2", + "@radix-ui/react-separator": "^1.1.4", + "@radix-ui/react-slider": "^1.3.2", + "@radix-ui/react-slot": "^1.2.0", + "@radix-ui/react-switch": "^1.2.2", + "@radix-ui/react-tabs": "^1.1.8", + "@radix-ui/react-toggle": "^1.1.6", + "@radix-ui/react-toggle-group": "^1.1.7", + "@radix-ui/react-tooltip": "^1.2.3", + "@rsbuild/plugin-react": "^1.2.0", "@tanstack/react-router": "^1.112.13", "@tanstack/router-devtools": "^1.112.13", - "@tanstack/solid-router": "^1.112.12", "arktype": "^2.1.6", "chart.js": "^4.4.8", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", - "cmdk-solid": "^1.1.2", - "embla-carousel-solid": "^8.5.2", + "cmdk": "^1.1.1", + "date-fns": "^4.1.0", + "embla-carousel-react": "^8.6.0", "graphiql": "^3.8.3", - "lucide-solid": "^0.477.0", + "input-otp": "^1.4.2", + "jotai": "^2.12.3", + "jotai-signal": "^0.9.0", + "lucide-react": "^0.503.0", + "next-themes": "^0.4.6", "oidc-client-rx": "0.1.0-alpha.9", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.1.0", + "react-day-picker": "8.10.1", + "react-dom": "^19.1.0", + "react-hook-form": "^7.56.0", + "react-resizable-panels": "^2.1.7", + "recharts": "^2.15.3", "rxjs": "^7.8.2", - "solid-js": "^1.9.5", - "solid-sonner": "^0.2.8", - "tailwind-merge": "^3.0.2", - "tailwindcss": "^3.4.17", - "tailwindcss-animate": "^1.0.7" + "sonner": "^2.0.3", + "tailwind-merge": "^3.2.0", + "tailwindcss": "^4.0.6", + "tw-animate-css": "^1.2.7", + "type-fest": "^4.40.0", + "vaul": "^1.1.2", + "zod": "^3.24.3" }, "devDependencies": { "@rsbuild/core": "^1.2.15", - "@rsbuild/plugin-babel": "^1.0.4", - "@rsbuild/plugin-solid": "^1.0.5", "@tailwindcss/postcss": "^4.0.9", "@tanstack/react-router": "^1.112.0", "@tanstack/router-devtools": "^1.112.6", "@tanstack/router-plugin": "^1.112.13", - "@types/react": "^18.3.18", - "@types/react-dom": "^18.3.5", + "@types/react": "^19.1.2", + "@types/react-dom": "^19.1.2", "chalk": "^5.4.1", "commander": "^13.1.0", "postcss": "^8.5.3" diff --git a/apps/webui/postcss.config.mjs b/apps/webui/postcss.config.mjs index 684db48..7595f17 100644 --- a/apps/webui/postcss.config.mjs +++ b/apps/webui/postcss.config.mjs @@ -1,5 +1,5 @@ export default { plugins: { - 'tailwindcss': {}, + '@tailwindcss/postcss': {}, }, -}; +}; \ No newline at end of file diff --git a/apps/webui/rsbuild.config.ts b/apps/webui/rsbuild.config.ts index 78d34b8..8252ac2 100644 --- a/apps/webui/rsbuild.config.ts +++ b/apps/webui/rsbuild.config.ts @@ -1,6 +1,5 @@ import { defineConfig } from '@rsbuild/core'; -import { pluginBabel } from '@rsbuild/plugin-babel'; -import { pluginSolid } from '@rsbuild/plugin-solid'; +import { pluginReact } from '@rsbuild/plugin-react'; import { TanStackRouterRspack } from '@tanstack/router-plugin/rspack'; export default defineConfig({ @@ -8,16 +7,11 @@ export default defineConfig({ title: 'Konobangu', favicon: './public/assets/favicon.ico', }, - plugins: [ - pluginBabel({ - include: /\.(?:jsx|tsx)$/, - }), - pluginSolid(), - ], + plugins: [pluginReact()], tools: { rspack: { plugins: [ - TanStackRouterRspack({ target: 'solid', autoCodeSplitting: true }), + TanStackRouterRspack({ target: 'react', autoCodeSplitting: true }), ], }, }, diff --git a/apps/webui/src/app.css b/apps/webui/src/app.css index 3d968b8..11ec438 100644 --- a/apps/webui/src/app.css +++ b/apps/webui/src/app.css @@ -1,149 +1,141 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import "tailwindcss"; +@import "tw-animate-css"; -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 240 10% 3.9%; +@custom-variant dark (&:is(.dark *)); - --muted: 240 4.8% 95.9%; - --muted-foreground: 240 3.8% 46.1%; +:root { + --radius: 0.625rem; + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); + --card: oklch(1 0 0); + --card-foreground: oklch(0.145 0 0); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.145 0 0); + --primary: oklch(0.205 0 0); + --primary-foreground: oklch(0.985 0 0); + --secondary: oklch(0.97 0 0); + --secondary-foreground: oklch(0.205 0 0); + --muted: oklch(0.97 0 0); + --muted-foreground: oklch(0.556 0 0); + --accent: oklch(0.97 0 0); + --accent-foreground: oklch(0.205 0 0); + --destructive: oklch(0.577 0.245 27.325); + --border: oklch(0.922 0 0); + --input: oklch(0.922 0 0); + --ring: oklch(0.708 0 0); + --chart-1: oklch(0.646 0.222 41.116); + --chart-2: oklch(0.6 0.118 184.704); + --chart-3: oklch(0.398 0.07 227.392); + --chart-4: oklch(0.828 0.189 84.429); + --chart-5: oklch(0.769 0.188 70.08); + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} - --popover: 0 0% 100%; - --popover-foreground: 240 10% 3.9%; +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.205 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.205 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.922 0 0); + --primary-foreground: oklch(0.205 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.269 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.269 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.704 0.191 22.216); + --border: oklch(1 0 0 / 10%); + --input: oklch(1 0 0 / 15%); + --ring: oklch(0.556 0 0); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.556 0 0); +} - --border: 240 5.9% 90%; - --input: 240 5.9% 90%; +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-chart-1: var(--chart-1); + --color-chart-2: var(--chart-2); + --color-chart-3: var(--chart-3); + --color-chart-4: var(--chart-4); + --color-chart-5: var(--chart-5); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); + --animate-accordion-down: accordion-down 0.2s ease-out; + --animate-accordion-up: accordion-up 0.2s ease-out; - --card: 0 0% 100%; - --card-foreground: 240 10% 3.9%; - - --primary: 240 5.9% 10%; - --primary-foreground: 0 0% 98%; - - --secondary: 240 4.8% 95.9%; - --secondary-foreground: 240 5.9% 10%; - - --accent: 240 4.8% 95.9%; - --accent-foreground: 240 5.9% 10%; - - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 0% 98%; - - --info: 204 94% 94%; - --info-foreground: 199 89% 48%; - - --success: 149 80% 90%; - --success-foreground: 160 84% 39%; - - --warning: 48 96% 89%; - --warning-foreground: 25 95% 53%; - - --error: 0 93% 94%; - --error-foreground: 0 84% 60%; - - --ring: 240 5.9% 10%; - - --radius: 0.5rem; - - --sidebar-background: 0 0% 98%; - --sidebar-foreground: 240 5.3% 26.1%; - --sidebar-primary: 240 5.9% 10%; - --sidebar-primary-foreground: 0 0% 98%; - --sidebar-accent: 240 4.8% 95.9%; - --sidebar-accent-foreground: 240 5.9% 10%; - --sidebar-border: 220 13% 91%; - --sidebar-ring: 217.2 91.2% 59.8%; + @keyframes accordion-down { + from { + height: 0; + } + to { + height: var(--radix-accordion-content-height); + } } - .dark, - [data-kb-theme="dark"] { - --background: 240 10% 3.9%; - --foreground: 0 0% 98%; - - --muted: 240 3.7% 15.9%; - --muted-foreground: 240 5% 64.9%; - - --accent: 240 3.7% 15.9%; - --accent-foreground: 0 0% 98%; - - --popover: 240 10% 3.9%; - --popover-foreground: 0 0% 98%; - - --border: 240 3.7% 15.9%; - --input: 240 3.7% 15.9%; - - --card: 240 10% 3.9%; - --card-foreground: 0 0% 98%; - - --primary: 0 0% 98%; - --primary-foreground: 240 5.9% 10%; - - --secondary: 240 3.7% 15.9%; - --secondary-foreground: 0 0% 98%; - - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 0% 98%; - - --info: 204 94% 94%; - --info-foreground: 199 89% 48%; - - --success: 149 80% 90%; - --success-foreground: 160 84% 39%; - - --warning: 48 96% 89%; - --warning-foreground: 25 95% 53%; - - --error: 0 93% 94%; - --error-foreground: 0 84% 60%; - - --ring: 240 4.9% 83.9%; - - --radius: 0.5rem; - - --sidebar-background: 240 5.9% 10%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary: 224.3 76.3% 48%; - --sidebar-primary-foreground: 0 0% 100%; - --sidebar-accent: 240 3.7% 15.9%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; + @keyframes accordion-up { + from { + height: var(--radix-accordion-content-height); + } + to { + height: 0; + } } - - /* custom start */ - ::-webkit-scrollbar { - width: 16px; - } - - ::-webkit-scrollbar-thumb { - border-radius: 9999px; - border: 4px solid transparent; - background-clip: content-box; - @apply bg-accent; - } - - ::-webkit-scrollbar-corner { - display: none; - } - /* custom end */ } @layer base { * { - @apply border-border; + @apply border-border outline-ring/50; } body { @apply bg-background text-foreground; - font-feature-settings: - "rlig" 1, - "calt" 1; } -} - -@media (max-width: 640px) { - .container { - @apply px-4; - } -} +} \ No newline at end of file diff --git a/apps/webui/src/auth/config.ts b/apps/webui/src/auth/config.ts index 1e5c00f..df98564 100644 --- a/apps/webui/src/auth/config.ts +++ b/apps/webui/src/auth/config.ts @@ -1,7 +1,14 @@ import { LogLevel, type OpenIdConfiguration } from 'oidc-client-rx'; +import type { ValueOf } from 'type-fest'; -export const isBasicAuth = process.env.AUTH_TYPE === 'basic'; -export const isOidcAuth = process.env.AUTH_TYPE === 'oidc'; +export const AuthMethodEnum = { + BASIC: 'basic', + OIDC: 'oidc', +} as const; + +export type AuthMethodType = ValueOf+
Sorry, we couldn't find the page you're looking for.