diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..a21f178d3ab70995291ecb91ca05e8627f3d0380 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +dist +.git diff --git a/.env.example b/.env.example new file mode 100644 index 0000000000000000000000000000000000000000..2d1bf5ff59589cae68929510a857291dceb55318 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +VITE_API_BASE_URL= \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..94e13838e96df54df7b5347441a5ec2d8992d7e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Dependencies +node_modules/ + +# Build output +dist/ +dist-ssr/ + +# Environment variables +.env +.env.local +.env.*.local + +# Logs +logs/ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Editor +.vscode/* +!.vscode/extensions.json +.idea/ +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +# OS +.DS_Store +Thumbs.db + +# Vite +*.local +vite.config.ts.timestamp-* + +API_CONTRACT.md +API_CONTRACT_VOICE.md + +# Database logos (served via CDN) +public/databases/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..0669f1230b7a4313c2fcee52a910f80315864281 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Stage 1: Build +FROM node:22-alpine AS builder + +RUN corepack enable && corepack prepare pnpm@latest --activate + +WORKDIR /app + +COPY pnpm-workspace.yaml package.json pnpm-lock.yaml* pnpm-lock.json* ./ +RUN pnpm install --no-frozen-lockfile + +COPY . . +RUN pnpm build + +# Stage 2: Serve +FROM node:20-alpine + +WORKDIR /app + +COPY --from=builder /app/dist ./dist +COPY server.js . + +EXPOSE 7860 + +CMD ["node", "server.js"] diff --git a/README.md b/README.md index e4f5b3878c6e57d79dd040e01ba96b673e5a9439..dc8ce75910ddde2f993892ac5b0c131553c5ea7c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,18 @@ --- -title: Demo Frontend Voice Agent -emoji: 🏆 -colorFrom: gray -colorTo: green +title: E2E Frontend Data Eyond +emoji: 🐠 +colorFrom: green +colorTo: purple sdk: docker pinned: false +short_description: E2E Frontend Web App for Data Eyond MVP --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference + + +## Running the code + +Run `npm i` to install the dependencies. + +Run `npm run dev` to start the development server. \ No newline at end of file diff --git a/default_shadcn_theme.css b/default_shadcn_theme.css new file mode 100644 index 0000000000000000000000000000000000000000..39e1b443c6925cc896d8cf47a9d50bc2d882ec82 --- /dev/null +++ b/default_shadcn_theme.css @@ -0,0 +1,120 @@ +/* KEEP_IN_SYNC(fullscreen/resources/figmake/shadcn/globals.css) */ + +:root { + --font-size: 16px; + --background: #ffffff; + --foreground: oklch(0.145 0 0); + --card: #ffffff; + --card-foreground: oklch(0.145 0 0); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.145 0 0); + --primary: #030213; + --primary-foreground: oklch(1 0 0); + --secondary: oklch(0.95 0.0058 264.53); + --secondary-foreground: #030213; + --muted: #ececf0; + --muted-foreground: #717182; + --accent: #e9ebef; + --accent-foreground: #030213; + --destructive: #d4183d; + --destructive-foreground: #ffffff; + --border: rgba(0, 0, 0, 0.1); + --input: transparent; + --input-background: #f3f3f5; + --switch-background: #cbced4; + --font-weight-medium: 500; + --font-weight-normal: 400; + --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); + --radius: 0.625rem; + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: #030213; + --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); +} + +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.145 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.145 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.985 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.396 0.141 25.723); + --destructive-foreground: oklch(0.637 0.237 25.331); + --border: oklch(0.269 0 0); + --input: oklch(0.269 0 0); + --ring: oklch(0.439 0 0); + --font-weight-medium: 500; + --font-weight-normal: 400; + --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(0.269 0 0); + --sidebar-ring: oklch(0.439 0 0); +} + +@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-input-background: var(--input-background); + --color-switch-background: var(--switch-background); + --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); +} diff --git a/guidelines/Guidelines.md b/guidelines/Guidelines.md new file mode 100644 index 0000000000000000000000000000000000000000..110f1178839508ea2207abba3a8dd2a794ed36db --- /dev/null +++ b/guidelines/Guidelines.md @@ -0,0 +1,61 @@ +**Add your own guidelines here** + diff --git a/index.html b/index.html new file mode 100644 index 0000000000000000000000000000000000000000..8887d2b0fa2e9f13ae7cd1742b4a3964d77eab4b --- /dev/null +++ b/index.html @@ -0,0 +1,16 @@ + + + +
+ + + ++ {uploadError} +
+ )} + + {/* Connect DB row */} + + + {/* Database connections list */} + {dbClients.length > 0 && ( +{client.name}
+{client.db_type} · {client.status}
+{docsError}
+ ) : documents.length === 0 ? ( +No documents yet
+Upload files to get started
++ {doc.filename} +
++ {formatFileSize(doc.file_size)} · {formatDate(doc.created_at)} +
++ Choose a database to connect to your knowledge base. +
+ {loadingDbTypes ? ( ++ {view === "main" + ? `Supported formats: ${supportedFormatsText}` + : view === "db-select" + ? "More integrations coming soon" + : "Credentials are encrypted at rest"} +
+Sign in to continue to your chatbot
+{children}
+ ), + h1: ({ children }) => ( +
+ {children}
+
+ );
+ }
+ return (
+
+ {children}
+
+ );
+ },
+ pre: ({ children }) => (
+
+ {children}
+
+ ),
+ blockquote: ({ children }) => (
+ + {children} ++ ), + table: ({ children }) => ( +
+ {roomsError} +
+ ) : ( + chats.map((chat) => ( ++ Send a message to begin chatting +
++ {message.content} +
+ ) : message.content === "" && streamingMsgId === message.id ? ( + // Waiting for first chunk — show typing indicator ++ Sources: +
++ Create a new chat to get started +
+