@retrivora-ai/rag-engine 1.9.6 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +130 -113
  2. package/dist/{ILLMProvider-DNhyOYoK.d.mts → ILLMProvider-B8ROITYK.d.mts} +59 -8
  3. package/dist/{ILLMProvider-DNhyOYoK.d.ts → ILLMProvider-B8ROITYK.d.ts} +59 -8
  4. package/dist/handlers/index.d.mts +2 -2
  5. package/dist/handlers/index.d.ts +2 -2
  6. package/dist/handlers/index.js +2376 -489
  7. package/dist/handlers/index.mjs +2372 -489
  8. package/dist/{index-CjQdL0cX.d.ts → index-B8PbEFSY.d.mts} +17 -3
  9. package/dist/{index-CHL1jdYm.d.mts → index-BCPKUAVL.d.ts} +33 -41
  10. package/dist/{index-Hgbwl9X4.d.ts → index-CrxCy36A.d.mts} +33 -41
  11. package/dist/{index-C9v7-tWd.d.mts → index-DNvoi-sV.d.ts} +17 -3
  12. package/dist/index.css +695 -203
  13. package/dist/index.d.mts +37 -7
  14. package/dist/index.d.ts +37 -7
  15. package/dist/index.js +1197 -286
  16. package/dist/index.mjs +1221 -297
  17. package/dist/server.d.mts +62 -6
  18. package/dist/server.d.ts +62 -6
  19. package/dist/server.js +2526 -574
  20. package/dist/server.mjs +2517 -573
  21. package/package.json +12 -10
  22. package/src/app/constants.tsx +207 -212
  23. package/src/app/layout.tsx +4 -28
  24. package/src/app/types.ts +17 -17
  25. package/src/components/AmbientBackground.tsx +10 -10
  26. package/src/components/ArchitectureCard.tsx +43 -7
  27. package/src/components/ArchitectureCardsSection.tsx +37 -4
  28. package/src/components/ChatWidget.tsx +4 -1
  29. package/src/components/ChatWindow.tsx +9 -2
  30. package/src/components/CodeViewer.tsx +19 -14
  31. package/src/components/DocViewer.tsx +75 -15
  32. package/src/components/Documentation.tsx +111 -28
  33. package/src/components/Hero.tsx +103 -20
  34. package/src/components/Lifecycle.tsx +65 -25
  35. package/src/components/MarkdownComponents.tsx +44 -1
  36. package/src/components/MessageBubble.tsx +162 -50
  37. package/src/components/constants.tsx +279 -0
  38. package/src/config/RagConfig.ts +56 -10
  39. package/src/config/constants.ts +5 -0
  40. package/src/config/serverConfig.ts +15 -0
  41. package/src/core/ConfigResolver.ts +30 -25
  42. package/src/core/DatabaseStorage.ts +469 -0
  43. package/src/core/LicenseVerifier.ts +154 -0
  44. package/src/core/MultiAgentCoordinator.ts +239 -0
  45. package/src/core/Pipeline.ts +148 -16
  46. package/src/core/ProviderRegistry.ts +5 -5
  47. package/src/core/Retrivora.ts +52 -6
  48. package/src/core/VectorPlugin.ts +74 -11
  49. package/src/core/mcp.ts +261 -0
  50. package/src/exceptions/index.ts +52 -0
  51. package/src/handlers/index.ts +504 -47
  52. package/src/hooks/useRagChat.ts +100 -43
  53. package/src/hooks/useStoredMessages.ts +15 -4
  54. package/src/index.ts +7 -0
  55. package/src/llm/LLMFactory.ts +15 -6
  56. package/src/llm/providers/GroqProvider.ts +176 -0
  57. package/src/llm/providers/QwenProvider.ts +191 -0
  58. package/src/server.ts +23 -13
  59. package/src/types/chat.ts +16 -0
  60. package/src/types/props.ts +50 -1
  61. package/.env.example +0 -80
  62. package/LICENSE.txt +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retrivora-ai/rag-engine",
