|
| 1 | +--- |
| 2 | +title: Perplexity Lens | AI-Powered Knowledge Graph Browser Extension |
| 3 | +description: A browser extension that builds personalized knowledge graphs using Perplexity AI for smart text selection, webpage summarization, and contextual insights |
| 4 | +sidebar_position: 18 |
| 5 | +keywords: [perplexity lens, browser extension, knowledge graph, RAG, summarization, perplexity ai] |
| 6 | +--- |
| 7 | + |
| 8 | +**Perplexity Lens** is a powerful browser extension that transforms your browsing experience by providing AI-powered insights using Perplexity AI and creating a personalized knowledge graph that visually connects the concepts you encounter online. |
| 9 | + |
| 10 | +<iframe |
| 11 | + className="w-full aspect-video rounded-xl" |
| 12 | + src="https://www.youtube.com/embed/SCPklDuSR3U" |
| 13 | + title="YouTube video player" |
| 14 | + frameBorder="0" |
| 15 | + allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" |
| 16 | + allowFullScreen |
| 17 | +></iframe> |
| 18 | + |
| 19 | +## Features |
| 20 | + |
| 21 | +* **Smart Text Selection** with AI-generated explanations for selected text |
| 22 | +* **Webpage Summarization** for instant, concise overviews of entire pages |
| 23 | +* **Contextual RAG Insights** using Retrieval-Augmented Generation for detailed context and meanings |
| 24 | +* **Knowledge Graph Visualization** with interactive D3.js graphs showing concept connections |
| 25 | +* **Public Sharing** with URL generation for sharing graphs with others |
| 26 | +* **User Authentication** via Firebase for secure access |
| 27 | +* **Dual Storage** with local IndexedDB and cloud Firebase storage |
| 28 | +* **Responsive UI** fully functional across all devices |
| 29 | + |
| 30 | +## Prerequisites |
| 31 | + |
| 32 | +* Node.js v14+ and npm v6+ |
| 33 | +* Google Chrome or compatible browser |
| 34 | +* Firebase account for cloud functionality |
| 35 | +* Firebase CLI (`npm install -g firebase-tools`) |
| 36 | +* Perplexity API key and OpenAI API key |
| 37 | + |
| 38 | +## Installation |
| 39 | + |
| 40 | +```bash |
| 41 | +# Clone the repository |
| 42 | +git clone https://github.com/iamaayushijain/perplexity-lens.git |
| 43 | +cd perplexity_lens |
| 44 | + |
| 45 | +# Install dependencies |
| 46 | +npm install |
| 47 | + |
| 48 | +# Build the extension |
| 49 | +npm run build |
| 50 | +``` |
| 51 | + |
| 52 | +## Configuration |
| 53 | + |
| 54 | +Edit `src/config.ts`: |
| 55 | +```typescript |
| 56 | +export const PERPLEXITY_API_KEY = 'your-perplexity-key'; |
| 57 | +export const EMBEDDING_API_KEY = 'your-openai-key'; |
| 58 | +export const FIREBASE_HOSTING_URL = 'https://your-project-id.web.app'; |
| 59 | +``` |
| 60 | + |
| 61 | +## Usage |
| 62 | + |
| 63 | +1. **Load Extension**: Go to `chrome://extensions/`, enable Developer mode, click "Load unpacked" and select the `dist/` directory |
| 64 | + |
| 65 | +2. **Sign In**: Click the extension icon and authenticate via Firebase |
| 66 | + |
| 67 | +3. **Use Features**: |
| 68 | + - **Highlight Text**: Select text on any webpage for AI-powered insights |
| 69 | + - **Summarize Page**: Use the "Summarize" feature for webpage overviews |
| 70 | + - **Ask Anything**: Hover or click on words/phrases for definitions or explanations |
| 71 | + - **View Graph**: Navigate to the Graph tab to see your knowledge graph |
| 72 | + - **Explore**: Zoom, drag, and hover over nodes in the interactive graph |
| 73 | + - **Share**: Click "Share Graph" to generate a public link |
| 74 | + |
| 75 | +## Code Explanation |
| 76 | + |
| 77 | +* **Frontend**: React with TypeScript and TailwindCSS for modern, responsive UI |
| 78 | +* **Browser Extension**: Chrome extension architecture with popup and content scripts |
| 79 | +* **AI Integration**: Perplexity AI for intelligent text explanations and summarization |
| 80 | +* **Knowledge Graph**: D3.js for interactive graph visualization and concept connections |
| 81 | +* **Storage**: Dual storage system with local IndexedDB and cloud Firebase |
| 82 | +* **Authentication**: Firebase Auth for secure user access and data management |
| 83 | +* **RAG System**: Retrieval-Augmented Generation for contextual insights and definitions |
| 84 | + |
| 85 | +## Links |
| 86 | + |
| 87 | +- [GitHub Repository](https://github.com/iamaayushijain/perplexity-lens) |
| 88 | +- [Blog Post](https://ashjin.hashnode.dev/perplexity-lens-supercharge-your-web-experience-with-personalized-knowledge-graphs) |
0 commit comments