A modern, intelligent chat application with Retrieval-Augmented Generation (RAG) capabilities, built with React, TypeScript, and Supabase. Dumbo allows users to have contextual conversations with AI while leveraging uploaded documents and web content for enhanced responses.
- Contextual Conversations: Organize chats by context for better focus and continuity
- RAG-Powered Responses: Upload documents (PDF, TXT) and get AI responses based on your content
- Real-time Streaming: Experience smooth, real-time AI responses with streaming
- Multi-Modal Support: Support for both file uploads and web content processing
- Responsive Design: Works seamlessly across desktop and mobile devices
- Vector Search: Intelligent similarity search using OpenAI embeddings
- Document Processing: Automatic text extraction and chunking from PDFs and text files
- Context Management: Create, organize, and manage multiple conversation contexts
- Dark/Light Theme: Beautiful UI with theme switching support
- Browser Extension: Chrome extension for seamless web content integration
- Row Level Security (RLS): Secure data isolation using Supabase RLS
- Real-time Authentication: Secure user authentication with session management
- Optimized Embeddings: Efficient vector storage and retrieval
- Progressive Loading: Smart pagination for chat history
- Node.js 18+ and npm
- Supabase account
- OpenAI API key
-
Clone the repository
git clone <repository-url> cd dumbo
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Fill in your environment variables:
VITE_SUPABASE_URL=your_supabase_url_here VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here VITE_OPENAI_API_KEY=your_openai_api_key_here
-
Set up Supabase database
- Create a new Supabase project
- Run the migrations in the
supabase/migrationsfolder - Enable the
vectorextension in your Supabase database
-
Start the development server
npm run dev
-
Access the application
- Web app:
http://localhost:5173 - Extension development: Load the
distfolder as an unpacked extension in Chrome
- Web app:
If you have the dist.zip file, follow these detailed steps to install the Chrome extension:
- Locate the
dist.zipfile in your project directory - Right-click on
dist.zipand select "Extract All..." (Windows) or "Open With > Archive Utility" (Mac) - Choose a location to extract the files (e.g., your Desktop or Documents folder)
- Remember the path to the extracted
distfolder - you'll need it in the next steps
- Open Google Chrome on your computer
- Navigate to the Extensions page by typing
chrome://extensions/in the address bar and pressing Enter- Alternatively, click the three dots menu (โฎ) โ More tools โ Extensions
- Enable Developer mode by clicking the toggle switch in the top-right corner of the Extensions page
- The toggle should turn blue when enabled
- You'll see new buttons appear: "Load unpacked", "Pack extension", and "Update"
- Click the "Load unpacked" button that appeared after enabling Developer mode
- Navigate to the extracted
distfolder using the file browser that opens - Select the
distfolder (not the files inside it, but the folder itself) - Click "Select Folder" (Windows) or "Open" (Mac)
- Check the Extensions page - you should see "Extendo Dumbo" listed with a toggle switch
- Ensure the extension is enabled - the toggle should be blue/on
- Look for the extension icon in your Chrome toolbar (it may be hidden in the extensions menu)
- Click the puzzle piece icon (๐งฉ) in the Chrome toolbar to open the extensions menu
- Find "Extendo Dumbo" in the list
- Click the pin icon (๐) next to it to pin it to your toolbar for easy access
- Click the Extendo Dumbo icon in your toolbar to open the side panel
- Try the keyboard shortcuts:
- Ctrl+K (or Cmd+K on Mac): Toggle the side panel
- Ctrl+J (or Cmd+J on Mac): Save the current page to a context
- Sign in with your account credentials
- Create a context and start chatting with your AI assistant
If you want to build the extension yourself:
-
Build the extension
npm run build
-
Follow steps 2-6 from Option 1 using the newly created
distfolder
"This extension may have been corrupted" error:
- Make sure you selected the
distfolder, not individual files - Try extracting the zip file again to a different location
- Ensure all files were extracted properly
Extension doesn't appear in the toolbar:
- Check if it's hidden in the extensions menu (puzzle piece icon)
- Make sure the extension is enabled on the Extensions page
- Try refreshing the Extensions page and reloading the extension
Keyboard shortcuts don't work:
- Check if other extensions are using the same shortcuts
- Go to
chrome://extensions/shortcutsto view and modify keyboard shortcuts - Make sure you're on a regular webpage (shortcuts don't work on Chrome's internal pages)
Side panel doesn't open:
- Make sure you're using Chrome version 114 or later (side panel feature requirement)
- Try clicking the extension icon directly instead of using keyboard shortcuts
- Check the browser console for any error messages
Authentication issues:
- Ensure your
.envfile has the correct Supabase credentials - Check that the Supabase project is properly configured
- Verify that the extension has internet access
If you encounter issues:
- Check the browser console (F12 โ Console tab) for error messages
- Visit the Extensions page (
chrome://extensions/) and look for error messages - Try disabling and re-enabling the extension
- Reload the extension by clicking the refresh icon on the Extensions page
- Frontend: React 19, TypeScript, Tailwind CSS
- Backend: Supabase (PostgreSQL with vector extensions)
- AI/ML: OpenAI GPT models and embeddings
- Build Tool: Vite
- Extension: Chrome Extension Manifest V3
The application uses a well-structured database schema with the following main tables:
contexts: Conversation contexts/workspacesmessages: Chat messages with role-based organizationfiles: Uploaded documents with processing statussites: Web content referenceschunks: Text chunks with vector embeddings for RAGapi_keys: Encrypted user API keys
src/
โโโ components/ # Reusable UI components
โ โโโ auth/ # Authentication components
โ โโโ chat/ # Chat interface components
โ โโโ layout/ # Layout components
โ โโโ ui/ # Base UI components
โโโ contexts/ # React contexts for state management
โโโ services/ # Business logic and API services
โโโ types/ # TypeScript type definitions
โโโ extension/ # Chrome extension specific code
โโโ lib/ # Utility libraries and configurations
# Development
npm run dev # Start web app development server
# Building
npm run build # Build web app for production
# Code Quality
npm run lint # Run ESLint
npm run preview # Preview production buildThe project includes a Chrome extension that allows users to:
- Save web pages to contexts
- Access chat functionality from any webpage
- Process current page content with AI
To develop the extension:
- Run
npm run build - Load the
distfolder as an unpacked extension in Chrome - Use keyboard shortcuts:
Ctrl+K(orCmd+K): Toggle side panelCtrl+J(orCmd+J): Save current page
The application supports multiple build modes:
- Web App: Standard React application
- Extension: Chrome extension with side panel
- Secure user authentication via Supabase Auth
- Session management with automatic token refresh
- Chrome storage integration for extension persistence
- Row Level Security (RLS) policies ensure data isolation
- Encrypted API key storage
- Secure file upload with validation
- CORS protection and input sanitization
- User data is isolated per account
- Files are stored securely in Supabase Storage
- No data sharing between users
- Optional local storage for extension functionality
-
Document Processing
- Upload PDF or TXT files
- Automatic text extraction and cleaning
- Intelligent text chunking with overlap
-
Embedding Generation
- Generate vector embeddings using OpenAI's
text-embedding-3-large - Store embeddings in Supabase with vector similarity search
- Generate vector embeddings using OpenAI's
-
Retrieval & Generation
- Query embeddings for relevant context
- Cosine similarity search with configurable thresholds
- Inject relevant context into AI prompts
- Generate contextually-aware responses
- PDF: Automatic text extraction using PDF.js
- TXT: Direct text processing
- Web Content: Browser extension content extraction
The web application is deployed and available at: https://inquisitive-queijadas-10c7ab.netlify.app
This project is licensed under the MIT License - see the LICENSE file for details.