3
- "version": "1.9.6",
3
+ "version": "1.9.8",
4
4
  "description": "Retrivora AI is a plug-and-play AI engine for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.",
5
5
  "author": "Abhinav Alkuchi",
6
6
  "license": "MIT",
@@ -72,16 +72,21 @@
72
72
  "README.md"
73
73
  ],
74
74
  "scripts": {
75
- "dev": "next dev",
76
- "build": "next build",
77
- "build:pkg": "tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --dts --clean --no-splitting --tsconfig tsconfig.build.json --external react,react-dom,next,mongodb,pg,openai,@anthropic-ai/sdk,@pinecone-database/pinecone,axios,lucide-react,mammoth,pdf-parse,react-markdown,remark-gfm,next-themes,langchain,@langchain/core,@langchain/openai,llamaindex,./index.css && npx @tailwindcss/cli -i src/tailwind.css -o dist/index.css",
78
- "start": "next start",
75
+ "dev": "npx @tailwindcss/cli -i src/tailwind.css -o src/index.css && tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --watch --tsconfig tsconfig.build.json --external react,react-dom,next,mongodb,pg,openai,@anthropic-ai/sdk,@pinecone-database/pinecone,axios,lucide-react,mammoth,pdf-parse,react-markdown,remark-gfm,next-themes,langchain,@langchain/core,@langchain/openai,llamaindex --inject-style",
76
+ "build": "npm run build:pkg",
77
+ "build:pkg": "npx @tailwindcss/cli -i src/tailwind.css -o src/index.css && tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --dts --clean --no-splitting --tsconfig tsconfig.build.json --external react,react-dom,next,mongodb,pg,openai,@anthropic-ai/sdk,@pinecone-database/pinecone,axios,lucide-react,mammoth,pdf-parse,react-markdown,remark-gfm,next-themes,langchain,@langchain/core,@langchain/openai,llamaindex --inject-style && npx @tailwindcss/cli -i src/tailwind.css -o dist/index.css && rm src/index.css",
79
78
  "lint": "eslint",
80
- "prepublishOnly": "npm run build:pkg"
79
+ "clean": "rm -rf dist"
81
80
  },
82
81
  "peerDependencies": {
83
82
  "react": ">=18.0.0",
84
- "react-dom": ">=18.0.0"
83
+ "react-dom": ">=18.0.0",
84
+ "next": ">=15.0.0"
85
+ },
86
+ "peerDependenciesMeta": {
87
+ "next": {
88
+ "optional": true
89
+ }
85
90
  },
