Rabbit is an intelligent knowledge exploration application that helps you discover, organize, and visualize information through an interactive knowledge graph. Built with Next.js, Electron, and powered by Google Gemini AI, Rabbit transforms web browsing into a structured learning experience.
Rabbit combines web search, AI-powered concept extraction, and interactive visualization to create a "den" of knowledge around any topic. As you explore the web, Rabbit automatically extracts concepts, identifies relationships, and builds a visual knowledge graph that grows with your research.
This is a monorepo containing three main components:
- Frontend (
frontend/): Next.js 15 application with React 19, providing the search interface and knowledge graph visualization - Backend (
backend/): Express.js API server handling search, AI processing, and knowledge graph management - Browser (
browser/): Electron application providing a custom browser experience with keyboard shortcuts and seamless integration
- Intelligent Search: Search the web and automatically extract key concepts from results
- Knowledge Graph: Visualize relationships between concepts in an interactive graph
- Concept Extraction: AI-powered extraction of key concepts from web pages
- Den Management: Organize information into hierarchical "den" structures (bigDaddyNode and babyNode)
- Hop Sessions: Navigate through search results with keyboard shortcuts
- Burrow Sessions: Deep dive into specific concepts with dedicated navigation sessions
- Page Proxy: Browse web pages through a proxy that integrates with the knowledge graph
- Alt+G: Toggle between graph view and browser
- Alt+W: Reset and return to home
- Ctrl+D: Send current page to the knowledge den
- Ctrl+Left/Right: Navigate through hop/burrow sessions
- Alt+B: Go back to home from graph view
- Node.js 18+ and npm 11.4.1+
- Google Gemini API key (for AI features)
- Either:
- Google Custom Search API key + Custom Search Engine ID, OR
- Serper API key (for web search)
- Clone the repository:
git clone <repository-url>
cd hackrice25- Install dependencies:
npm install- Create a
.envfile in the root directory:
# Required: Google Gemini API Key for AI features
GEMINI_API_KEY=your_gemini_api_key_here
# Required: Choose one search provider
# Option 1: Google Custom Search
GOOGLE_API_KEY=your_google_api_key_here
GOOGLE_CSE_ID=your_custom_search_engine_id_here
# Option 2: Serper API
SERPER_API_KEY=your_serper_api_key_here
# Optional: Backend port (defaults to 4000)
PORT=4000Run all services in development mode:
npm run devThis starts:
- Frontend on
http://localhost:3000 - Backend on
http://localhost:4000 - Electron browser application
Backend only:
cd backend
npm run devFrontend only:
cd frontend
npm run devBrowser only:
cd browser
npm startBuild all packages:
npm run buildBuild and package Electron app:
npm run package
npm run makehackrice25/
βββ backend/ # Express.js API server
β βββ src/
β β βββ index.ts # Main server entry point
β β βββ services/ # Business logic services
β β β βββ search.ts # Web search functionality
β β β βββ get_concepts.ts # Concept extraction
β β β βββ get_answer.ts # Answer generation
β β β βββ burrow.ts # Burrow session management
β β β βββ hop.ts # Hop session management
β β β βββ graph_generator.ts # Knowledge graph generation
β β β βββ send_toDen.ts # Add pages to den
β β βββ types/
β β βββ den.ts # TypeScript type definitions
β βββ package.json
β
βββ frontend/ # Next.js application
β βββ src/
β β βββ app/ # Next.js app router pages
β β β βββ page.tsx # Home/search page
β β β βββ graph/ # Graph visualization page
β β β βββ search/ # Search results page
β β βββ components/ # React components
β β β βββ KnowledgeGraph.tsx # Main graph component
β β β βββ search_bar.tsx # Search interface
β β β βββ ...
β β βββ store.ts # Zustand state management
β βββ package.json
β
βββ browser/ # Electron application
β βββ index.js # Main Electron process
β βββ index.html # Browser window HTML
β βββ renderer.js # Renderer process script
β βββ package.json
β
βββ package.json # Root package.json (monorepo config)
βββ turbo.json # Turbo build configuration
GET /search?query=<query>- Perform web search and create central nodeGET /central-node-state- Get current central node statePOST /update-central-node- Update the central nodePOST /clear-memory- Clear all memory and reset state
POST /hop- Create a new hop sessionGET /hop/:sessionId- Get hop session statePOST /hop/:sessionId/navigate- Navigate (next/prev) in hop sessionGET /hop/:sessionId/current- Get current page in hop sessionGET /hop/:sessionId/pages- Get all pages in hop sessionDELETE /hop/:sessionId- Delete hop session
POST /burrow-into-child- Initiate burrow into a child nodeGET /burrow/:childNodeId- Get burrow session statePOST /burrow/:childNodeId/navigate- Navigate in burrow sessionPOST /burrow/:childNodeId/add-page- Add page to burrowed nodeGET /burrow/:childNodeId/current- Get current pageGET /burrow/:childNodeId/pages- Get all pagesDELETE /burrow/:childNodeId- Delete burrow session
GET /generate-graph- Generate full knowledge graphGET /generate-graph-preview?maxDepth=<depth>- Generate preview graph
POST /send-to-den- Send current page to the den (Ctrl+D)POST /get-concepts- Extract concepts from a URLPOST /get-answer- Generate answer from URLs and conceptsPOST /simplify-concepts- Remove duplicate conceptsPOST /get-comparison-score- Calculate similarity between strings
GET /proxy?url=<url>- Proxy web pages for embedding
Rabbit organizes information into a hierarchical structure:
- bigDaddyNode: The root node representing a search query
- Contains: query, pages, denPages, conceptList, children, answer
- babyNode: Child nodes representing specific concepts
- Contains: title, pages, conceptList, children, parent reference
- Search: User enters a query β Backend searches web β Creates central bigDaddyNode
- Concept Extraction: AI extracts key concepts from search results
- Graph Building: Concepts are organized into child nodes with relationships
- Exploration: User can:
- View the knowledge graph
- Navigate through pages (Hop)
- Deep dive into concepts (Burrow)
- Add pages to the den (Ctrl+D)
- Visualization: Interactive graph shows relationships and allows navigation
Rabbit uses Google Gemini 1.5 Flash for:
- Concept Extraction: Identifying key concepts from web pages
- Answer Generation: Synthesizing answers from multiple sources
- Similarity Scoring: Comparing concepts to build relationships
- Concept Simplification: Removing duplicates and similar concepts
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS, ReactFlow, Zustand
- Backend: Express.js, TypeScript, Node.js
- Browser: Electron 38
- Build System: Turbo (monorepo)
- AI: Google Gemini 1.5 Flash
- Search: Google Custom Search API or Serper API
npm run dev- Start all services in development modenpm run build- Build all packagesnpm run lint- Lint all packagesnpm run test- Run tests (if configured)npm run clean- Clean build artifactsnpm start- Start Electron app (from root)npm run package- Package Electron appnpm run make- Create distributables
- TypeScript strict mode enabled
- ESLint configured for Next.js
- Consistent formatting across packages
| Variable | Required | Description |
|---|---|---|
GEMINI_API_KEY |
Yes | Google Gemini API key for AI features |
GOOGLE_API_KEY |
Yes* | Google Custom Search API key |
GOOGLE_CSE_ID |
Yes* | Google Custom Search Engine ID |
SERPER_API_KEY |
Yes* | Alternative to Google Custom Search |
PORT |
No | Backend server port (default: 4000) |
*Either Google Custom Search (API key + CSE ID) or Serper API key is required.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
[Add your license information here]
- Google Gemini AI for concept extraction and analysis
- ReactFlow for graph visualization
- Electron for cross-platform desktop application
- Next.js team for the excellent framework
Note: This project was built for HackRice 25. For questions or issues, please open an issue on GitHub.