Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

init test

Mike Fortman7712922458d1
diff --git a/frontend/app/globals.css b/frontend/app/globals.css
index 0c1a4a330..608e434ff 100644
--- a/frontend/app/globals.css
+++ b/frontend/app/globals.css
@@ -120,6 +120,118 @@
--sidebar-ring: 217.2 91.2% 59.8%;
}
+ /* IBM Light */
+ [data-theme="ibm"] {
+ --background: 0 0% 97%; /* IBM Gray 10 #f4f4f4 */
+ --foreground: 0 0% 15%; /* IBM Gray 100 #262626 */
+ --card: 0 0% 100%;
+ --card-foreground: 0 0% 15%;
+ --popover: 0 0% 100%;
+ --popover-foreground: 0 0% 15%;
+ --primary: 217 100% 45%; /* IBM Blue 60 #0f62fe */
+ --primary-foreground: 0 0% 100%;
+ --primary-hover: 217 100% 35%; /* IBM Blue 70 #0043ce */
+ --secondary: 0 0% 97%;
+ --secondary-foreground: 0 0% 15%;
+ --secondary-hover: 0 0% 90%; /* IBM Gray 20 #e0e0e0 */
+ --muted: 0 0% 90%; /* IBM Gray 20 #e0e0e0 */
+ --muted-foreground: 0 0% 38%; /* IBM Gray 60 #6f6f6f */
+ --accent: 0 0% 90%;
+ --accent-foreground: 0 0% 15%;
+ --border: 0 0% 82%; /* IBM Gray 30 #c6c6c6 */
+ --input: 0 0% 82%;
+ --ring: 217 100% 45%;
+ --placeholder-foreground: 0 0% 56%; /* IBM Gray 50 #8d8d8d */
+
+ --accent-amber: 39 100% 88%;
+ --accent-amber-foreground: 26 90% 37%;
+ --accent-emerald: 149 80% 90%;
+ --accent-emerald-foreground: 161 94% 30%;
+ --accent-red: 0 93% 94%;
+ --accent-red-foreground: 0 72% 51%;
+ --accent-indigo: 226 100% 94%;
+ --accent-indigo-foreground: 217 100% 45%;
+ --accent-pink: 326 78% 95%;
+ --accent-pink-foreground: 333 71% 51%;
+ --accent-purple: 269 100% 95%;
+ --accent-purple-foreground: 271 81% 56%;
+
+ --destructive: 0 72% 51%;
+ --destructive-foreground: 0 0% 100%;
+ --warning: 26 90% 37%;
+ --warning-foreground: 0 0% 100%;
+
+ --component-icon: #0f62fe;
+ --flow-icon: #0043ce;
+
+ --radius: 0rem; /* IBM uses sharp corners */
+
+ --sidebar-background: 0 0% 90%; /* IBM Gray 20 */
+ --sidebar-foreground: 0 0% 15%;
+ --sidebar-primary: 217 100% 45%;
+ --sidebar-primary-foreground: 0 0% 100%;
+ --sidebar-accent: 0 0% 82%;
+ --sidebar-accent-foreground: 0 0% 15%;
+ --sidebar-border: 0 0% 82%;
+ --sidebar-ring: 217 100% 45%;
+ }
+
+ /* IBM Dark */
+ [data-theme="ibm"].dark {
+ --background: 0 0% 9%; /* IBM Gray 100 #161616 */
+ --foreground: 0 0% 97%; /* IBM Gray 10 #f4f4f4 */
+ --card: 0 0% 12%; /* IBM Gray 90 #1c1c1c → ~#262626 */
+ --card-foreground: 0 0% 97%;
+ --popover: 0 0% 12%;
+ --popover-foreground: 0 0% 97%;
+ --primary: 217 100% 62%; /* IBM Blue 40 #4589ff */
+ --primary-foreground: 0 0% 9%;
+ --primary-hover: 217 100% 72%; /* IBM Blue 30 #78a9ff */
+ --secondary: 0 0% 12%;
+ --secondary-foreground: 0 0% 97%;
+ --secondary-hover: 0 0% 18%; /* IBM Gray 80 #393939 */
+ --muted: 0 0% 18%; /* IBM Gray 80 */
+ --muted-foreground: 0 0% 56%; /* IBM Gray 50 #8d8d8d */
+ --accent: 0 0% 18%;
+ --accent-foreground: 0 0% 97%;
+ --border: 0 0% 26%; /* IBM Gray 70 #525252 */
+ --input: 0 0% 26%;
+ --ring: 217 100% 62%;
+ --placeholder-foreground: 0 0% 38%; /* IBM Gray 60 */
+
+ --accent-amber: 22 78% 26%;
+ --accent-amber-foreground: 46 97% 65%;
+ --accent-emerald: 164 86% 16%;
+ --accent-emerald-foreground: 158 64% 52%;
+ --accent-red: 0 63% 31%;
+ --accent-red-foreground: 0 91% 71%;
+ --accent-indigo: 217 80% 25%;
+ --accent-indigo-foreground: 217 100% 72%;
+ --accent-pink: 336 69% 30%;
+ --accent-pink-foreground: 329 86% 70%;
+ --accent-purple: 274 66% 32%;
+ --accent-purple-foreground: 270 95% 75%;
+
+ --destructive: 0 84% 60%;
+ --destructive-foreground: 0 0% 100%;
+ --warning: 46 97% 65%;
+ --warning-foreground: 0 0% 0%;
+
+ --component-icon: #4589ff;
+ --flow-icon: #78a9ff;
+
+ --radius: 0rem;
+
+ --sidebar-background: 0 0% 12%;
+ --sidebar-foreground: 0 0% 97%;
+ --sidebar-primary: 217 100% 62%;
+ --sidebar-primary-foreground: 0 0% 9%;
+ --sidebar-accent: 0 0% 18%;
+ --sidebar-accent-foreground: 0 0% 97%;
+ --sidebar-border: 0 0% 26%;
+ --sidebar-ring: 217 100% 62%;
+ }
+
* {
@apply border-border;
}
diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx
index e9e33c0d4..af8abe271 100644
--- a/frontend/app/layout.tsx
+++ b/frontend/app/layout.tsx
@@ -6,6 +6,7 @@ import { ThemeProvider } from "@/components/theme-provider";
import { Toaster } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { AuthProvider } from "@/contexts/auth-context";
+import { BrandProvider } from "@/contexts/brand-context";
import { ChatProvider } from "@/contexts/chat-context";
import { KnowledgeFilterProvider } from "@/contexts/knowledge-filter-context";
import { TaskProvider } from "@/contexts/task-context";
@@ -46,19 +47,21 @@ export default function RootLayout({
enableSystem
disableTransitionOnChange
>
- <Providers>
- <TooltipProvider>
- <AuthProvider>
- <TaskProvider>
- <KnowledgeFilterProvider>
- <ChatProvider>
- <LayoutWrapper>{children}</LayoutWrapper>
- </ChatProvider>
- </KnowledgeFilterProvider>
- </TaskProvider>
- </AuthProvider>
- </TooltipProvider>
- </Providers>
+ <BrandProvider>
+ <Providers>
+ <TooltipProvider>
+ <AuthProvider>
+ <TaskProvider>
+ <KnowledgeFilterProvider>
+ <ChatProvider>
+ <LayoutWrapper>{children}</LayoutWrapper>
+ </ChatProvider>
+ </KnowledgeFilterProvider>
+ </TaskProvider>
+ </AuthProvider>
+ </TooltipProvider>
+ </Providers>
+ </BrandProvider>
</ThemeProvider>
<Toaster />
</body>
diff --git a/frontend/components/brand-switcher.tsx b/frontend/components/brand-switcher.tsx
new file mode 100644
index 000000000..464aaf3b2
--- /dev/null
+++ b/frontend/components/brand-switcher.tsx
@@ -0,0 +1,40 @@
+"use client";
+
+import { useBrand } from "@/contexts/brand-context";
+
+export function BrandSwitcher() {
+ const { brand, setBrand } = useBrand();
+
+ return (
+ <div className="flex items-center border border-border rounded-full">
+ <button
+ type="button"
+ className={`px-3 h-6 rounded-full text-xs font-medium transition-colors ${
+ brand === "oss"
+ ? "bg-foreground text-background"
+ : "text-foreground hover:bg-foreground hover:text-background"
+ }`}
+ onClick={() => setBrand("oss")}
+ data-testid="brand_oss_button"
+ id="brand_oss_button"
+ >
+ OSS
+ </button>
+ <button
+ type="button"
+ className={`px-3 h-6 rounded-full text-xs font-medium transition-colors ${
+ brand === "ibm"
+ ? "bg-blue-600 text-white"
+ : "text-foreground hover:bg-blue-600 hover:text-white"
+ }`}
+ onClick={() => setBrand("ibm")}
+ data-testid="brand_ibm_button"
+ id="brand_ibm_button"
+ >
+ IBM
+ </button>
+ </div>
+ );
+}
+
+export default BrandSwitcher;
diff --git a/frontend/components/header.tsx b/frontend/components/header.tsx
index 2686140ba..2283682b8 100644
--- a/frontend/components/header.tsx
+++ b/frontend/components/header.tsx
@@ -1,6 +1,7 @@
"use client";
import { Bell } from "lucide-react";
+import { BrandSwitcher } from "@/components/brand-switcher";
import Logo from "@/components/icons/openrag-logo";
import { UserNav } from "@/components/user-nav";
import { useTask } from "@/contexts/task-context";
@@ -45,6 +46,11 @@ export function Header() {
{/* Discord Link */}
{/* <DiscordLink inviteCode="EqksyE2EX9" /> */}
+ <BrandSwitcher />
+
+ {/* Separator */}
+ <div className="w-px h-6 bg-border mx-3" />
+
{/* Task Notification Bell */}
<button
onClick={toggleMenu}
diff --git a/frontend/contexts/brand-context.tsx b/frontend/contexts/brand-context.tsx
new file mode 100644
index 000000000..1aabd1a8e
--- /dev/null
+++ b/frontend/contexts/brand-context.tsx
@@ -0,0 +1,47 @@
+"use client";
+
+import { createContext, useContext, useEffect, useState } from "react";
+
+export type Brand = "oss" | "ibm";
+
+interface BrandContextValue {
+ brand: Brand;
+ setBrand: (brand: Brand) => void;
+}
+
+const BrandContext = createContext<BrandContextValue>({
+ brand: "oss",
+ setBrand: () => {},
+});
+
+function applyBrand(brand: Brand) {
+ if (brand === "ibm") {
+ document.documentElement.setAttribute("data-theme", "ibm");
+ } else {
+ document.documentElement.removeAttribute("data-theme");
+ }
+}
+
+export function BrandProvider({ children }: { children: React.ReactNode }) {
+ const [brand, setBrandState] = useState<Brand>("oss");
+
+ useEffect(() => {
+ const stored = (localStorage.getItem("brand") as Brand) ?? "oss";
+ applyBrand(stored);
+ setBrandState(stored);
+ }, []);
+
+ function setBrand(newBrand: Brand) {
+ localStorage.setItem("brand", newBrand);
+ applyBrand(newBrand);
+ setBrandState(newBrand);
+ }
+
+ return (
+ <BrandContext.Provider value={{ brand, setBrand }}>
+ {children}
+ </BrandContext.Provider>
+ );
+}
+
+export const useBrand = () => useContext(BrandContext);