86
91
  "dependencies": {
87
92
  "@anthropic-ai/sdk": "^0.95.1",
@@ -91,12 +96,9 @@
91
96
  "@types/papaparse": "^5.5.2",
92
97
  "axios": "^1.15.0",
93
98
  "lucide-react": "^1.8.0",
94
- "next": "^16.2.6",
95
99
  "next-themes": "^0.4.6",
96
100
  "openai": "^6.34.0",
97
101
  "papaparse": "^5.5.3",
98
- "react": ">=18.0.0",
99
- "react-dom": ">=18.0.0",
100
102
  "react-is": "^18.3.1",
101
103
  "react-markdown": "^10.1.0",
102
104
  "recharts": "^3.8.1",
@@ -1,217 +1,207 @@
1
1
  import React from 'react';
2
2
  import {
3
- Zap,
4
- Database,
5
- Layers,
6
- Search,
7
- Box,
8
- Package,
9
- Activity,
10
- Hexagon,
11
- Sparkles,
12
- Bot,
13
- Brain,
14
- Rabbit,
15
- Code,
16
- Terminal,
17
- FileText,
18
- Puzzle,
19
- MessageSquare,
3
+ Zap,
4
+ Database,
5
+ Layers,
6
+ Search,
7
+ Box,
8
+ Package,
9
+ Activity,
10
+ Hexagon,
11
+ Sparkles,
12
+ Bot,
13
+ Brain,
14
+ Rabbit,
15
+ Code,
16
+ Terminal,
17
+ FileText,
18
+ Puzzle,
19
+ MessageSquare,
20
+ Cpu,
21
+ Cloud,
20
22
  } from 'lucide-react';
21
23
  import { ArchitectureCardProps, Snippet, PipelineStep, ProviderPill } from './types';
22
24
 
23
25
  export const LANDING_PAGE_CONTENT = {
24
- hero: {
25
- badge: 'Dynamic & Universal Retrivora AI',
26
- title: 'The Universal Bridge for Generative AI',
27
- subtitle: 'Retrivora AI is a vendor-agnostic RAG engine that connects any Document to any LLM and Vector Database in minutes.',
28
- },
29
- lifecycle: {
30
- title: 'The RAG Lifecycle',
31
- },
32
- guide: {
33
- title: 'Interactive Guide',
34
- subtitle: 'Universal RAG integration for your Next.js applications in minutes.',
35
- }
26
+ hero: {
27
+ badge: 'Dynamic & Universal Retrivora AI',
28
+ title: 'The Universal Bridge for Generative AI',
29
+ subtitle: 'Retrivora AI is a vendor-agnostic RAG engine that connects any Document to any LLM and Vector Database in minutes.',
30
+ },
31
+ lifecycle: {
32
+ title: 'The RAG Lifecycle',
33
+ },
34
+ guide: {
35
+ title: 'Interactive Guide',
36
+ subtitle: 'Universal RAG integration for your Next.js applications in minutes.',
37
+ }
36
38
  };
37
39
 
38
40
  export const VECTOR_DATABASES: ProviderPill[] = [
39
- { Icon: Zap, label: 'Pinecone' },
40
- { Icon: Database, label: 'PostgreSQL' },
41
- { Icon: Layers, label: 'MongoDB' },
42
- { Icon: Box, label: 'Qdrant' },
43
- { Icon: Search, label: 'Milvus' },
44
- { Icon: Package, label: 'ChromaDB' },
45
- { Icon: Activity, label: 'Redis' },
46
- { Icon: Hexagon, label: 'Weaviate' },
41
+ { Icon: Zap, label: 'Pinecone' },
42
+ { Icon: Database, label: 'PostgreSQL' },
43
+ { Icon: Layers, label: 'MongoDB' },
44
+ { Icon: Box, label: 'Qdrant' },
45
+ { Icon: Search, label: 'Milvus' },
46
+ { Icon: Package, label: 'ChromaDB' },
47
+ { Icon: Activity, label: 'Redis' },
48
+ { Icon: Hexagon, label: 'Weaviate' },
47
49
  ];
48
50
 
49
51
  export const AI_MODELS: ProviderPill[] = [
50
- { Icon: Rabbit, label: 'Ollama' },
51
- { Icon: Sparkles, label: 'OpenAI' },
52
- { Icon: Bot, label: 'Anthropic' },
53
- { Icon: Brain, label: 'Gemini' },
54
- { Icon: Code, label: 'Copilot' },
55
- { Icon: Terminal, label: 'LiteLLM' },
52
+ { Icon: Rabbit, label: 'Ollama' },
53
+ { Icon: Sparkles, label: 'OpenAI' },
54
+ { Icon: Bot, label: 'Anthropic' },
55
+ { Icon: Brain, label: 'Gemini' },
56
+ { Icon: Cpu, label: 'Groq' },
57
+ { Icon: Cloud, label: 'Qwen' },
58
+ { Icon: Code, label: 'Copilot' },
59
+ { Icon: Terminal, label: 'LiteLLM' },
56
60
  ];
57
61
 
58
62
  export const PIPELINE_STEPS: PipelineStep[] = [
59
- {
60
- step: '01',
61
- Icon: FileText,
62
- title: 'Ingest',
63
- desc: 'Universal support for PDF, DOCX, CSV, and JSON. Documents are parsed, chunked, and embedded.',
64
- colors: { from: '#10b981', to: '#14b8a6' },
65
- },
66
- {
67
- step: '02',
68
- Icon: Search,
69
- title: 'Retrieve',
70
- desc: 'Queries are converted to vectors. Semantic search finds context across any configured Vector DB.',
71
- colors: { from: '#14b8a6', to: '#06b6d4' },
72
- },
73
- {
74
- step: '03',
75
- Icon: Puzzle,
76
- title: 'Augment',
77
- desc: 'Retrieved context is injected into the LLM prompt with namespaced project isolation.',
78
- colors: { from: '#06b6d4', to: '#3b82f6' },
79
- },
80
- {
81
- step: '04',
82
- Icon: MessageSquare,
83
- title: 'Generate',
84
- desc: 'Providers like OpenAI, Anthropic, or Gemini produce grounded, source-cited responses.',
85
- colors: { from: '#3b82f6', to: '#6366f1' },
86
- },
63
+ {
64
+ step: '01',
65
+ Icon: FileText,
66
+ title: 'Ingest',
67
+ desc: 'Universal support for PDF, DOCX, CSV, and JSON. Documents are parsed, chunked, and embedded.',
68
+ colors: { from: '#10b981', to: '#14b8a6' },
69
+ },
70
+ {
71
+ step: '02',
72
+ Icon: Search,
73
+ title: 'Retrieve',
74
+ desc: 'Queries are converted to vectors. Semantic search finds context across any configured Vector DB.',
75
+ colors: { from: '#14b8a6', to: '#06b6d4' },
76
+ },
77
+ {
78
+ step: '03',
79
+ Icon: Puzzle,
80
+ title: 'Augment',
81
+ desc: 'Retrieved context is injected into the LLM prompt with namespaced project isolation.',
82
+ colors: { from: '#06b6d4', to: '#3b82f6' },
83
+ },
84
+ {
85
+ step: '04',
86
+ Icon: MessageSquare,
87
+ title: 'Generate',
88
+ desc: 'Providers like OpenAI, Anthropic, or Gemini produce grounded, source-cited responses.',
89
+ colors: { from: '#3b82f6', to: '#6366f1' },
90
+ },
87
91
  ];
88
92
 
89
93
  export const SNIPPETS: Snippet[] = [
90
- {
91
- id: 'pipeline',
92
- title: 'Retrivora SDK',
93
- language: 'typescript',
94
- description: 'Create one server-side SDK instance from config; clients never know which providers are used.',
95
- code: `import { Retrivora } from '@retrivora-ai/rag-engine/server';
94
+ {
95
+ id: 'npm-setup',
96
+ title: 'NPM Setup',
97
+ language: 'typescript',
98
+ description: 'How to install and import the client vs server components correctly in your application.',
99
+ code: `// ─── TERMINAL / BASH ───
100
+ // Run this command to install the package in your project:
101
+ // npm install @retrivora-ai/rag-engine
96
102
 
97
- const ai = new Retrivora({
98
- projectId: 'support-app',
99
- llm: {
100
- provider: 'openai',
101
- model: 'gpt-5',
102
- apiKey: process.env.OPENAI_API_KEY,
103
- },
104
- embedding: {
105
- provider: 'openai',
106
- model: 'text-embedding-3-small',
107
- apiKey: process.env.OPENAI_API_KEY,
108
- },
109
- vectorDatabase: {
110
- provider: 'pinecone',
111
- indexName: 'support-docs',
112
- options: { apiKey: process.env.PINECONE_API_KEY },
113
- },
114
- retrieval: { strategy: 'hybrid', topK: 5 },
115
- workflow: { type: 'agentic-rag' },
116
- });
103
+ // ─── SERVER API ROUTER (src/app/api/retrivora/[[...retrivora]]/route.ts) ───
104
+ // Create a single catch-all file to handle all server endpoints dynamically:
105
+ import { createRagHandler } from '@retrivora-ai/rag-engine/handlers';
106
+
107
+ export const { GET, POST } = createRagHandler();
108
+
109
+ // ─── CLIENT WIDGET (src/app/layout.tsx) ───
110
+ // Import the React widget and config context (styles are auto-injected!):
111
+ import { ConfigProvider, ChatWidget } from '@retrivora-ai/rag-engine';`,
112
+ },
113
+ {
114
+ id: 'pipeline',
115
+ title: 'Pipeline API',
116
+ language: 'typescript',
117
+ description: 'Orchestrate the full RAG flow programmatically with the Pipeline class.',
118
+ code: `import { Pipeline, getRagConfig } from '@retrivora-ai/rag-engine/server';
119
+
120
+ const config = getRagConfig();
121
+ const pipeline = new Pipeline(config);
117
122
 
118
- await ai.ingest([{
123
+ // Ingest documents
124
+ await pipeline.ingest([{
119
125
  docId: 'doc-1',
120
126
  content: 'Retrivora AI simplifies RAG...',
121
127
  metadata: { source: 'docs' }
122
128
  }]);
123
129
 
124
- const { reply, sources } = await ai.ask('How does Retrivora work?');`,
125
- },
126
- {
127
- id: 'handlers',
128
- title: 'Next.js Routes',
129
- language: 'typescript',
130
- description: 'Keep secrets and provider code in App Router handlers, then expose simple API endpoints to React.',
131
- code: `// app/api/chat/route.ts
132
- import { Retrivora, createStreamHandler } from '@retrivora-ai/rag-engine/server';
130
+ // Ask a question
131
+ const { reply, sources } = await pipeline.ask('How does Retrivora work?');`,
132
+ },
133
+ {
134
+ id: 'handlers',
135
+ title: 'Route Handlers',
136
+ language: 'typescript',
137
+ description: 'Mount pre-built API endpoints. Configuration is automatically read from environment variables, or can be passed explicitly.',
138
+ code: `// ─── OPTION A: ZERO CONFIG (Reads from environment variables) ───
139
+ // src/app/api/chat/route.ts
140
+ import { createStreamHandler } from '@retrivora-ai/rag-engine/handlers';
141
+ export const POST = createStreamHandler();
133
142
 
134
- const ai = new Retrivora({
135
- projectId: 'support-app',
136
- llm: { provider: 'openai', model: 'gpt-5', apiKey: process.env.OPENAI_API_KEY },
137
- embedding: { provider: 'openai', model: 'text-embedding-3-small', apiKey: process.env.OPENAI_API_KEY },
138
- vectorDatabase: {
139
- provider: 'pinecone',
140
- indexName: 'support-docs',
141
- options: { apiKey: process.env.PINECONE_API_KEY },
142
- },
143
- });
143
+ // ─── OPTION B: EXPLICIT CONFIGURATION ───
144
+ // src/app/api/chat/route.ts
145
+ import { createStreamHandler } from '@retrivora-ai/rag-engine/handlers';
144
146
 
145
- export const POST = createStreamHandler(ai.config);
146
-
147
- // app/api/upload/route.ts
148
- // export const POST = createUploadHandler(ai.config);`,
147
+ export const POST = createStreamHandler({
148
+ vectorDb: {
149
+ provider: 'pinecone',
150
+ apiKey: process.env.CUSTOM_PINECONE_KEY,
151
+ indexName: 'docs-index',
149
152
  },
150
- {
151
- id: 'ui',
152
- title: 'React Client UI',
153
- language: 'typescript',
154
- description: 'Import browser-safe components in Client Components; API keys stay on the server.',
155
- code: `'use client';
156
-
157
- import { ConfigProvider, ChatWidget } from '@retrivora-ai/rag-engine';
153
+ llm: {
154
+ provider: 'openai',
155
+ apiKey: process.env.CUSTOM_OPENAI_KEY,
156
+ model: 'gpt-4o',
157
+ }
158
+ });`,
159
+ },
160
+ {
161
+ id: 'ui',
162
+ title: 'React Components',
163
+ language: 'typescript',
164
+ description: 'Configure and embed themeable UI widgets using the ConfigProvider context.',
165
+ code: `import { ConfigProvider, ChatWidget } from '@retrivora-ai/rag-engine';
158
166
 
159
167
  export default function Layout({ children }) {
160
168
  return (
161
- <ConfigProvider
162
- config={{
163
- projectId: 'support-app',
164
- ui: {
165
- title: 'AI Assistant',
166
- showSources: true,
167
- allowUpload: true,
168
- },
169
- }}
170
- >
169
+ <ConfigProvider config={{
170
+ projectId: 'my-project-id',
171
+ ui: {
172
+ title: 'Retrivora Assistant',
173
+ welcomeMessage: 'Hi! Ask me anything about our software.',
174
+ primaryColor: '#4f46e5', // Custom primary brand color
175
+ accentColor: '#8b5cf6', // Custom accent gradient color
176
+ borderRadius: 'lg', // 'none' | 'sm' | 'md' | 'lg' | 'xl'
177
+ allowUpload: true, // Toggle custom file uploading
178
+ }
179
+ }}>
171
180
  {children}
172
181
  <ChatWidget position="bottom-right" />
173
182
  </ConfigProvider>
174
183
  );
175
184
  }`,
176
- },
177
- {
178
- id: 'config',
179
- title: 'Headless Hook',
180
- language: 'typescript',
181
- description: 'Build your own chat surface with the same server-backed route.',
182
- code: `'use client';
185
+ },
186
+ {
187
+ id: 'config',
188
+ title: 'Config Builder',
189
+ language: 'typescript',
190
+ description: 'Fluent, type-safe configuration builder for granular control over providers.',
191
+ code: `import { ConfigBuilder } from '@retrivora-ai/rag-engine/server';
183
192
 
184
- import React from 'react';
185
- import { useRagChat } from '@retrivora-ai/rag-engine';
186
-
187
- export function AskBox() {
188
- const [input, setInput] = React.useState('');
189
- const { messages, send, isLoading } = useRagChat('support-app', {
190
- apiUrl: '/api/chat',
191
- });
192
-
193
- return (
194
- <form onSubmit={(event) => {
195
- event.preventDefault();
196
- send(input);
197
- setInput('');
198
- }}>
199
- <input value={input} onChange={(event) => setInput(event.target.value)} />
200
- <button disabled={isLoading}>Ask</button>
201
-
202
- {messages.map((message) => (
203
- <p key={message.id}>{message.content}</p>
204
- ))}
205
- </form>
206
- );
207
- }`,
208
- },
209
- {
210
- id: 'env',
211
- title: 'Environment',
212
- language: 'bash',
213
- description: 'The exact environment variable structure required for auto-configuration.',
214
- code: `# Project Identity
193
+ const config = new ConfigBuilder()
194
+ .vectorDb('pinecone', { apiKey: '...', indexName: 'docs' })
195
+ .llm('ollama', 'llama3.2')
196
+ .embedding('ollama', 'nomic-embed-text')
197
+ .build();`,
198
+ },
199
+ {
200
+ id: 'env',
201
+ title: 'Environment',
202
+ language: 'bash',
203
+ description: 'The exact environment variable structure required for auto-configuration.',
204
+ code: `# Project Identity
215
205
  RAG_PROJECT_ID=my-project
216
206
 
217
207
  # Vector DB
@@ -223,53 +213,58 @@ VECTOR_DB_INDEX=products
223
213
  LLM_PROVIDER=openai
224
214
  LLM_MODEL=gpt-4o
225
215
  OPENAI_API_KEY=sk-...`,
226
- },
216
+ },
227
217
  ];
228
218
 
229
219
  export const ARCHITECTURE_CARDS: ArchitectureCardProps[] = [
230
- {
231
- icon: <Database className="text-indigo-600" />,
232
- title: 'Vector Store',
233
- description: 'Universal support for Pinecone, PGVector, MongoDB, Milvus, Qdrant, and more.',
234
- badge: 'Vector DB',
235
- badgeColor: 'bg-indigo-50 dark:bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 border-indigo-200 dark:border-indigo-500/20',
236
- },
237
- {
238
- icon: <Zap className="text-amber-500" />,
239
- title: 'Embeddings',
240
- description: 'Seamlessly switch between OpenAI, Ollama, or custom embedding providers.',
241
- badge: 'Models',
242
- badgeColor: 'bg-amber-50 dark:bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-200 dark:border-amber-500/20',
243
- },
244
- {
245
- icon: <Bot className="text-emerald-500" />,
246
- title: 'LLM Orchestration',
247
- description: 'Optimized inference across OpenAI, Anthropic, Gemini, and local LLMs.',
248
- badge: 'Inference',
249
- badgeColor: 'bg-emerald-50 dark:bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-200 dark:border-emerald-500/20',
250
- },
220
+ {
221
+ icon: <Database className="text-indigo-600" />,
222
+ title: 'Vector Store',
223
+ description: 'Universal support for Pinecone, PGVector, MongoDB, Milvus, Qdrant, and more.',
224
+ badge: 'Vector DB',
225
+ badgeColor: 'bg-indigo-50 dark:bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 border-indigo-200 dark:border-indigo-500/20',
226
+ },
227
+ {
228
+ icon: <Zap className="text-amber-500" />,
229
+ title: 'Embeddings',
230
+ description: 'Seamlessly switch between OpenAI, Ollama, or custom embedding providers.',
231
+ badge: 'Models',
232
+ badgeColor: 'bg-amber-50 dark:bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-200 dark:border-amber-500/20',
233
+ },
234
+ {
235
+ icon: <Bot className="text-emerald-500" />,
236
+ title: 'LLM Orchestration',
237
+ description: 'Optimized inference across OpenAI, Anthropic, Gemini, and local LLMs.',
238
+ badge: 'Inference',
239
+ badgeColor: 'bg-emerald-50 dark:bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-200 dark:border-emerald-500/20',
240
+ },
251
241
  ];
252
242
 
253
243
  export const QUICK_START_STEPS = [
254
- 'Install @retrivora-ai/rag-engine',
255
- 'Configure your .env.local',
256
- 'Mount the API handlers',
257
- 'Drop the ChatWidget'
244
+ { id: 'npm-setup', text: 'Install Package & CSS' },
245
+ { id: 'env', text: 'Configure .env.local' },
246
+ { id: 'handlers', text: 'Mount API Handlers' },
247
+ { id: 'ui', text: 'Drop ChatWidget UI' },
248
+ ];
249
+
250
+ export const ADVANCED_STEPS = [
251
+ { id: 'pipeline', text: 'Programmatic SDK' },
252
+ { id: 'config', text: 'Fluent Config Builder' },
258
253
  ];
259
254
 
260
255
  export const API_ENDPOINTS = ['chat', 'health', 'ingest', 'upload'];
261
256
 
262
257
  export const CHAT_SUGGESTIONS = [
263
- 'What can you help me with?',
264
- 'Summarise the key topics',
265
- 'Show me an example'
258
+ 'What can you help me with?',
259
+ 'Summarise the key topics',
260
+ 'Show me an example'
266
261
  ];
267
262
 
268
263
  export const BORDER_RADIUS_MAP: Record<string, string> = {
269
- none: 'rounded-none',
270
- sm: 'rounded-sm',
271
- md: 'rounded-md',
272
- lg: 'rounded-lg',
273
- xl: 'rounded-xl',
274
- full: 'rounded-3xl',
264
+ none: 'rounded-none',
265
+ sm: 'rounded-sm',
266
+ md: 'rounded-md',
267
+ lg: 'rounded-lg',
268
+ xl: 'rounded-xl',
269
+ full: 'rounded-3xl',
275
270
  };
@@ -1,44 +1,20 @@
1
1
  import type { Metadata } from 'next';
2
2
  import { Inter } from 'next/font/google';
3
3
  import './globals.css';
4
- import { ConfigProvider } from '@/components/ConfigProvider';
5
- import { ThemeProvider } from '@/components/ThemeProvider';
6
- import { getRagConfig } from '@/config/serverConfig';
7
4
 
8
5
  const inter = Inter({ subsets: ['latin'], variable: '--font-inter' });
9
6
 
10
- // Build server-side config once — same singleton source as route handlers.
11
- const ragConfig = getRagConfig();
12
-
13
7
  export const metadata: Metadata = {
14
- title: ragConfig.ui?.title ?? 'Retrivora AI',
8
+ title: 'Retrivora AI — Plug-and-Play RAG Engine',
15
9
  description:
16
- ragConfig.ui?.subtitle ??
17
- 'A configurable Retrieval-Augmented Generation chatbot — generic across any vector database and LLM provider.',
10
+ 'Retrivora AI is the easiest way to add a production-grade RAG chatbot to any React or Next.js application. Plug in your LLM, your vector database, and ship.',
18
11
  };
19
12
 
20
13
  export default function RootLayout({ children }: { children: React.ReactNode }) {
21
14
  return (
22
15
  <html lang="en" className={inter.variable} suppressHydrationWarning>
23
- <body className="bg-slate-50 text-slate-900 antialiased transition-colors duration-300" suppressHydrationWarning>
24
- <ThemeProvider attribute="class" defaultTheme="light" disableTransitionOnChange>
25
- <ConfigProvider
26
- config={{
27
- projectId: ragConfig.projectId,
28
- ui: ragConfig.ui,
29
- // Pass embedding model/dimensions so client-side components
30
- // (e.g. DocumentUpload) know the vector dimensions in use.
31
- embedding: ragConfig.embedding
32
- ? {
33
- model: ragConfig.embedding.model,
34
- dimensions: ragConfig.embedding.dimensions,
35
- }
36
- : undefined,
37
- }}
38
- >
39
- {children}
40
- </ConfigProvider>
41
- </ThemeProvider>
16
+ <body className="bg-slate-50 text-slate-900 antialiased" suppressHydrationWarning>
17
+ {children}
42
18
  </body>
43
19
  </html>
44
20
  );
package/src/app/types.ts CHANGED
@@ -1,30 +1,30 @@
1
1
  import React from 'react';
2
2
 
3
3
  export interface ArchitectureCardProps {
4
- icon: React.ReactNode;
5
- title: string;
6
- description: string;
7
- badge: string;
8
- badgeColor: string;
4
+ icon: React.ReactNode;
5
+ title: string;
6
+ description: string;
7
+ badge: string;
8
+ badgeColor: string;
9
9
  }
10
10
 
11
11
  export interface Snippet {
12
- id: string;
13
- title: string;
14
- description: string;
15
- code: string;
16
- language: string;
12
+ id: string;
13
+ title: string;
14
+ description: string;
15
+ code: string;
16
+ language: string;
17
17
  }
18
18
 
19
19
  export interface PipelineStep {
20
- step: string;
21
- Icon: React.ElementType;
22
- title: string;
23
- desc: string;
24
- colors: { from: string; to: string };
20
+ step: string;
21
+ Icon: React.ElementType;
22
+ title: string;
23
+ desc: string;
24
+ colors: { from: string; to: string };
25
25
  }
26
26
 
27
27
  export interface ProviderPill {
28
- Icon: React.ElementType;
29
- label: string;
28
+ Icon: React.ElementType;
29
+ label: string;
30
30
  }